Skip to content

Meaning of ar.config.fiterrors

Clemens Kreutz edited this page Jan 10, 2017 · 10 revisions

What's the meaning of ar.config.fiterrors?

Errors of experimental data points may either be determined within the experiment or can be fitted simulataneously to the dynamic model. External/experimental errors are provided via the data-file (csv or xls) and are stored in ar.model.data.yExpStd. Errors according to the error model are calculated internally and stored in ar.model.data.ystdExpSimu (experimental time grid) and in ar.model.data.ystdFineSimu (fine time grid used for plotting).

ar.config.fiterrors is used to control which errors are used by D2D.

ar.config.fiterrors = 0 (Default)

By default, experimental errors are used where they are available. This means that this option is a mixed case. The error model is used but overwritten if an experimental error has been provided in the data file. Fitting of error parameters is only controlled via ar.qFit. If any error parameter is fitted (ar.qFit==1), then the log-likelihood is calculated and stored in ar.model.data.chi2. The standard least-squares chi2 is only calculated if no error parameters are fitted ( sum(ar.qFit(ar.qError==1)==1)==0 ).

ar.config.fiterrors = 1

In this case, experimental errors are ignored and data uncertainties are exclusively used from the error model. Again, fitting of error parameters is exclusively controlled via ar.qFit.

ar.config.fiterrors = -1

In this case, only experimental errors are used and the error model is ignored. If no experimental error is available, the residual is NaN. If error parameters are fitted (ar.qFit==1), then they are not identifiable since they do not enter the objective function.

Where is ar.config.fiterrors evaluated?

Residuals of the individual data sets are calculated in arCalcRes. In this function, ar.config.fiterrors is evaluated to decide which error residuals are added.

Clone this wiki locally