mkinerrmin(fit, alpha = 0.05)
mkinfit
.
This function uses optimize
in order to iteratively find the
smallest relative error still resulting in passing the chi-squared test
as defined in the FOCUS kinetics report from 2006.
The dataframe has one row for the total dataset and one further row for each observed state variable in the model.
This function is used internally by summary.mkinfit
.
FOCUS (2006) Guidance Document on Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://focus.jrc.ec.europa.eu/dk
SFO_SFO = mkinmod(parent = list(type = "SFO", to = "m1"), m1 = list(type = "SFO"), use_of_ff = "max")Successfully compiled differential equation model from auto-generated C code.fit_FOCUS_D = mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) round(mkinerrmin(fit_FOCUS_D), 4)err.min n.optim df All data 0.0640 4 15 parent 0.0646 2 7 m1 0.0469 2 8fit_FOCUS_E = mkinfit(SFO_SFO, FOCUS_2006_E, quiet = TRUE) round(mkinerrmin(fit_FOCUS_E), 4)err.min n.optim df All data 0.1544 4 13 parent 0.1659 2 7 m1 0.1095 2 6