This script takes a dark object, a list of parameters and AICc scores from ModelSelect to chose a model and then return optimised values for the parameter estimates. Analysis of the data can be halted here if wished.
However, a MultiStart check can be useful if it is suspected that a local minimum has been found. Furthermore, BootDark will provide confidence intervals for the parameter estimates.
Usage
BestFit(obj, MSC, draw)
Arguments
obj
A dark object
MSC
A list from the function ModelSelect
draw
A flag to indicate whether a figure should be drawn.
Value
A list with the following elements:
callthe last function call on the data
timetime of observations
thrsthresholds
residresiduals of best model fit
fitfitted thresholds for the optimal model and parameters
thetseed parameters of TestData, null if not TestData
ssesum of squared error used in TestData
valcalculated sum of squared errors
datasource of the data
optoptimal parameter estimates
Modoptimal model
Pnnumber of parameters required by the model to fit the data