From e0bef15657df1d6cade99cc3f6d8b07fa35792fe Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 8 Jul 2019 18:12:21 +0200 Subject: Adaptations for gmkin Address winbuilder check problems, update check log, update of static docs --- docs/reference/mkinfit.html | 46 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'docs/reference/mkinfit.html') diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index e9ad9343..2ba4cc0c 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -163,7 +163,8 @@ Per default, parameters in the kinetic models are internally transformed in quiet = FALSE, atol = 1e-8, rtol = 1e-10, n.outtimes = 100, error_model = c("const", "obs", "tc"), - error_model_algorithm = c("d_3", "direct", "twostep", "threestep", "fourstep", "IRLS"), + error_model_algorithm = c("d_3", "direct", "twostep", "threestep", "fourstep", "IRLS", + "OLS"), reweight.tol = 1e-8, reweight.max.iter = 10, trace_parms = FALSE, ...) @@ -345,10 +346,13 @@ Per default, parameters in the kinetic models are internally transformed in parameters found, then optimizes the degradation model again with fixed error model parameters, and finally minimizes the negative log-likelihood with free degradation and error model parameters.

-

The algorithm "IRLS" starts with unweighted least squares, - and then iterates optimization of the error model parameters and subsequent +

The algorithm "IRLS" (Iteratively Reweighted Least Squares) starts with + unweighted least squares, and then iterates optimization of the error model + parameters and subsequent optimization of the degradation model using those error model parameters, - until the error model parameters converge.

+ until the error model parameters converge.

+

The algorithm "OLS" (Ordinary Least Squares) is automatically selected when + the error model is "const" and results in an unweighted least squares fit.

reweight.tol @@ -400,15 +404,15 @@ Per default, parameters in the kinetic models are internally transformed in fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) summary(fit)
#> mkin version used for fitting: 0.9.49.6 #> R version used for fitting: 3.6.0 -#> Date of fit: Fri Jul 5 15:50:49 2019 -#> Date of summary: Fri Jul 5 15:50:49 2019 +#> Date of fit: Tue Jul 9 08:58:09 2019 +#> Date of summary: Tue Jul 9 08:58:09 2019 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 222 model solutions performed in 0.455 s +#> Fitted using 222 model solutions performed in 0.475 s #> #> Error model: Constant variance #> @@ -482,10 +486,7 @@ Per default, parameters in the kinetic models are internally transformed in m1 = mkinsub("SFO"))
#> Successfully compiled differential equation model from auto-generated C code.
# Fit the model to the FOCUS example dataset D using defaults print(system.time(fit <- mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "eigen", quiet = TRUE)))
#> Warning: Observations with value of zero were removed from the data
#> User System verstrichen -#> 1.502 0.000 1.503
coef(fit)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink -#> 99.598483 -3.038220 -2.980300 -5.247500 -#> sigma -#> 3.125504
endpoints(fit)
#> $ff +#> 1.581 0.000 1.582
coef(fit)
#> NULL
endpoints(fit)
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 #> @@ -557,10 +558,7 @@ Per default, parameters in the kinetic models are internally transformed in #> Sum of squared residuals at call 126: 371.2134 #> Sum of squared residuals at call 135: 371.2134 #> Negative log-likelihood at call 145: 97.22429
#> Optimisation successfully terminated.
#> User System verstrichen -#> 1.089 0.000 1.089
coef(fit.deSolve)
#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink -#> 99.598483 -3.038220 -2.980300 -5.247500 -#> sigma -#> 3.125504
endpoints(fit.deSolve)
#> $ff +#> 1.109 0.000 1.109
coef(fit.deSolve)
#> NULL
endpoints(fit.deSolve)
#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 #> @@ -592,8 +590,8 @@ Per default, parameters in the kinetic models are internally transformed in SFO_SFO.ff <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO"), use_of_ff = "max")
#> Successfully compiled differential equation model from auto-generated C code.
f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(f.noweight)
#> mkin version used for fitting: 0.9.49.6 #> R version used for fitting: 3.6.0 -#> Date of fit: Fri Jul 5 15:51:05 2019 -#> Date of summary: Fri Jul 5 15:51:05 2019 +#> Date of fit: Tue Jul 9 08:58:26 2019 +#> Date of summary: Tue Jul 9 08:58:26 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -601,7 +599,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 421 model solutions performed in 1.08 s +#> Fitted using 421 model solutions performed in 1.136 s #> #> Error model: Constant variance #> @@ -711,8 +709,8 @@ Per default, parameters in the kinetic models are internally transformed in #> 120 m1 25.15 28.78984 -3.640e+00 #> 120 m1 33.31 28.78984 4.520e+00
f.obs <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "obs", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(f.obs)
#> mkin version used for fitting: 0.9.49.6 #> R version used for fitting: 3.6.0 -#> Date of fit: Fri Jul 5 15:51:08 2019 -#> Date of summary: Fri Jul 5 15:51:08 2019 +#> Date of fit: Tue Jul 9 08:58:29 2019 +#> Date of summary: Tue Jul 9 08:58:29 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -720,7 +718,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 979 model solutions performed in 2.623 s +#> Fitted using 979 model solutions performed in 2.836 s #> #> Error model: Variance unique to each observed variable #> @@ -843,8 +841,8 @@ Per default, parameters in the kinetic models are internally transformed in #> 120 m1 25.15 28.80429 -3.654e+00 #> 120 m1 33.31 28.80429 4.506e+00
f.tc <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, error_model = "tc", quiet = TRUE)
#> Warning: Observations with value of zero were removed from the data
summary(f.tc)
#> mkin version used for fitting: 0.9.49.6 #> R version used for fitting: 3.6.0 -#> Date of fit: Fri Jul 5 15:51:17 2019 -#> Date of summary: Fri Jul 5 15:51:17 2019 +#> Date of fit: Tue Jul 9 08:58:39 2019 +#> Date of summary: Tue Jul 9 08:58:39 2019 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -852,7 +850,7 @@ Per default, parameters in the kinetic models are internally transformed in #> #> Model predictions using solution type deSolve #> -#> Fitted using 2289 model solutions performed in 9.215 s +#> Fitted using 2289 model solutions performed in 9.908 s #> #> Error model: Two-component variance function #> -- cgit v1.2.1