aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-03-16 14:42:30 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2022-03-16 14:42:30 +0100
commite48c1f2ef990a622722e416c8d301430db4f5081 (patch)
treecca6412417798973277072f858514fcaea268c71
parent0cf759e7d878817fd4c25411c4e93b036bc5596b (diff)
Use saemix in help page, typo in vignette
-rw-r--r--NEWS.md6
-rw-r--r--R/dimethenamid_2018.R71
-rw-r--r--README.html3
-rw-r--r--README.md4
-rw-r--r--docs/articles/web_only/dimethenamid_2018.html4
-rw-r--r--docs/index.html1
-rw-r--r--docs/news/index.html8
-rw-r--r--docs/pkgdown.yml2
-rw-r--r--docs/reference/Rplot001.pngbin1011 -> 90922 bytes
-rw-r--r--docs/reference/Rplot002.pngbin57977 -> 90653 bytes
-rw-r--r--docs/reference/Rplot003.pngbin59128 -> 20189 bytes
-rw-r--r--docs/reference/Rplot004.pngbin59260 -> 19212 bytes
-rw-r--r--docs/reference/dimethenamid_2018-1.pngbin264424 -> 254862 bytes
-rw-r--r--docs/reference/dimethenamid_2018-2.pngbin243268 -> 254236 bytes
-rw-r--r--docs/reference/dimethenamid_2018-3.pngbin0 -> 7629 bytes
-rw-r--r--docs/reference/dimethenamid_2018.html203
-rw-r--r--man/dimethenamid_2018.Rd71
-rw-r--r--vignettes/web_only/dimethenamid_2018.rmd2
18 files changed, 239 insertions, 136 deletions
diff --git a/NEWS.md b/NEWS.md
index c0bade8f..e675fc72 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,8 +1,12 @@
+# mkin 1.1.1
+
+- 'dimethenamid_2018': Update example code to use saemix
+
# mkin 1.1.0 (2022-03-14)
## Mixed-effects models
-- Reintroduce the interface to saemix (now on CRAN), in particular the generic function 'saem' with a generator 'saem.mmkin', currently using 'saemix_model' and 'saemix_data', summary and plot methods
+- Reintroduce the interface to saemix version 3.0 (now on CRAN), in particular the generic function 'saem' with a generator 'saem.mmkin', currently using 'saemix_model' and 'saemix_data', summary and plot methods
- 'mean_degparms': New argument 'test_log_parms' that makes the function only consider log-transformed parameters where the untransformed parameters pass the t-test for a certain confidence level. This can be used to obtain more plausible starting parameters for the different mixed-effects model backends
diff --git a/R/dimethenamid_2018.R b/R/dimethenamid_2018.R
index 2bf5fb77..2fdd1981 100644
--- a/R/dimethenamid_2018.R
+++ b/R/dimethenamid_2018.R
@@ -29,41 +29,42 @@
#' dmta_ds[["Elliot 1"]] <- NULL
#' dmta_ds[["Elliot 2"]] <- NULL
#' \dontrun{
-#' dfop_sfo3_plus <- mkinmod(
-#' DMTA = mkinsub("DFOP", c("M23", "M27", "M31")),
-#' M23 = mkinsub("SFO"),
-#' M27 = mkinsub("SFO"),
-#' M31 = mkinsub("SFO", "M27", sink = FALSE),
-#' quiet = TRUE
+#' # We don't use DFOP for the parent compound, as this gives numerical
+#' # instabilities in the fits
+#' sfo_sfo3p <- mkinmod(
+#' DMTA = mkinsub("SFO", c("M23", "M27", "M31")),
+#' M23 = mkinsub("SFO"),
+#' M27 = mkinsub("SFO"),
+#' M31 = mkinsub("SFO", "M27", sink = FALSE),
+#' quiet = TRUE
#' )
-#' f_dmta_mkin_tc <- mmkin(
-#' list("DFOP-SFO3+" = dfop_sfo3_plus),
-#' dmta_ds, quiet = TRUE, error_model = "tc")
-#' nlmixr_model(f_dmta_mkin_tc)
-#' # The focei fit takes about four minutes on my system
-#' system.time(
-#' f_dmta_nlmixr_focei <- nlmixr(f_dmta_mkin_tc, est = "focei",
-#' control = nlmixr::foceiControl(print = 500))
-#' )
-#' summary(f_dmta_nlmixr_focei)
-#' plot(f_dmta_nlmixr_focei)
-#' # Using saemix takes about 18 minutes
-#' system.time(
-#' f_dmta_saemix <- saem(f_dmta_mkin_tc, test_log_parms = TRUE)
-#' )
-#'
-#' # nlmixr with est = "saem" is pretty fast with default iteration numbers, most
-#' # of the time (about 2.5 minutes) is spent for calculating the log likelihood at the end
-#' # The likelihood calculated for the nlmixr fit is much lower than that found by saemix
-#' # Also, the trace plot and the plot of the individual predictions is not
-#' # convincing for the parent. It seems we are fitting an overparameterised
-#' # model, so the result we get strongly depends on starting parameters and control settings.
-#' system.time(
-#' f_dmta_nlmixr_saem <- nlmixr(f_dmta_mkin_tc, est = "saem",
-#' control = nlmixr::saemControl(print = 500, logLik = TRUE, nmc = 9))
-#' )
-#' traceplot(f_dmta_nlmixr_saem$nm)
-#' summary(f_dmta_nlmixr_saem)
-#' plot(f_dmta_nlmixr_saem)
+#' dmta_sfo_sfo3p_tc <- mmkin(list("SFO-SFO3+" = sfo_sfo3p),
+#' dmta_ds, error_model = "tc", quiet = TRUE)
+#' print(dmta_sfo_sfo3p_tc)
+#' # The default (test_log_parms = FALSE) gives an undue
+#' # influence of ill-defined rate constants that have
+#' # extremely small values:
+#' plot(mixed(dmta_sfo_sfo3p_tc), test_log_parms = FALSE)
+#' # If we disregards ill-defined rate constants, the results
+#' # look more plausible, but the truth is likely to be in
+#' # between these variants
+#' plot(mixed(dmta_sfo_sfo3p_tc), test_log_parms = TRUE)
+#' # Therefore we use nonlinear mixed-effects models
+#' # f_dmta_nlme_tc <- nlme(dmta_sfo_sfo3p_tc)
+#' # nlme reaches maxIter = 50 without convergence
+#' f_dmta_saem_tc <- saem(dmta_sfo_sfo3p_tc)
+#' # I am commenting out the convergence plot as rendering them
+#' # with pkgdown fails (at least without further tweaks to the
+#' # graphics device used)
+#' #saemix::plot(f_dmta_saem_tc$so, plot.type = "convergence")
+#' summary(f_dmta_saem_tc)
+#' # As the confidence interval for the random effects of DMTA_0
+#' # includes zero, we could try an alternative model without
+#' # such random effects
+#' # f_dmta_saem_tc_2 <- saem(dmta_sfo_sfo3p_tc,
+#' # covariance.model = diag(c(0, rep(1, 7))))
+#' # saemix::plot(f_dmta_saem_tc_2$so, plot.type = "convergence")
+#' # This does not perform better judged by AIC and BIC
+#' saemix::compare.saemix(f_dmta_saem_tc$so, f_dmta_saem_tc_2$so)
#' }
"dimethenamid_2018"
diff --git a/README.html b/README.html
index dc5bbcb9..cdd68210 100644
--- a/README.html
+++ b/README.html
@@ -367,7 +367,7 @@ pre code {
<div id="mkin" class="section level1">
<h1>mkin</h1>
-<p><a href="https://cran.r-project.org/package=mkin"><img src="data:image/svg+xml; charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NSIgaGVpZ2h0PSIyMCIgYXJpYS1sYWJlbD0iQ1JBTiAxLjAuNSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJiIiB4Mj0iMCIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjYmJiIiBzdG9wLW9wYWNpdHk9Ii4xIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3Atb3BhY2l0eT0iLjEiLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxtYXNrIGlkPSJhIj4KICAgIDxyZWN0IHdpZHRoPSI4NSIgaGVpZ2h0PSIyMCIgcng9IjMiIGZpbGw9IiNmZmYiLz4KICA8L21hc2s+CiAgPGcgbWFzaz0idXJsKCNhKSI+CiAgICA8cGF0aCBmaWxsPSIjNTU1IiBkPSJNMCAwaDQzdjIwSDB6Ii8+CiAgICA8cGF0aCBmaWxsPSIjNGMxIiBkPSJNNDMgMGg2M3YyMEg0M3oiLz4KICAgIDxwYXRoIGZpbGw9InVybCgjYikiIGQ9Ik0wIDBoODV2MjBIMHoiLz4KICA8L2c+CiAgPGcgZmlsbD0iI2ZmZiIgdGV4dC1hbmNob3I9Im1pZGRsZSIKICAgICBmb250LWZhbWlseT0iRGVqYVZ1IFNhbnMsVmVyZGFuYSxHZW5ldmEsc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMSI+CiAgICA8dGV4dCB4PSIyMS41IiB5PSIxNSIgZmlsbD0iIzAxMDEwMSIgZmlsbC1vcGFjaXR5PSIuMyI+CiAgICAgIENSQU4KICAgIDwv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xIDEuOTU3bC4wNTQuMDM2IDMuODYyLTIuMjM3LjA1LS4wM3YtLjA1NmMuMDA2LTYuMDgtMi4zODQtMTEuNzkzLTYuNzI5LTE2LjA4OUMzNC45MzIgMi4zNjEgMjkuMTYgMCAyMy4wMTMgMCIgZmlsbD0iI0YwMUY3QSIgZmlsbC1ydWxlPSJldmVub2RkIi8+CiAgICA8L3N2Zz4KPC9zdmc+" alt="codecov" /></a></p>
<p>The R package <strong>mkin</strong> provides calculation routines for the analysis of chemical degradation data, including <b>m</b>ulticompartment <b>kin</b>etics as needed for modelling the formation and decline of transformation products, or if several degradation compartments are involved.</p>
<div id="installation" class="section level2">
<h2>Installation</h2>
@@ -448,6 +448,7 @@ pre code {
<li>Project Number 120667 (Development of objective criteria for the evaluation of the visual fit in the kinetic evaluation of degradation data, 2019-2020)</li>
<li>Project Number 146839 (Checking the feasibility of using mixed-effects models for the derivation of kinetic modelling parameters from degradation studies, 2020-2021)</li>
</ul>
+<p>Thanks are due also to Emmanuelle Comets, maintainer of the saemix package, for the nice collaboration on using the SAEM algorithm and its implementation in saemix for the evaluation of chemical degradation data.</p>
</div>
<div id="references" class="section level2">
<h2>References</h2>
diff --git a/README.md b/README.md
index b864fe79..7c29696a 100644
--- a/README.md
+++ b/README.md
@@ -212,6 +212,10 @@ to ModelMaker 4.0, 2014-2015)
- Project Number 146839 (Checking the feasibility of using mixed-effects models for
the derivation of kinetic modelling parameters from degradation studies, 2020-2021)
+Thanks are due also to Emmanuelle Comets, maintainer of the saemix package, for
+the nice collaboration on using the SAEM algorithm and its implementation in
+saemix for the evaluation of chemical degradation data.
+
## References
<table>
diff --git a/docs/articles/web_only/dimethenamid_2018.html b/docs/articles/web_only/dimethenamid_2018.html
index 0ba9d5a8..09aa5150 100644
--- a/docs/articles/web_only/dimethenamid_2018.html
+++ b/docs/articles/web_only/dimethenamid_2018.html
@@ -105,7 +105,7 @@
<h1 data-toc-skip>Example evaluations of the dimethenamid data from 2018</h1>
<h4 data-toc-skip class="author">Johannes Ranke</h4>
- <h4 data-toc-skip class="date">Last change 7 March 2022, built on 07 Mar 2022</h4>
+ <h4 data-toc-skip class="date">Last change 7 March 2022, built on 16 Mar 2022</h4>
<small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/vignettes/web_only/dimethenamid_2018.rmd" class="external-link"><code>vignettes/web_only/dimethenamid_2018.rmd</code></a></small>
<div class="hidden name"><code>dimethenamid_2018.rmd</code></div>
@@ -426,7 +426,7 @@ DFOP tc more iterations 665.88 663.80</code></pre>
<div class="section level2">
<h2 id="conclusion">Conclusion<a class="anchor" aria-label="anchor" href="#conclusion"></a>
</h2>
-<p>A more detailed analysis of the dimethenamid dataset confirmed that the DFOP model provides the most appropriate description of the decline of the parent compound in these data. On the other hand, closer inspection of the results revealed that the variability of the k2 parameter across the population of soils is ill-defined. This coincides with the observation that this parameter cannot robustly be quantified in some for some of the soils.</p>
+<p>A more detailed analysis of the dimethenamid dataset confirmed that the DFOP model provides the most appropriate description of the decline of the parent compound in these data. On the other hand, closer inspection of the results revealed that the variability of the k2 parameter across the population of soils is ill-defined. This coincides with the observation that this parameter cannot robustly be quantified for some of the soils.</p>
<p>Regarding the regulatory use of these data, it is claimed that an improved characterisation of the mean parameter values across the population is obtained using the nonlinear mixed-effects models presented here. However, attempts to quantify the variability of the slower rate constant of the biphasic decline of dimethenamid indicate that the data are not sufficient to characterise this variability to a satisfactory precision.</p>
</div>
<div class="section level2">
diff --git a/docs/index.html b/docs/index.html
index 9b5b34a1..4491b50f 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -208,6 +208,7 @@
<li>Project Number 120667 (Development of objective criteria for the evaluation of the visual fit in the kinetic evaluation of degradation data, 2019-2020)</li>
<li>Project Number 146839 (Checking the feasibility of using mixed-effects models for the derivation of kinetic modelling parameters from degradation studies, 2020-2021)</li>
</ul>
+<p>Thanks are due also to Emmanuelle Comets, maintainer of the saemix package, for the nice collaboration on using the SAEM algorithm and its implementation in saemix for the evaluation of chemical degradation data.</p>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a>
diff --git a/docs/news/index.html b/docs/news/index.html
index 075b4e22..13b82597 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -82,10 +82,14 @@
</div>
<div class="section level2">
-<h2 class="page-header" data-toc-text="1.1.0" id="mkin-110-unreleased">mkin 1.1.0 (unreleased)<a class="anchor" aria-label="anchor" href="#mkin-110-unreleased"></a></h2>
+<h2 class="page-header" data-toc-text="1.1.1" id="mkin-111">mkin 1.1.1<a class="anchor" aria-label="anchor" href="#mkin-111"></a></h2>
+<ul><li>‘dimethenamid_2018’: Update example code to use saemix</li>
+</ul></div>
+ <div class="section level2">
+<h2 class="page-header" data-toc-text="1.1.0" id="mkin-110-2022-03-14">mkin 1.1.0 (2022-03-14)<a class="anchor" aria-label="anchor" href="#mkin-110-2022-03-14"></a></h2>
<div class="section level3">
<h3 id="mixed-effects-models-1-1-0">Mixed-effects models<a class="anchor" aria-label="anchor" href="#mixed-effects-models-1-1-0"></a></h3>
-<ul><li><p>Reintroduce the interface to saemix (now on CRAN), in particular the generic function ‘saem’ with a generator ‘saem.mmkin’, currently using ‘saemix_model’ and ‘saemix_data’, summary and plot methods</p></li>
+<ul><li><p>Reintroduce the interface to saemix version 3.0 (now on CRAN), in particular the generic function ‘saem’ with a generator ‘saem.mmkin’, currently using ‘saemix_model’ and ‘saemix_data’, summary and plot methods</p></li>
<li><p>‘mean_degparms’: New argument ‘test_log_parms’ that makes the function only consider log-transformed parameters where the untransformed parameters pass the t-test for a certain confidence level. This can be used to obtain more plausible starting parameters for the different mixed-effects model backends</p></li>
<li><p>‘plot.mixed.mmkin’: Gains arguments ‘test_log_parms’ and ‘conf.level’</p></li>
<li><p>‘vignettes/web_only/dimethenamid_2018.rmd’: Example evaluations of the dimethenamid data.</p></li>
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 59854491..3e26de5b 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -11,7 +11,7 @@ articles:
benchmarks: web_only/benchmarks.html
compiled_models: web_only/compiled_models.html
dimethenamid_2018: web_only/dimethenamid_2018.html
-last_built: 2022-03-14T07:56Z
+last_built: 2022-03-16T13:42Z
urls:
reference: https://pkgdown.jrwb.de/mkin/reference
article: https://pkgdown.jrwb.de/mkin/articles
diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png
index 17a35806..26efcdd2 100644
--- a/docs/reference/Rplot001.png
+++ b/docs/reference/Rplot001.png
Binary files differ
diff --git a/docs/reference/Rplot002.png b/docs/reference/Rplot002.png
index ddd3a0d7..065f21f6 100644
--- a/docs/reference/Rplot002.png
+++ b/docs/reference/Rplot002.png
Binary files differ
diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png
index fa29fc43..50a52a1c 100644
--- a/docs/reference/Rplot003.png
+++ b/docs/reference/Rplot003.png
Binary files differ
diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png
index 69fdb09d..0f3d8214 100644
--- a/docs/reference/Rplot004.png
+++ b/docs/reference/Rplot004.png
Binary files differ
diff --git a/docs/reference/dimethenamid_2018-1.png b/docs/reference/dimethenamid_2018-1.png
index 338076a5..be59fc90 100644
--- a/docs/reference/dimethenamid_2018-1.png
+++ b/docs/reference/dimethenamid_2018-1.png
Binary files differ
diff --git a/docs/reference/dimethenamid_2018-2.png b/docs/reference/dimethenamid_2018-2.png
index 1f41a3a8..0bbb14d8 100644
--- a/docs/reference/dimethenamid_2018-2.png
+++ b/docs/reference/dimethenamid_2018-2.png
Binary files differ
diff --git a/docs/reference/dimethenamid_2018-3.png b/docs/reference/dimethenamid_2018-3.png
new file mode 100644
index 00000000..71087e85
--- /dev/null
+++ b/docs/reference/dimethenamid_2018-3.png
Binary files differ
diff --git a/docs/reference/dimethenamid_2018.html b/docs/reference/dimethenamid_2018.html
index f0bc23ee..85e954ac 100644
--- a/docs/reference/dimethenamid_2018.html
+++ b/docs/reference/dimethenamid_2018.html
@@ -156,65 +156,152 @@ specific pieces of information in the comments.</p>
<span class="r-in"><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 1"</span><span class="op">]</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="cn">NULL</span></span>
<span class="r-in"><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 2"</span><span class="op">]</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="cn">NULL</span></span>
<span class="r-in"><span class="co"># \dontrun{</span></span>
-<span class="r-in"><span class="va">dfop_sfo3_plus</span> <span class="op">&lt;-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span>
-<span class="r-in"> DMTA <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M23"</span>, <span class="st">"M27"</span>, <span class="st">"M31"</span><span class="op">)</span><span class="op">)</span>,</span>
-<span class="r-in"> M23 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span>
-<span class="r-in"> M27 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span>
-<span class="r-in"> M31 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M27"</span>, sink <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span>
-<span class="r-in"> quiet <span class="op">=</span> <span class="cn">TRUE</span></span>
+<span class="r-in"><span class="co"># We don't use DFOP for the parent compound, as this gives numerical</span></span>
+<span class="r-in"><span class="co"># instabilities in the fits</span></span>
+<span class="r-in"><span class="va">sfo_sfo3p</span> <span class="op">&lt;-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span>
+<span class="r-in"> DMTA <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M23"</span>, <span class="st">"M27"</span>, <span class="st">"M31"</span><span class="op">)</span><span class="op">)</span>,</span>
+<span class="r-in"> M23 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span>
+<span class="r-in"> M27 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span>
+<span class="r-in"> M31 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M27"</span>, sink <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span>
+<span class="r-in"> quiet <span class="op">=</span> <span class="cn">TRUE</span></span>
<span class="r-in"><span class="op">)</span></span>
-<span class="r-in"><span class="va">f_dmta_mkin_tc</span> <span class="op">&lt;-</span> <span class="fu"><a href="mmkin.html">mmkin</a></span><span class="op">(</span></span>
-<span class="r-in"> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"DFOP-SFO3+"</span> <span class="op">=</span> <span class="va">dfop_sfo3_plus</span><span class="op">)</span>,</span>
-<span class="r-in"> <span class="va">dmta_ds</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span>
-<span class="r-in"><span class="fu">nlmixr_model</span><span class="op">(</span><span class="va">f_dmta_mkin_tc</span><span class="op">)</span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in nlmixr_model(f_dmta_mkin_tc):</span> could not find function "nlmixr_model"</span>
-<span class="r-in"><span class="co"># The focei fit takes about four minutes on my system</span></span>
-<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/system.time.html" class="external-link">system.time</a></span><span class="op">(</span></span>
-<span class="r-in"> <span class="va">f_dmta_nlmixr_focei</span> <span class="op">&lt;-</span> <span class="fu">nlmixr</span><span class="op">(</span><span class="va">f_dmta_mkin_tc</span>, est <span class="op">=</span> <span class="st">"focei"</span>,</span>
-<span class="r-in"> control <span class="op">=</span> <span class="fu">nlmixr</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/nlmixr/man/foceiControl.html" class="external-link">foceiControl</a></span><span class="op">(</span>print <span class="op">=</span> <span class="fl">500</span><span class="op">)</span><span class="op">)</span></span>
-<span class="r-in"><span class="op">)</span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in nlmixr(f_dmta_mkin_tc, est = "focei", control = nlmixr::foceiControl(print = 500)):</span> could not find function "nlmixr"</span>
-<span class="r-msg co"><span class="r-pr">#&gt;</span> Timing stopped at: 0 0 0</span>
-<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_dmta_nlmixr_focei</span><span class="op">)</span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in summary(f_dmta_nlmixr_focei):</span> object 'f_dmta_nlmixr_focei' not found</span>
-<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_dmta_nlmixr_focei</span><span class="op">)</span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in plot(f_dmta_nlmixr_focei):</span> object 'f_dmta_nlmixr_focei' not found</span>
-<span class="r-in"><span class="co"># Using saemix takes about 18 minutes</span></span>
-<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/system.time.html" class="external-link">system.time</a></span><span class="op">(</span></span>
-<span class="r-in"> <span class="va">f_dmta_saemix</span> <span class="op">&lt;-</span> <span class="fu"><a href="saem.html">saem</a></span><span class="op">(</span><span class="va">f_dmta_mkin_tc</span>, test_log_parms <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
-<span class="r-in"><span class="op">)</span></span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> DINTDY- T (=R1) illegal </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> In above message, R1 = 115.507</span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> T not in interval TCUR - HU (= R1) to TCUR (=R2) </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> In above message, R1 = 112.133, R2 = 113.577</span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> DLSODA- At T (=R1), too much accuracy requested </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> for precision of machine.. See TOLSF (=R2) </span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> In above message, R1 = 55.3899, R2 = nan</span>
-<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in out[available, var]:</span> (subscript) logical subscript too long</span>
-<span class="r-msg co"><span class="r-pr">#&gt;</span> Timing stopped at: 12.76 3.069 11.79</span>
-<span class="r-msg co"><span class="r-pr">#&gt;</span> Timing stopped at: 13.77 4.719 12.37</span>
-<span class="r-in"></span>
-<span class="r-in"><span class="co"># nlmixr with est = "saem" is pretty fast with default iteration numbers, most</span></span>
-<span class="r-in"><span class="co"># of the time (about 2.5 minutes) is spent for calculating the log likelihood at the end</span></span>
-<span class="r-in"><span class="co"># The likelihood calculated for the nlmixr fit is much lower than that found by saemix</span></span>
-<span class="r-in"><span class="co"># Also, the trace plot and the plot of the individual predictions is not</span></span>
-<span class="r-in"><span class="co"># convincing for the parent. It seems we are fitting an overparameterised</span></span>
-<span class="r-in"><span class="co"># model, so the result we get strongly depends on starting parameters and control settings.</span></span>
-<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/system.time.html" class="external-link">system.time</a></span><span class="op">(</span></span>
-<span class="r-in"> <span class="va">f_dmta_nlmixr_saem</span> <span class="op">&lt;-</span> <span class="fu">nlmixr</span><span class="op">(</span><span class="va">f_dmta_mkin_tc</span>, est <span class="op">=</span> <span class="st">"saem"</span>,</span>
-<span class="r-in"> control <span class="op">=</span> <span class="fu">nlmixr</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/nlmixr/man/saemControl.html" class="external-link">saemControl</a></span><span class="op">(</span>print <span class="op">=</span> <span class="fl">500</span>, logLik <span class="op">=</span> <span class="cn">TRUE</span>, nmc <span class="op">=</span> <span class="fl">9</span><span class="op">)</span><span class="op">)</span></span>
-<span class="r-in"><span class="op">)</span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in nlmixr(f_dmta_mkin_tc, est = "saem", control = nlmixr::saemControl(print = 500, logLik = TRUE, nmc = 9)):</span> could not find function "nlmixr"</span>
-<span class="r-msg co"><span class="r-pr">#&gt;</span> Timing stopped at: 0 0 0.001</span>
-<span class="r-in"><span class="fu">traceplot</span><span class="op">(</span><span class="va">f_dmta_nlmixr_saem</span><span class="op">$</span><span class="va">nm</span><span class="op">)</span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in traceplot(f_dmta_nlmixr_saem$nm):</span> could not find function "traceplot"</span>
-<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_dmta_nlmixr_saem</span><span class="op">)</span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in summary(f_dmta_nlmixr_saem):</span> object 'f_dmta_nlmixr_saem' not found</span>
-<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_dmta_nlmixr_saem</span><span class="op">)</span></span>
-<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in plot(f_dmta_nlmixr_saem):</span> object 'f_dmta_nlmixr_saem' not found</span>
+<span class="r-in"><span class="va">dmta_sfo_sfo3p_tc</span> <span class="op">&lt;-</span> <span class="fu"><a href="mmkin.html">mmkin</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"SFO-SFO3+"</span> <span class="op">=</span> <span class="va">sfo_sfo3p</span><span class="op">)</span>,</span>
+<span class="r-in"> <span class="va">dmta_ds</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
+<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span></span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;mmkin&gt; object</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Status of individual fits:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> dataset</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> model Calke Borstel Flaach BBA 2.2 BBA 2.3 Elliot</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SFO-SFO3+ OK OK OK OK OK OK </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> OK: No warnings</span>
+<span class="r-in"><span class="co"># The default (test_log_parms = FALSE) gives an undue</span></span>
+<span class="r-in"><span class="co"># influence of ill-defined rate constants that have</span></span>
+<span class="r-in"><span class="co"># extremely small values:</span></span>
+<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="fu"><a href="mixed.html">mixed</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span>, test_log_parms <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span>
+<span class="r-plt img"><img src="dimethenamid_2018-1.png" alt="" width="700" height="433"></span>
+<span class="r-in"><span class="co"># If we disregards ill-defined rate constants, the results</span></span>
+<span class="r-in"><span class="co"># look more plausible, but the truth is likely to be in</span></span>
+<span class="r-in"><span class="co"># between these variants</span></span>
+<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="fu"><a href="mixed.html">mixed</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span>, test_log_parms <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
+<span class="r-plt img"><img src="dimethenamid_2018-2.png" alt="" width="700" height="433"></span>
+<span class="r-in"><span class="co"># Therefore we use nonlinear mixed-effects models</span></span>
+<span class="r-in"><span class="co"># f_dmta_nlme_tc &lt;- nlme(dmta_sfo_sfo3p_tc)</span></span>
+<span class="r-in"><span class="co"># nlme reaches maxIter = 50 without convergence</span></span>
+<span class="r-in"><span class="va">f_dmta_saem_tc</span> <span class="op">&lt;-</span> <span class="fu"><a href="saem.html">saem</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span></span>
+<span class="r-in"><span class="co"># I am commenting out the convergence plot as rendering them</span></span>
+<span class="r-in"><span class="co"># with pkgdown fails (at least without further tweaks to the </span></span>
+<span class="r-in"><span class="co"># graphics device used)</span></span>
+<span class="r-in"><span class="co">#saemix::plot(f_dmta_saem_tc$so, plot.type = "convergence")</span></span>
+<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_dmta_saem_tc</span><span class="op">)</span></span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> saemix version used for fitting: 3.0 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> mkin version used for pre-fitting: 1.1.0 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> R version used for fitting: 4.1.3 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Date of fit: Wed Mar 16 14:32:04 2022 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Date of summary: Wed Mar 16 14:32:04 2022 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Equations:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> d_DMTA/dt = - k_DMTA * DMTA</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> d_M23/dt = + f_DMTA_to_M23 * k_DMTA * DMTA - k_M23 * M23</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> d_M27/dt = + f_DMTA_to_M27 * k_DMTA * DMTA - k_M27 * M27 + k_M31 * M31</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> d_M31/dt = + f_DMTA_to_M31 * k_DMTA * DMTA - k_M31 * M31</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Data:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> 563 observations of 4 variable(s) grouped in 6 datasets</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Model predictions using solution type deSolve </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Fitted in 927.963 s</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Using 300, 100 iterations and 9 chains</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Variance model: Two-component variance function </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Mean of starting values for individual parameters:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA_0 log_k_DMTA log_k_M23 log_k_M27 log_k_M31 f_DMTA_ilr_1 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> 95.5662 -2.9048 -3.8130 -4.1600 -4.1486 0.1341 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_ilr_2 f_DMTA_ilr_3 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> 0.1385 -1.6700 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Fixed degradation parameter values:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> None</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Results:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Likelihood computed by importance sampling</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> AIC BIC logLik</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> 2276 2272 -1120</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Optimised parameters:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> est. lower upper</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA_0 88.5943 84.3961 92.7925</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> log_k_DMTA -3.0466 -3.5609 -2.5322</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> log_k_M23 -4.0684 -4.9340 -3.2029</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> log_k_M27 -3.8628 -4.2627 -3.4628</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> log_k_M31 -3.9803 -4.4804 -3.4801</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_ilr_1 0.1304 -0.2186 0.4795</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_ilr_2 0.1490 -0.2559 0.5540</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_ilr_3 -1.3970 -1.6976 -1.0964</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Correlation: </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA_0 l__DMTA lg__M23 lg__M27 lg__M31 f_DMTA__1 f_DMTA__2</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> log_k_DMTA 0.0309 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> log_k_M23 -0.0231 -0.0031 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> log_k_M27 -0.0381 -0.0048 0.0039 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> log_k_M31 -0.0251 -0.0031 0.0021 0.0830 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_ilr_1 -0.0046 -0.0006 0.0417 -0.0437 0.0328 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_ilr_2 -0.0008 -0.0002 0.0214 -0.0270 -0.0909 -0.0361 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_ilr_3 -0.1832 -0.0135 0.0434 0.0804 0.0395 -0.0070 0.0059 </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Random effects:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> est. lower upper</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SD.DMTA_0 3.3651 -0.9655 7.6956</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SD.log_k_DMTA 0.6415 0.2774 1.0055</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SD.log_k_M23 1.0176 0.3809 1.6543</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SD.log_k_M27 0.4538 0.1522 0.7554</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SD.log_k_M31 0.5684 0.1905 0.9464</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SD.f_DMTA_ilr_1 0.4111 0.1524 0.6699</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SD.f_DMTA_ilr_2 0.4788 0.1808 0.7768</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> SD.f_DMTA_ilr_3 0.3501 0.1316 0.5685</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Variance model:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> est. lower upper</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> a.1 0.9349 0.8395 1.0302</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> b.1 0.1344 0.1176 0.1512</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Backtransformed parameters:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> est. lower upper</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA_0 88.59431 84.396147 92.79246</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> k_DMTA 0.04752 0.028413 0.07948</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> k_M23 0.01710 0.007198 0.04064</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> k_M27 0.02101 0.014084 0.03134</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> k_M31 0.01868 0.011329 0.03080</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_to_M23 0.14498 NA NA</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_to_M27 0.12056 NA NA</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> f_DMTA_to_M31 0.11015 NA NA</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Resulting formation fractions:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> ff</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA_M23 0.1450</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA_M27 0.1206</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA_M31 0.1101</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA_sink 0.6243</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> Estimated disappearance times:</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DT50 DT90</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> DMTA 14.59 48.45</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> M23 40.52 134.62</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> M27 32.99 109.60</span>
+<span class="r-out co"><span class="r-pr">#&gt;</span> M31 37.11 123.26</span>
+<span class="r-in"><span class="co"># As the confidence interval for the random effects of DMTA_0</span></span>
+<span class="r-in"><span class="co"># includes zero, we could try an alternative model without</span></span>
+<span class="r-in"><span class="co"># such random effects</span></span>
+<span class="r-in"><span class="co"># f_dmta_saem_tc_2 &lt;- saem(dmta_sfo_sfo3p_tc,</span></span>
+<span class="r-in"><span class="co"># covariance.model = diag(c(0, rep(1, 7))))</span></span>
+<span class="r-in"><span class="co"># saemix::plot(f_dmta_saem_tc_2$so, plot.type = "convergence")</span></span>
+<span class="r-in"><span class="co"># This does not perform better judged by AIC and BIC</span></span>
+<span class="r-in"><span class="fu">saemix</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/compare.saemix.html" class="external-link">compare.saemix</a></span><span class="op">(</span><span class="va">f_dmta_saem_tc</span><span class="op">$</span><span class="va">so</span>, <span class="va">f_dmta_saem_tc_2</span><span class="op">$</span><span class="va">so</span><span class="op">)</span></span>
+<span class="r-err co"><span class="r-pr">#&gt;</span> <span class="error">Error in saemix::compare.saemix(f_dmta_saem_tc$so, f_dmta_saem_tc_2$so):</span> object 'f_dmta_saem_tc_2' not found</span>
<span class="r-in"><span class="co"># }</span></span>
</code></pre></div>
</div>
diff --git a/man/dimethenamid_2018.Rd b/man/dimethenamid_2018.Rd
index 0d1265be..6c28ab7b 100644
--- a/man/dimethenamid_2018.Rd
+++ b/man/dimethenamid_2018.Rd
@@ -42,42 +42,43 @@ dmta_ds[["Elliot"]] <- rbind(dmta_ds[["Elliot 1"]], dmta_ds[["Elliot 2"]])
dmta_ds[["Elliot 1"]] <- NULL
dmta_ds[["Elliot 2"]] <- NULL
\dontrun{
-dfop_sfo3_plus <- mkinmod(
- DMTA = mkinsub("DFOP", c("M23", "M27", "M31")),
- M23 = mkinsub("SFO"),
- M27 = mkinsub("SFO"),
- M31 = mkinsub("SFO", "M27", sink = FALSE),
- quiet = TRUE
+# We don't use DFOP for the parent compound, as this gives numerical
+# instabilities in the fits
+sfo_sfo3p <- mkinmod(
+ DMTA = mkinsub("SFO", c("M23", "M27", "M31")),
+ M23 = mkinsub("SFO"),
+ M27 = mkinsub("SFO"),
+ M31 = mkinsub("SFO", "M27", sink = FALSE),
+ quiet = TRUE
)
-f_dmta_mkin_tc <- mmkin(
- list("DFOP-SFO3+" = dfop_sfo3_plus),
- dmta_ds, quiet = TRUE, error_model = "tc")
-nlmixr_model(f_dmta_mkin_tc)
-# The focei fit takes about four minutes on my system
-system.time(
- f_dmta_nlmixr_focei <- nlmixr(f_dmta_mkin_tc, est = "focei",
- control = nlmixr::foceiControl(print = 500))
-)
-summary(f_dmta_nlmixr_focei)
-plot(f_dmta_nlmixr_focei)
-# Using saemix takes about 18 minutes
-system.time(
- f_dmta_saemix <- saem(f_dmta_mkin_tc, test_log_parms = TRUE)
-)
-
-# nlmixr with est = "saem" is pretty fast with default iteration numbers, most
-# of the time (about 2.5 minutes) is spent for calculating the log likelihood at the end
-# The likelihood calculated for the nlmixr fit is much lower than that found by saemix
-# Also, the trace plot and the plot of the individual predictions is not
-# convincing for the parent. It seems we are fitting an overparameterised
-# model, so the result we get strongly depends on starting parameters and control settings.
-system.time(
- f_dmta_nlmixr_saem <- nlmixr(f_dmta_mkin_tc, est = "saem",
- control = nlmixr::saemControl(print = 500, logLik = TRUE, nmc = 9))
-)
-traceplot(f_dmta_nlmixr_saem$nm)
-summary(f_dmta_nlmixr_saem)
-plot(f_dmta_nlmixr_saem)
+dmta_sfo_sfo3p_tc <- mmkin(list("SFO-SFO3+" = sfo_sfo3p),
+ dmta_ds, error_model = "tc", quiet = TRUE)
+print(dmta_sfo_sfo3p_tc)
+# The default (test_log_parms = FALSE) gives an undue
+# influence of ill-defined rate constants that have
+# extremely small values:
+plot(mixed(dmta_sfo_sfo3p_tc), test_log_parms = FALSE)
+# If we disregards ill-defined rate constants, the results
+# look more plausible, but the truth is likely to be in
+# between these variants
+plot(mixed(dmta_sfo_sfo3p_tc), test_log_parms = TRUE)
+# Therefore we use nonlinear mixed-effects models
+# f_dmta_nlme_tc <- nlme(dmta_sfo_sfo3p_tc)
+# nlme reaches maxIter = 50 without convergence
+f_dmta_saem_tc <- saem(dmta_sfo_sfo3p_tc)
+# I am commenting out the convergence plot as rendering them
+# with pkgdown fails (at least without further tweaks to the
+# graphics device used)
+#saemix::plot(f_dmta_saem_tc$so, plot.type = "convergence")
+summary(f_dmta_saem_tc)
+# As the confidence interval for the random effects of DMTA_0
+# includes zero, we could try an alternative model without
+# such random effects
+# f_dmta_saem_tc_2 <- saem(dmta_sfo_sfo3p_tc,
+# covariance.model = diag(c(0, rep(1, 7))))
+# saemix::plot(f_dmta_saem_tc_2$so, plot.type = "convergence")
+# This does not perform better judged by AIC and BIC
+saemix::compare.saemix(f_dmta_saem_tc$so, f_dmta_saem_tc_2$so)
}
}
\keyword{datasets}
diff --git a/vignettes/web_only/dimethenamid_2018.rmd b/vignettes/web_only/dimethenamid_2018.rmd
index f86d776e..f34ca3ae 100644
--- a/vignettes/web_only/dimethenamid_2018.rmd
+++ b/vignettes/web_only/dimethenamid_2018.rmd
@@ -385,7 +385,7 @@ model provides the most appropriate description of the decline of the parent
compound in these data. On the other hand, closer inspection of the results
revealed that the variability of the k2 parameter across the population of
soils is ill-defined. This coincides with the observation that this parameter
-cannot robustly be quantified in some for some of the soils.
+cannot robustly be quantified for some of the soils.
Regarding the regulatory use of these data, it is claimed that an improved
characterisation of the mean parameter values across the population is

Contact - Imprint