Learn R Programming

Dark (version 0.9.9)

BestFit: BestFit

Description

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)

Value

A list with the following elements:

call

the last function call on the data

time

time of observations

thrs

thresholds

resid

residuals of best model fit

fit

fitted thresholds for the optimal model and parameters

thet

seed parameters of TestData, null if not TestData

sse

sum of squared error used in TestData

val

calculated sum of squared errors

data

source of the data

opt

optimal parameter estimates

Mod

optimal model

Pn

number of parameters required by the model to fit the data

AIC

AICc scores for the three models fitted

R2

an indication of the 'goodness' of fit

Arguments

obj

A dark object

MSC

A list from the function ModelSelect

draw

A flag to indicate whether a figure should be drawn.

Author

Jeremiah MF Kelly

Mumac Ltd, SK7 6NR, GB

See Also

Examples

Run this code
tmp <- TestData(0:20)
P<-Start(tmp,100)
MSC<-ModelSelect(tmp, P)
BestFit(tmp, MSC)

Run the code above in your browser using DataLab