From a0192522fd79cced4e22e3e6096e4238b6ac2329 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 16 Dec 2020 19:12:40 +0100 Subject: Add printout of d24 model and update docs --- docs/dev/reference/D24_2014.html | 20 +++++++++++++++++++- docs/dev/reference/index.html | 2 +- docs/dev/reference/saem.html | 41 ++++++++++++++++++++-------------------- 3 files changed, 41 insertions(+), 22 deletions(-) (limited to 'docs/dev/reference') diff --git a/docs/dev/reference/D24_2014.html b/docs/dev/reference/D24_2014.html index e4a3216d..5ebf664e 100644 --- a/docs/dev/reference/D24_2014.html +++ b/docs/dev/reference/D24_2014.html @@ -220,7 +220,25 @@ specific pieces of information in the comments.

#> 13 365 6.3
m_D24 = mkinmod(D24 = mkinsub("SFO", to = "DCP"), DCP = mkinsub("SFO", to = "DCA"), DCA = mkinsub("SFO")) -
#> Temporary DLL for differentials generated and loaded
+
#> Temporary DLL for differentials generated and loaded
print(D24_2014) +
#> <mkindsg> holding 5 mkinds objects +#> Title $title: Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 +#> Occurrene of observed compounds $observed_n: +#> D24 DCP DCA +#> 5 4 4 +#> Meta information $meta: +#> study usda_soil_type study_moisture_ref_type rel_moisture +#> 1 Cohen 1991 Silt loam <NA> NA +#> 2 Liu and Adelfinskaya 2011 Silt loam pF1 0.5 +#> 3 Liu and Adelfinskaya 2011 Loam pF1 0.5 +#> 4 Liu and Adelfinskaya 2011 Loam pF1 0.5 +#> 5 Liu and Adelfinskaya 2011 Loamy sand pF1 0.5 +#> temperature +#> 1 25 +#> 2 20 +#> 3 20 +#> 4 20 +#> 5 20
#> Running main SAEM algorithm -#> [1] "Fri Dec 11 15:37:47 2020" +#> [1] "Wed Dec 16 18:27:30 2020" #> .... #> Minimisation finished -#> [1] "Fri Dec 11 15:37:49 2020"
+#> [1] "Wed Dec 16 18:27:31 2020"
f_mmkin_parent <- mmkin(c("SFO", "FOMC", "DFOP"), ds, quiet = TRUE) f_saem_sfo <- saem(f_mmkin_parent["SFO", ])
#> Running main SAEM algorithm -#> [1] "Fri Dec 11 15:37:51 2020" +#> [1] "Wed Dec 16 18:27:33 2020" #> .... #> Minimisation finished -#> [1] "Fri Dec 11 15:37:52 2020"
f_saem_fomc <- saem(f_mmkin_parent["FOMC", ]) +#> [1] "Wed Dec 16 18:27:35 2020"
f_saem_fomc <- saem(f_mmkin_parent["FOMC", ])
#> Running main SAEM algorithm -#> [1] "Fri Dec 11 15:37:52 2020" +#> [1] "Wed Dec 16 18:27:35 2020" #> .... #> Minimisation finished -#> [1] "Fri Dec 11 15:37:55 2020"
f_saem_dfop <- saem(f_mmkin_parent["DFOP", ]) +#> [1] "Wed Dec 16 18:27:37 2020"
f_saem_dfop <- saem(f_mmkin_parent["DFOP", ])
#> Running main SAEM algorithm -#> [1] "Fri Dec 11 15:37:55 2020" +#> [1] "Wed Dec 16 18:27:37 2020" #> .... #> Minimisation finished -#> [1] "Fri Dec 11 15:37:58 2020"
+#> [1] "Wed Dec 16 18:27:40 2020"
# The returned saem.mmkin object contains an SaemixObject, therefore we can use # functions from saemix library(saemix) @@ -328,10 +326,10 @@ using mmkin.

f_mmkin_parent_tc <- update(f_mmkin_parent, error_model = "tc") f_saem_fomc_tc <- saem(f_mmkin_parent_tc["FOMC", ])
#> Running main SAEM algorithm -#> [1] "Fri Dec 11 15:38:01 2020" +#> [1] "Wed Dec 16 18:27:43 2020" #> .... #> Minimisation finished -#> [1] "Fri Dec 11 15:38:06 2020"
compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so)) +#> [1] "Wed Dec 16 18:27:48 2020"
compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so))
#> Likelihoods computed by importance sampling
#> AIC BIC #> 1 467.7096 464.9757 #> 2 469.5208 466.3963
@@ -352,15 +350,15 @@ using mmkin.

# four minutes f_saem_sfo_sfo <- saem(f_mmkin["SFO-SFO", ])
#> Running main SAEM algorithm -#> [1] "Fri Dec 11 15:38:09 2020" +#> [1] "Wed Dec 16 18:27:50 2020" #> .... #> Minimisation finished -#> [1] "Fri Dec 11 15:38:14 2020"
f_saem_dfop_sfo <- saem(f_mmkin["DFOP-SFO", ]) +#> [1] "Wed Dec 16 18:27:55 2020"
f_saem_dfop_sfo <- saem(f_mmkin["DFOP-SFO", ])
#> Running main SAEM algorithm -#> [1] "Fri Dec 11 15:38:15 2020" +#> [1] "Wed Dec 16 18:27:56 2020" #> .... #> Minimisation finished -#> [1] "Fri Dec 11 15:38:24 2020"
# We can use print, plot and summary methods to check the results +#> [1] "Wed Dec 16 18:28:05 2020"
# We can use print, plot and summary methods to check the results print(f_saem_dfop_sfo)
#> Kinetic nonlinear mixed-effects model fit by SAEM #> Structural model: @@ -375,6 +373,8 @@ using mmkin.

#> 170 observations of 2 variable(s) grouped in 5 datasets #> #> Likelihood computed by importance sampling +#> +#> LL by is "-407.78 (df=13)" #> AIC BIC logLik #> 841.6 836.5 -407.8 #> @@ -400,11 +400,12 @@ using mmkin.

#> SD.log_k2 1.90634 0.70934 3.1033 #> SD.g_qlogis 0.44771 -0.86417 1.7596
plot(f_saem_dfop_sfo)
summary(f_saem_dfop_sfo, data = TRUE) -
#> saemix version used for fitting: 3.1.9000 +
#> +#> LL by is "-407.78 (df=13)"
#> saemix version used for fitting: 3.1.9000 #> mkin version used for pre-fitting: 0.9.50.4 #> R version used for fitting: 4.0.3 -#> Date of fit: Fri Dec 11 15:38:25 2020 -#> Date of summary: Fri Dec 11 15:38:25 2020 +#> Date of fit: Wed Dec 16 18:28:06 2020 +#> Date of summary: Wed Dec 16 18:28:06 2020 #> #> Equations: #> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -419,7 +420,7 @@ using mmkin.

#> #> Model predictions using solution type analytical #> -#> Fitted in 10.096 s using 300, 100 iterations +#> Fitted in 9.889 s using 300, 100 iterations #> #> Variance model: Constant variance #> -- cgit v1.2.1