diff options
63 files changed, 660 insertions, 1348 deletions
diff --git a/docs/404.html b/docs/404.html index e64d5690..29b71104 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="https://pkgdown.jrwb.de/mkin/index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -108,9 +108,6 @@ <li> <a href="articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index 243ebee1..cdd85f43 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -68,9 +68,6 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -100,10 +97,10 @@ <h1 data-toc-skip>Example evaluation of FOCUS Example Dataset D</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2020-05-14</h4> + <h4 class="date">2020-05-27</h4> - <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/FOCUS_D.rmd"><code>vignettes/FOCUS_D.rmd</code></a></small> - <div class="hidden name"><code>FOCUS_D.rmd</code></div> + <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/FOCUS_D.Rmd"><code>vignettes/FOCUS_D.Rmd</code></a></small> + <div class="hidden name"><code>FOCUS_D.Rmd</code></div> </div> @@ -180,8 +177,8 @@ <div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">fit</span>)</pre></body></html></div> <pre><code>## mkin version used for fitting: 0.9.50.2 ## R version used for fitting: 4.0.0 -## Date of fit: Thu May 14 17:07:12 2020 -## Date of summary: Thu May 14 17:07:12 2020 +## Date of fit: Wed May 27 07:05:33 2020 +## Date of summary: Wed May 27 07:05:34 2020 ## ## Equations: ## d_parent/dt = - k_parent * parent @@ -189,7 +186,7 @@ ## ## Model predictions using solution type analytical ## -## Fitted using 421 model solutions performed in 0.167 s +## Fitted using 421 model solutions performed in 0.166 s ## ## Error model: Constant variance ## @@ -228,11 +225,11 @@ ## ## Parameter correlation: ## parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma -## parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -3.214e-07 +## parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -3.190e-07 ## log_k_parent 5.174e-01 1.000e+00 -3.263e-01 -5.426e-01 3.168e-07 -## log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.410e-07 -## f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 5.093e-10 -## sigma -3.214e-07 3.168e-07 -1.410e-07 5.093e-10 1.000e+00 +## log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.406e-07 +## f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 -1.587e-10 +## sigma -3.190e-07 3.168e-07 -1.406e-07 -1.587e-10 1.000e+00 ## ## Backtransformed parameters: ## Confidence intervals for internally transformed parameters are asymmetric. diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html index df5c77c4..2a58b4e5 100644 --- a/docs/articles/FOCUS_L.html +++ b/docs/articles/FOCUS_L.html @@ -68,9 +68,6 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -100,10 +97,10 @@ <h1 data-toc-skip>Example evaluation of FOCUS Laboratory Data L1 to L3</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2020-05-14</h4> + <h4 class="date">2020-05-27</h4> - <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/FOCUS_L.rmd"><code>vignettes/FOCUS_L.rmd</code></a></small> - <div class="hidden name"><code>FOCUS_L.rmd</code></div> + <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/FOCUS_L.Rmd"><code>vignettes/FOCUS_L.Rmd</code></a></small> + <div class="hidden name"><code>FOCUS_L.Rmd</code></div> </div> @@ -126,15 +123,15 @@ <span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L1.SFO</span>)</pre></body></html></div> <pre><code>## mkin version used for fitting: 0.9.50.2 ## R version used for fitting: 4.0.0 -## Date of fit: Thu May 14 17:07:14 2020 -## Date of summary: Thu May 14 17:07:14 2020 +## Date of fit: Wed May 27 07:05:36 2020 +## Date of summary: Wed May 27 07:05:36 2020 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent ## ## Model predictions using solution type analytical ## -## Fitted using 133 model solutions performed in 0.032 s +## Fitted using 133 model solutions performed in 0.031 s ## ## Error model: Constant variance ## @@ -166,9 +163,9 @@ ## ## Parameter correlation: ## parent_0 log_k_parent_sink sigma -## parent_0 1.000e+00 6.186e-01 -1.516e-09 -## log_k_parent_sink 6.186e-01 1.000e+00 -3.124e-09 -## sigma -1.516e-09 -3.124e-09 1.000e+00 +## parent_0 1.000e+00 6.186e-01 -1.712e-09 +## log_k_parent_sink 6.186e-01 1.000e+00 -3.237e-09 +## sigma -1.712e-09 -3.237e-09 1.000e+00 ## ## Backtransformed parameters: ## Confidence intervals for internally transformed parameters are asymmetric. @@ -221,14 +218,14 @@ <div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">m.L1.FOMC</span>, <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>, <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L1 - FOMC"</span>)</pre></body></html></div> <p><img src="FOCUS_L_files/figure-html/unnamed-chunk-6-1.png" width="576"></p> <div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L1.FOMC</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div> -<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre> +<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre> <pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is ## doubtful</code></pre> <pre><code>## mkin version used for fitting: 0.9.50.2 ## R version used for fitting: 4.0.0 -## Date of fit: Thu May 14 17:07:14 2020 -## Date of summary: Thu May 14 17:07:14 2020 +## Date of fit: Wed May 27 07:05:36 2020 +## Date of summary: Wed May 27 07:05:36 2020 ## ## ## Warning: Optimisation did not converge: @@ -240,7 +237,7 @@ ## ## Model predictions using solution type analytical ## -## Fitted using 380 model solutions performed in 0.081 s +## Fitted using 899 model solutions performed in 0.204 s ## ## Error model: Constant variance ## @@ -264,31 +261,31 @@ ## Results: ## ## AIC BIC logLik -## 95.88778 99.44927 -43.94389 +## 95.88835 99.44984 -43.94418 ## ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper -## parent_0 92.47 1.2820 89.720 95.220 -## log_alpha 16.92 NaN NaN NaN -## log_beta 19.26 NaN NaN NaN -## sigma 2.78 0.4501 1.814 3.745 +## parent_0 92.47 1.2800 89.730 95.220 +## log_alpha 10.58 NaN NaN NaN +## log_beta 12.93 NaN NaN NaN +## sigma 2.78 0.4507 1.813 3.747 ## ## Parameter correlation: -## parent_0 log_alpha log_beta sigma -## parent_0 1.000000 NaN NaN 0.002218 -## log_alpha NaN 1 NaN NaN -## log_beta NaN NaN 1 NaN -## sigma 0.002218 NaN NaN 1.000000 +## parent_0 log_alpha log_beta sigma +## parent_0 1.00000 NaN NaN 0.01452 +## log_alpha NaN 1 NaN NaN +## log_beta NaN NaN 1 NaN +## sigma 0.01452 NaN NaN 1.00000 ## ## Backtransformed parameters: ## Confidence intervals for internally transformed parameters are asymmetric. ## t-test (unrealistically) based on the assumption of normal distribution ## for estimators of untransformed parameters. -## Estimate t value Pr(>t) Lower Upper -## parent_0 9.247e+01 NA NA 89.720 95.220 -## alpha 2.223e+07 NA NA NA NA -## beta 2.325e+08 NA NA NA NA -## sigma 2.780e+00 NA NA 1.814 3.745 +## Estimate t value Pr(>t) Lower Upper +## parent_0 92.47 72.13000 1.052e-19 89.730 95.220 +## alpha 39440.00 0.02397 4.906e-01 NA NA +## beta 412500.00 0.02397 4.906e-01 NA NA +## sigma 2.78 6.00000 1.628e-05 1.813 3.747 ## ## FOCUS Chi2 error levels in percent: ## err.min n.optim df @@ -296,8 +293,8 @@ ## parent 3.619 3 6 ## ## Estimated disappearance times: -## DT50 DT90 DT50back -## parent 7.25 24.08 7.25</code></pre> +## DT50 DT90 DT50back +## parent 7.249 24.08 7.249</code></pre> <p>We get a warning that the default optimisation algorithm <code>Port</code> did not converge, which is an indication that the model is overparameterised, <em>i.e.</em> contains too many parameters that are ill-defined as a consequence.</p> <p>And in fact, due to the higher number of parameters, and the lower number of degrees of freedom of the fit, the <span class="math inline">\(\chi^2\)</span> error level is actually higher for the FOMC model (3.6%) than for the SFO model (3.4%). Additionally, the parameters <code>log_alpha</code> and <code>log_beta</code> internally fitted in the model have excessive confidence intervals, that span more than 25 orders of magnitude (!) when backtransformed to the scale of <code>alpha</code> and <code>beta</code>. Also, the t-test for significant difference from zero does not indicate such a significant difference, with p-values greater than 0.1, and finally, the parameter correlation of <code>log_alpha</code> and <code>log_beta</code> is 1.000, clearly indicating that the model is overparameterised.</p> <p>The <span class="math inline">\(\chi^2\)</span> error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same <span class="math inline">\(\chi^2\)</span> error levels as the kinfit package and the calculation routines of the kinfit package have been extensively compared to the results obtained by the KinGUI software, as documented in the kinfit package vignette. KinGUI was the first widely used standard package in this field. Also, the calculation of <span class="math inline">\(\chi^2\)</span> error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt <span class="citation">(Ranke 2014)</span>.</p> @@ -335,8 +332,8 @@ <div class="sourceCode" id="cb17"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L2.FOMC</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div> <pre><code>## mkin version used for fitting: 0.9.50.2 ## R version used for fitting: 4.0.0 -## Date of fit: Thu May 14 17:07:15 2020 -## Date of summary: Thu May 14 17:07:15 2020 +## Date of fit: Wed May 27 07:05:37 2020 +## Date of summary: Wed May 27 07:05:37 2020 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -378,10 +375,10 @@ ## ## Parameter correlation: ## parent_0 log_alpha log_beta sigma -## parent_0 1.000e+00 -1.151e-01 -2.085e-01 -7.436e-09 +## parent_0 1.000e+00 -1.151e-01 -2.085e-01 -7.637e-09 ## log_alpha -1.151e-01 1.000e+00 9.741e-01 -1.617e-07 -## log_beta -2.085e-01 9.741e-01 1.000e+00 -1.386e-07 -## sigma -7.436e-09 -1.617e-07 -1.386e-07 1.000e+00 +## log_beta -2.085e-01 9.741e-01 1.000e+00 -1.387e-07 +## sigma -7.637e-09 -1.617e-07 -1.387e-07 1.000e+00 ## ## Backtransformed parameters: ## Confidence intervals for internally transformed parameters are asymmetric. @@ -414,8 +411,8 @@ <div class="sourceCode" id="cb20"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L2.DFOP</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div> <pre><code>## mkin version used for fitting: 0.9.50.2 ## R version used for fitting: 4.0.0 -## Date of fit: Thu May 14 17:07:15 2020 -## Date of summary: Thu May 14 17:07:15 2020 +## Date of fit: Wed May 27 07:05:37 2020 +## Date of summary: Wed May 27 07:05:37 2020 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -424,7 +421,7 @@ ## ## Model predictions using solution type analytical ## -## Fitted using 572 model solutions performed in 0.131 s +## Fitted using 572 model solutions performed in 0.132 s ## ## Error model: Constant variance ## @@ -455,18 +452,18 @@ ## Optimised, transformed parameters with symmetric confidence intervals: ## Estimate Std. Error Lower Upper ## parent_0 93.9500 9.998e-01 91.5900 96.3100 -## log_k1 3.1370 2.376e+03 -5615.0000 5622.0000 +## log_k1 3.1370 2.376e+03 -5616.0000 5622.0000 ## log_k2 -1.0880 6.285e-02 -1.2370 -0.9394 ## g_ilr -0.2821 7.033e-02 -0.4484 -0.1158 ## sigma 1.4140 2.886e-01 0.7314 2.0960 ## ## Parameter correlation: ## parent_0 log_k1 log_k2 g_ilr sigma -## parent_0 1.000e+00 5.157e-07 2.376e-09 2.665e-01 -6.837e-09 -## log_k1 5.157e-07 1.000e+00 8.434e-05 -1.659e-04 -7.786e-06 -## log_k2 2.376e-09 8.434e-05 1.000e+00 -7.903e-01 -1.263e-08 -## g_ilr 2.665e-01 -1.659e-04 -7.903e-01 1.000e+00 3.248e-08 -## sigma -6.837e-09 -7.786e-06 -1.263e-08 3.248e-08 1.000e+00 +## parent_0 1.000e+00 5.155e-07 2.371e-09 2.665e-01 -6.849e-09 +## log_k1 5.155e-07 1.000e+00 8.434e-05 -1.659e-04 -7.791e-06 +## log_k2 2.371e-09 8.434e-05 1.000e+00 -7.903e-01 -1.262e-08 +## g_ilr 2.665e-01 -1.659e-04 -7.903e-01 1.000e+00 3.241e-08 +## sigma -6.849e-09 -7.791e-06 -1.262e-08 3.241e-08 1.000e+00 ## ## Backtransformed parameters: ## Confidence intervals for internally transformed parameters are asymmetric. @@ -517,8 +514,8 @@ <div class="sourceCode" id="cb24"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L3</span><span class="kw">[[</span><span class="st">"DFOP"</span>, <span class="fl">1</span>]])</pre></body></html></div> <pre><code>## mkin version used for fitting: 0.9.50.2 ## R version used for fitting: 4.0.0 -## Date of fit: Thu May 14 17:07:16 2020 -## Date of summary: Thu May 14 17:07:16 2020 +## Date of fit: Wed May 27 07:05:38 2020 +## Date of summary: Wed May 27 07:05:38 2020 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -565,11 +562,11 @@ ## ## Parameter correlation: ## parent_0 log_k1 log_k2 g_ilr sigma -## parent_0 1.000e+00 1.732e-01 2.282e-02 4.009e-01 -6.868e-07 -## log_k1 1.732e-01 1.000e+00 4.945e-01 -5.809e-01 3.175e-07 -## log_k2 2.282e-02 4.945e-01 1.000e+00 -6.812e-01 7.631e-07 -## g_ilr 4.009e-01 -5.809e-01 -6.812e-01 1.000e+00 -8.694e-07 -## sigma -6.868e-07 3.175e-07 7.631e-07 -8.694e-07 1.000e+00 +## parent_0 1.000e+00 1.732e-01 2.282e-02 4.009e-01 -6.872e-07 +## log_k1 1.732e-01 1.000e+00 4.945e-01 -5.809e-01 3.200e-07 +## log_k2 2.282e-02 4.945e-01 1.000e+00 -6.812e-01 7.673e-07 +## g_ilr 4.009e-01 -5.809e-01 -6.812e-01 1.000e+00 -8.731e-07 +## sigma -6.872e-07 3.200e-07 7.673e-07 -8.731e-07 1.000e+00 ## ## Backtransformed parameters: ## Confidence intervals for internally transformed parameters are asymmetric. @@ -626,8 +623,8 @@ <div class="sourceCode" id="cb29"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L4</span><span class="kw">[[</span><span class="st">"SFO"</span>, <span class="fl">1</span>]], <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div> <pre><code>## mkin version used for fitting: 0.9.50.2 ## R version used for fitting: 4.0.0 -## Date of fit: Thu May 14 17:07:16 2020 -## Date of summary: Thu May 14 17:07:16 2020 +## Date of fit: Wed May 27 07:05:38 2020 +## Date of summary: Wed May 27 07:05:38 2020 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent @@ -666,9 +663,9 @@ ## ## Parameter correlation: ## parent_0 log_k_parent_sink sigma -## parent_0 1.000e+00 5.938e-01 3.387e-07 -## log_k_parent_sink 5.938e-01 1.000e+00 5.830e-07 -## sigma 3.387e-07 5.830e-07 1.000e+00 +## parent_0 1.000e+00 5.938e-01 3.440e-07 +## log_k_parent_sink 5.938e-01 1.000e+00 5.885e-07 +## sigma 3.440e-07 5.885e-07 1.000e+00 ## ## Backtransformed parameters: ## Confidence intervals for internally transformed parameters are asymmetric. @@ -690,8 +687,8 @@ <div class="sourceCode" id="cb31"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L4</span><span class="kw">[[</span><span class="st">"FOMC"</span>, <span class="fl">1</span>]], <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div> <pre><code>## mkin version used for fitting: 0.9.50.2 ## R version used for fitting: 4.0.0 -## Date of fit: Thu May 14 17:07:16 2020 -## Date of summary: Thu May 14 17:07:16 2020 +## Date of fit: Wed May 27 07:05:38 2020 +## Date of summary: Wed May 27 07:05:38 2020 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent @@ -733,10 +730,10 @@ ## ## Parameter correlation: ## parent_0 log_alpha log_beta sigma -## parent_0 1.000e+00 -4.696e-01 -5.543e-01 -2.456e-07 -## log_alpha -4.696e-01 1.000e+00 9.889e-01 2.169e-08 -## log_beta -5.543e-01 9.889e-01 1.000e+00 4.910e-08 -## sigma -2.456e-07 2.169e-08 4.910e-08 1.000e+00 +## parent_0 1.000e+00 -4.696e-01 -5.543e-01 -2.563e-07 +## log_alpha -4.696e-01 1.000e+00 9.889e-01 4.066e-08 +## log_beta -5.543e-01 9.889e-01 1.000e+00 6.818e-08 +## sigma -2.563e-07 4.066e-08 6.818e-08 1.000e+00 ## ## Backtransformed parameters: ## Confidence intervals for internally transformed parameters are asymmetric. diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png Binary files differindex db54326e..2e5071d9 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png Binary files differindex bfa271dd..16235059 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png diff --git a/docs/articles/index.html b/docs/articles/index.html index 7b003598..6f97722c 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -71,7 +71,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -108,9 +108,6 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -157,7 +154,7 @@ <dd></dt> <dt><a href="web_only/NAFTA_examples.html">Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance</a></dt> <dd></dt> - <dt><a href="web_only/benchmarks.html">Benchmark timings for mkin</a></dt> + <dt><a href="web_only/benchmarks.html">Benchmark timings for mkin on various systems</a></dt> <dd></dt> <dt><a href="web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></dt> <dd></dt> diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html index 37b7b1a1..5f858d57 100644 --- a/docs/articles/mkin.html +++ b/docs/articles/mkin.html @@ -68,9 +68,6 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -100,10 +97,10 @@ <h1 data-toc-skip>Introduction to mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2020-05-14</h4> + <h4 class="date">2020-05-27</h4> - <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/mkin.rmd"><code>vignettes/mkin.rmd</code></a></small> - <div class="hidden name"><code>mkin.rmd</code></div> + <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/mkin.Rmd"><code>vignettes/mkin.Rmd</code></a></small> + <div class="hidden name"><code>mkin.Rmd</code></div> </div> @@ -142,7 +139,7 @@ <span class="co"># Plot the results separately for parent and metabolites</span> <span class="fu"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">f_SFO_SFO_SFO</span>, <span class="kw">lpos</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"topright"</span>, <span class="st">"bottomright"</span>, <span class="st">"bottomright"</span>))</pre></body></html></div> -<p><img src="mkin_files/figure-html/unnamed-chunk-2-1.png" width="768"></p> +<p><img src="../docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png" width="768"></p> </div> <div id="background" class="section level1"> <h1 class="hasAnchor"> diff --git a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png Binary files differdeleted file mode 100644 index bdc067c1..00000000 --- a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png +++ /dev/null diff --git a/docs/articles/twa.html b/docs/articles/twa.html index c231e17d..e70205f2 100644 --- a/docs/articles/twa.html +++ b/docs/articles/twa.html @@ -68,9 +68,6 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -100,10 +97,10 @@ <h1 data-toc-skip>Calculation of time weighted average concentrations with mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2020-05-14</h4> + <h4 class="date">2020-05-27</h4> - <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/twa.rmd"><code>vignettes/twa.rmd</code></a></small> - <div class="hidden name"><code>twa.rmd</code></div> + <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/twa.Rmd"><code>vignettes/twa.Rmd</code></a></small> + <div class="hidden name"><code>twa.Rmd</code></div> </div> diff --git a/docs/articles/web_only/FOCUS_Z.html b/docs/articles/web_only/FOCUS_Z.html index 3427afb6..ccbfcc86 100644 --- a/docs/articles/web_only/FOCUS_Z.html +++ b/docs/articles/web_only/FOCUS_Z.html @@ -68,9 +68,6 @@ <li> <a href="../../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -100,10 +97,10 @@ <h1 data-toc-skip>Example evaluation of FOCUS dataset Z</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2020-05-14</h4> + <h4 class="date">2020-05-27</h4> - <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/FOCUS_Z.rmd"><code>vignettes/web_only/FOCUS_Z.rmd</code></a></small> - <div class="hidden name"><code>FOCUS_Z.rmd</code></div> + <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/FOCUS_Z.Rmd"><code>vignettes/web_only/FOCUS_Z.Rmd</code></a></small> + <div class="hidden name"><code>FOCUS_Z.Rmd</code></div> </div> @@ -216,25 +213,25 @@ <div class="sourceCode" id="cb33"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.FOCUS</span>)</pre></body></html></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png" width="700"></p> <div class="sourceCode" id="cb34"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.FOCUS</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div> -<pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper -## Z0_0 96.838721 1.994275 48.5584 4.0283e-42 92.826878 100.850563 -## k_Z0 2.215400 0.118459 18.7019 1.0414e-23 1.989462 2.466998 -## k_Z1 0.478301 0.028257 16.9267 6.2411e-22 0.424705 0.538662 -## k_Z2 0.451623 0.042138 10.7176 1.6313e-14 0.374336 0.544867 -## k_Z3 0.058694 0.015246 3.8499 1.7804e-04 0.034809 0.098967 -## f_Z2_to_Z3 0.471510 0.058352 8.0804 9.6640e-11 0.357775 0.588283 -## sigma 3.984431 0.383402 10.3923 4.5575e-14 3.213126 4.755736</code></pre> +<pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper +## Z0_0 96.840695 1.994285 48.5591 4.0254e-42 92.828744 100.85265 +## k_Z0 2.215467 0.118463 18.7018 1.0417e-23 1.989524 2.46707 +## k_Z1 0.478325 0.028259 16.9265 6.2441e-22 0.424725 0.53869 +## k_Z2 0.451638 0.042139 10.7177 1.6309e-14 0.374346 0.54489 +## k_Z3 0.058692 0.015245 3.8498 1.7807e-04 0.034806 0.09897 +## f_Z2_to_Z3 0.471484 0.058348 8.0805 9.6599e-11 0.357736 0.58827 +## sigma 3.984431 0.383402 10.3923 4.5576e-14 3.213126 4.75574</code></pre> <div class="sourceCode" id="cb36"><html><body><pre class="r"><span class="fu"><a href="../../reference/endpoints.html">endpoints</a></span>(<span class="no">m.Z.FOCUS</span>)</pre></body></html></div> <pre><code>## $ff ## Z2_Z3 Z2_sink -## 0.47151 0.52849 +## 0.47148 0.52852 ## ## $distimes ## DT50 DT90 -## Z0 0.31288 1.0394 -## Z1 1.44919 4.8141 -## Z2 1.53479 5.0985 -## Z3 11.80955 39.2305</code></pre> +## Z0 0.31287 1.0393 +## Z1 1.44911 4.8138 +## Z2 1.53474 5.0983 +## Z3 11.80989 39.2316</code></pre> <p>This fit corresponds to the final result chosen in Appendix 7 of the FOCUS report. Confidence intervals returned by mkin are based on internally transformed parameters, however.</p> </div> <div id="using-the-sforb-model" class="section level1"> @@ -313,11 +310,11 @@ ## ## $SFORB ## Z0_b1 Z0_b2 Z3_b1 Z3_b2 -## 2.4471358 0.0075126 0.0800073 0.0000000 +## 2.4471337 0.0075125 0.0800071 0.0000000 ## ## $distimes ## DT50 DT90 DT50_Z0_b1 DT50_Z0_b2 DT50_Z3_b1 DT50_Z3_b2 -## Z0 0.3043 1.1848 0.28325 92.265 NA NA +## Z0 0.3043 1.1848 0.28325 92.266 NA NA ## Z1 1.5148 5.0320 NA NA NA NA ## Z2 1.6414 5.4526 NA NA NA NA ## Z3 NA NA NA NA 8.6636 Inf</code></pre> diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png Binary files differindex d3702fb6..96738dd0 100644 --- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png +++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png Binary files differindex 4a6fce4f..4f3c2554 100644 --- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png +++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png Binary files differindex dd6537b7..b8c3ed26 100644 --- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png +++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png Binary files differindex b986c30b..132a7317 100644 --- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png +++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png Binary files differindex 47d806c0..b25bf26a 100644 --- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png +++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png diff --git a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png Binary files differindex 0c698299..dd5d89cd 100644 --- a/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png +++ b/docs/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png diff --git a/docs/articles/web_only/NAFTA_examples.html b/docs/articles/web_only/NAFTA_examples.html index 46cb7aa5..b91e7ee7 100644 --- a/docs/articles/web_only/NAFTA_examples.html +++ b/docs/articles/web_only/NAFTA_examples.html @@ -68,9 +68,6 @@ <li> <a href="../../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -100,10 +97,10 @@ <h1 data-toc-skip>Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2020-05-14</h4> + <h4 class="date">2020-05-27</h4> - <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/NAFTA_examples.rmd"><code>vignettes/web_only/NAFTA_examples.rmd</code></a></small> - <div class="hidden name"><code>NAFTA_examples.rmd</code></div> + <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/NAFTA_examples.Rmd"><code>vignettes/web_only/NAFTA_examples.Rmd</code></a></small> + <div class="hidden name"><code>NAFTA_examples.Rmd</code></div> </div> @@ -153,7 +150,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 9.99e+01 1.41e-26 98.8116 101.0810 ## k1 2.67e-02 5.05e-06 0.0243 0.0295 -## k2 2.17e-12 5.00e-01 0.0000 Inf +## k2 2.86e-12 5.00e-01 0.0000 Inf ## g 6.47e-01 3.67e-06 0.6248 0.6677 ## sigma 1.27e+00 8.91e-06 0.8395 1.6929 ## @@ -162,7 +159,7 @@ ## DT50 DT90 DT50_rep ## SFO 67.7 2.25e+02 6.77e+01 ## IORE 58.2 1.07e+03 3.22e+02 -## DFOP 55.5 5.83e+11 3.20e+11 +## DFOP 55.5 4.42e+11 2.42e+11 ## ## Representative half-life: ## [1] 321.51</code></pre> @@ -201,7 +198,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 9.84e+01 1.24e-27 97.8078 98.9187 ## k1 1.55e-02 4.10e-04 0.0143 0.0167 -## k2 1.04e-11 5.00e-01 0.0000 Inf +## k2 1.16e-11 5.00e-01 0.0000 Inf ## g 6.89e-01 2.92e-03 0.6626 0.7142 ## sigma 6.48e-01 2.38e-05 0.4147 0.8813 ## @@ -210,7 +207,7 @@ ## DT50 DT90 DT50_rep ## SFO 86.6 2.88e+02 8.66e+01 ## IORE 85.5 7.17e+02 2.16e+02 -## DFOP 83.6 1.09e+11 6.67e+10 +## DFOP 83.6 9.80e+10 5.98e+10 ## ## Representative half-life: ## [1] 215.87</code></pre> @@ -249,7 +246,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 9.66e+01 1.57e-25 95.3476 97.8979 ## k1 2.55e-02 7.33e-06 0.0233 0.0278 -## k2 3.88e-11 5.00e-01 0.0000 Inf +## k2 4.90e-11 5.00e-01 0.0000 Inf ## g 8.61e-01 7.55e-06 0.8314 0.8867 ## sigma 1.46e+00 6.93e-06 0.9661 1.9483 ## @@ -258,7 +255,7 @@ ## DT50 DT90 DT50_rep ## SFO 38.6 1.28e+02 3.86e+01 ## IORE 34.0 1.77e+02 5.32e+01 -## DFOP 34.1 8.42e+09 1.79e+10 +## DFOP 34.1 6.66e+09 1.41e+10 ## ## Representative half-life: ## [1] 53.17</code></pre> @@ -297,7 +294,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 9.89e+01 9.44e-49 95.4640 102.2573 ## k1 1.81e-02 1.75e-01 0.0116 0.0281 -## k2 2.30e-10 5.00e-01 0.0000 Inf +## k2 1.97e-10 5.00e-01 0.0000 Inf ## g 6.06e-01 2.19e-01 0.4826 0.7178 ## sigma 7.40e+00 2.97e-15 6.0201 8.7754 ## @@ -306,7 +303,7 @@ ## DT50 DT90 DT50_rep ## SFO 94.3 3.13e+02 9.43e+01 ## IORE 96.7 1.51e+03 4.55e+02 -## DFOP 96.4 5.95e+09 3.01e+09 +## DFOP 96.4 6.97e+09 3.52e+09 ## ## Representative half-life: ## [1] 454.55</code></pre> @@ -402,7 +399,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 9.85e+01 2.54e-20 97.390 99.672 ## k1 1.38e-01 3.52e-05 0.131 0.146 -## k2 6.69e-13 5.00e-01 0.000 Inf +## k2 6.02e-13 5.00e-01 0.000 Inf ## g 6.52e-01 8.13e-06 0.642 0.661 ## sigma 7.88e-01 6.13e-02 0.481 1.095 ## @@ -411,7 +408,7 @@ ## DT50 DT90 DT50_rep ## SFO 16.9 5.63e+01 1.69e+01 ## IORE 11.6 3.37e+02 1.01e+02 -## DFOP 10.5 1.86e+12 1.04e+12 +## DFOP 10.5 2.07e+12 1.15e+12 ## ## Representative half-life: ## [1] 101.43</code></pre> @@ -421,11 +418,16 @@ <h2 class="hasAnchor"> <a href="#example-on-page-9-lower-panel" class="anchor"></a>Example on page 9, lower panel</h2> <div class="sourceCode" id="cb37"><html><body><pre class="r"><span class="no">p9b</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p9b"</span>]])</pre></body></html></div> +<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre> +<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is +## doubtful</code></pre> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb40"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p9b</span>)</pre></body></html></div> +<div class="sourceCode" id="cb44"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p9b</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p9b-1.png" width="700"></p> -<div class="sourceCode" id="cb41"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p9b</span>)</pre></body></html></div> +<div class="sourceCode" id="cb45"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p9b</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 35.64867 23.22334 35.64867 @@ -452,7 +454,7 @@ ## parent_0 94.7123 1.61e-16 93.1355 96.2891 ## k1 0.0389 1.43e-06 0.0312 0.0485 ## k2 0.0389 6.67e-03 0.0186 0.0812 -## g 0.7742 5.00e-01 0.0000 1.0000 +## g 0.7742 NaN NA NA ## sigma 1.5957 2.50e-04 0.9135 2.2779 ## ## @@ -469,12 +471,12 @@ <div id="example-on-page-10" class="section level2"> <h2 class="hasAnchor"> <a href="#example-on-page-10" class="anchor"></a>Example on page 10</h2> -<div class="sourceCode" id="cb43"><html><body><pre class="r"><span class="no">p10</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p10"</span>]])</pre></body></html></div> +<div class="sourceCode" id="cb47"><html><body><pre class="r"><span class="no">p10</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p10"</span>]])</pre></body></html></div> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb46"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p10</span>)</pre></body></html></div> +<div class="sourceCode" id="cb50"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p10</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p10-1.png" width="700"></p> -<div class="sourceCode" id="cb47"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p10</span>)</pre></body></html></div> +<div class="sourceCode" id="cb51"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p10</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 899.4089 336.4348 899.4089 @@ -497,12 +499,12 @@ ## sigma 4.90 1.77e-04 2.837 6.968 ## ## $DFOP -## Estimate Pr(>t) Lower Upper -## parent_0 101.7315 1.41e-09 91.6534 111.810 -## k1 0.0495 6.48e-04 0.0303 0.081 -## k2 0.0495 1.67e-02 0.0201 0.122 -## g 0.6634 5.00e-01 0.0000 1.000 -## sigma 8.0152 2.50e-04 4.5886 11.442 +## Estimate Pr(>t) Lower Upper +## parent_0 101.7315 1.41e-09 91.6534 111.8097 +## k1 0.0495 6.42e-04 0.0301 0.0814 +## k2 0.0495 1.66e-02 0.0200 0.1225 +## g 0.6634 5.00e-01 0.0000 1.0000 +## sigma 8.0152 2.50e-04 4.5886 11.4418 ## ## ## DTx values: @@ -522,12 +524,12 @@ <div id="example-on-page-11" class="section level2"> <h2 class="hasAnchor"> <a href="#example-on-page-11" class="anchor"></a>Example on page 11</h2> -<div class="sourceCode" id="cb49"><html><body><pre class="r"><span class="no">p11</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p11"</span>]])</pre></body></html></div> +<div class="sourceCode" id="cb53"><html><body><pre class="r"><span class="no">p11</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p11"</span>]])</pre></body></html></div> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb52"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p11</span>)</pre></body></html></div> +<div class="sourceCode" id="cb56"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p11</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p11-1.png" width="700"></p> -<div class="sourceCode" id="cb53"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p11</span>)</pre></body></html></div> +<div class="sourceCode" id="cb57"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p11</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 579.6805 204.7932 144.7783 @@ -565,7 +567,7 @@ ## DFOP 4.21e+11 2.64e+12 9.56e+11 ## ## Representative half-life: -## [1] 41148171</code></pre> +## [1] 41148169</code></pre> <p>In this case, the DFOP fit reported for PestDF resulted in a negative value for the slower rate constant, which is not possible in mkin. The other results are in agreement.</p> </div> </div> @@ -576,14 +578,14 @@ <div id="example-on-page-12-upper-panel" class="section level2"> <h2 class="hasAnchor"> <a href="#example-on-page-12-upper-panel" class="anchor"></a>Example on page 12, upper panel</h2> -<div class="sourceCode" id="cb55"><html><body><pre class="r"><span class="no">p12a</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p12a"</span>]])</pre></body></html></div> +<div class="sourceCode" id="cb59"><html><body><pre class="r"><span class="no">p12a</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p12a"</span>]])</pre></body></html></div> <pre><code>## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance ## matrix</code></pre> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb59"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p12a</span>)</pre></body></html></div> +<div class="sourceCode" id="cb63"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p12a</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p12a-1.png" width="700"></p> -<div class="sourceCode" id="cb60"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p12a</span>)</pre></body></html></div> +<div class="sourceCode" id="cb64"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p12a</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 695.4440 220.0685 695.4440 @@ -608,8 +610,8 @@ ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 100.521 2.74e-10 92.2366 108.805 -## k1 0.124 5.75e-06 0.0958 0.161 -## k2 0.124 6.72e-02 0.0319 0.484 +## k1 0.124 5.74e-06 0.0958 0.161 +## k2 0.124 6.61e-02 0.0319 0.484 ## g 0.877 5.00e-01 0.0000 1.000 ## sigma 7.048 2.50e-04 4.0349 10.061 ## @@ -626,20 +628,20 @@ <div id="example-on-page-12-lower-panel" class="section level2"> <h2 class="hasAnchor"> <a href="#example-on-page-12-lower-panel" class="anchor"></a>Example on page 12, lower panel</h2> -<div class="sourceCode" id="cb62"><html><body><pre class="r"><span class="no">p12b</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p12b"</span>]])</pre></body></html></div> -<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in qt(alpha/2, rdf): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in qt(1 - alpha/2, rdf): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in pt(abs(tval), rdf, lower.tail = FALSE): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre> +<div class="sourceCode" id="cb66"><html><body><pre class="r"><span class="no">p12b</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p12b"</span>]])</pre></body></html></div> +<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre> +<pre><code>## Warning in qt(alpha/2, rdf): NaNs produced</code></pre> +<pre><code>## Warning in qt(1 - alpha/2, rdf): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs produced</code></pre> +<pre><code>## Warning in pt(abs(tval), rdf, lower.tail = FALSE): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre> <pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is ## doubtful</code></pre> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb72"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p12b</span>)</pre></body></html></div> +<div class="sourceCode" id="cb76"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p12b</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p12b-1.png" width="700"></p> -<div class="sourceCode" id="cb73"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p12b</span>)</pre></body></html></div> +<div class="sourceCode" id="cb77"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p12b</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 58.90242 19.06353 58.90242 @@ -682,12 +684,16 @@ <div id="example-on-page-13" class="section level2"> <h2 class="hasAnchor"> <a href="#example-on-page-13" class="anchor"></a>Example on page 13</h2> -<div class="sourceCode" id="cb75"><html><body><pre class="r"><span class="no">p13</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p13"</span>]])</pre></body></html></div> +<div class="sourceCode" id="cb79"><html><body><pre class="r"><span class="no">p13</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p13"</span>]])</pre></body></html></div> +<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre> +<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is +## doubtful</code></pre> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb78"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p13</span>)</pre></body></html></div> +<div class="sourceCode" id="cb85"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p13</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p13-1.png" width="700"></p> -<div class="sourceCode" id="cb79"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p13</span>)</pre></body></html></div> +<div class="sourceCode" id="cb86"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p13</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 174.5971 142.3951 174.5971 @@ -712,9 +718,9 @@ ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 92.73500 9.25e-15 8.95e+01 9.59e+01 -## k1 0.00258 4.28e-01 1.45e-08 4.61e+02 +## k1 0.00258 4.28e-01 1.70e-08 3.92e+02 ## k2 0.00258 3.69e-08 2.20e-03 3.03e-03 -## g 0.00442 5.00e-01 0.00e+00 1.00e+00 +## g 0.00442 5.00e-01 NA NA ## sigma 3.41172 1.35e-04 2.02e+00 4.80e+00 ## ## @@ -731,16 +737,16 @@ <div id="dt50-not-observed-in-the-study-and-dfop-problems-in-pestdf" class="section level1"> <h1 class="hasAnchor"> <a href="#dt50-not-observed-in-the-study-and-dfop-problems-in-pestdf" class="anchor"></a>DT50 not observed in the study and DFOP problems in PestDF</h1> -<div class="sourceCode" id="cb81"><html><body><pre class="r"><span class="no">p14</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p14"</span>]])</pre></body></html></div> -<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre> +<div class="sourceCode" id="cb88"><html><body><pre class="r"><span class="no">p14</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p14"</span>]])</pre></body></html></div> +<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre> <pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is ## doubtful</code></pre> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb87"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p14</span>)</pre></body></html></div> +<div class="sourceCode" id="cb94"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p14</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p14-1.png" width="700"></p> -<div class="sourceCode" id="cb88"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p14</span>)</pre></body></html></div> +<div class="sourceCode" id="cb95"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p14</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 48.43249 28.67746 27.26248 @@ -766,7 +772,7 @@ ## Estimate Pr(>t) Lower Upper ## parent_0 1.00e+02 2.96e-28 99.40280 101.2768 ## k1 9.53e-03 1.20e-01 0.00638 0.0143 -## k2 7.70e-12 5.00e-01 0.00000 Inf +## k2 7.29e-12 5.00e-01 0.00000 Inf ## g 3.98e-01 2.19e-01 0.30481 0.4998 ## sigma 1.17e+00 7.68e-06 0.77406 1.5610 ## @@ -775,7 +781,7 @@ ## DT50 DT90 DT50_rep ## SFO 2.48e+02 8.25e+02 2.48e+02 ## IORE 4.34e+02 2.22e+04 6.70e+03 -## DFOP 2.41e+10 2.33e+11 9.00e+10 +## DFOP 2.54e+10 2.46e+11 9.51e+10 ## ## Representative half-life: ## [1] 6697.44</code></pre> @@ -784,16 +790,17 @@ <div id="n-is-less-than-1-and-dfop-fraction-parameter-is-below-zero" class="section level1"> <h1 class="hasAnchor"> <a href="#n-is-less-than-1-and-dfop-fraction-parameter-is-below-zero" class="anchor"></a>N is less than 1 and DFOP fraction parameter is below zero</h1> -<div class="sourceCode" id="cb90"><html><body><pre class="r"><span class="no">p15a</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p15a"</span>]])</pre></body></html></div> -<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre> +<div class="sourceCode" id="cb97"><html><body><pre class="r"><span class="no">p15a</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p15a"</span>]])</pre></body></html></div> +<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre> <pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is ## doubtful</code></pre> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb96"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p15a</span>)</pre></body></html></div> +<div class="sourceCode" id="cb104"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p15a</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p15a-1.png" width="700"></p> -<div class="sourceCode" id="cb97"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p15a</span>)</pre></body></html></div> +<div class="sourceCode" id="cb105"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p15a</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 245.5248 135.0132 245.5248 @@ -816,12 +823,12 @@ ## sigma 3.105 1.78e-04 1.795 4.416 ## ## $DFOP -## Estimate Pr(>t) Lower Upper -## parent_0 97.96752 NA 94.21914 101.7159 -## k1 0.00952 NA 0.00241 0.0377 -## k2 0.00952 NA 0.00747 0.0121 -## g 0.17247 NA NA NA -## sigma 4.18778 NA 2.39747 5.9781 +## Estimate Pr(>t) Lower Upper +## parent_0 97.96752 2.85e-13 94.21914 101.7159 +## k1 0.00952 6.80e-02 0.00277 0.0327 +## k2 0.00952 3.82e-06 0.00902 0.0100 +## g 0.17247 NaN NA NA +## sigma 4.18778 2.50e-04 2.39747 5.9781 ## ## ## DTx values: @@ -832,16 +839,16 @@ ## ## Representative half-life: ## [1] 41.33</code></pre> -<div class="sourceCode" id="cb99"><html><body><pre class="r"><span class="no">p15b</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p15b"</span>]])</pre></body></html></div> -<pre><code>## Warning in sqrt(diag(covar)): NaNs wurden erzeugt</code></pre> -<pre><code>## Warning in sqrt(1/diag(V)): NaNs wurden erzeugt</code></pre> +<div class="sourceCode" id="cb107"><html><body><pre class="r"><span class="no">p15b</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p15b"</span>]])</pre></body></html></div> +<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre> +<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre> <pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is ## doubtful</code></pre> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The half-life obtained from the IORE model may be used</code></pre> -<div class="sourceCode" id="cb105"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p15b</span>)</pre></body></html></div> +<div class="sourceCode" id="cb113"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p15b</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p15b-1.png" width="700"></p> -<div class="sourceCode" id="cb106"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p15b</span>)</pre></body></html></div> +<div class="sourceCode" id="cb114"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p15b</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 106.91629 68.55574 106.91629 @@ -858,18 +865,18 @@ ## ## $IORE ## Estimate Pr(>t) Lower Upper -## parent_0 99.83 1.81e-16 97.51348 102.14 +## parent_0 99.83 1.81e-16 97.51349 102.14 ## k__iore_parent_sink 0.38 3.22e-01 0.00352 41.05 -## N_parent 0.00 5.00e-01 -1.07696 1.08 +## N_parent 0.00 5.00e-01 -1.07695 1.08 ## sigma 2.21 2.57e-04 1.23245 3.19 ## ## $DFOP ## Estimate Pr(>t) Lower Upper -## parent_0 1.01e+02 NA 98.24464 1.04e+02 -## k1 4.86e-03 NA 0.00068 3.47e-02 -## k2 4.86e-03 NA 0.00338 6.99e-03 +## parent_0 1.01e+02 NA 9.82e+01 1.04e+02 +## k1 4.86e-03 NA 6.75e-04 3.49e-02 +## k2 4.86e-03 NA 3.37e-03 6.99e-03 ## g 1.50e-01 NA NA NA -## sigma 2.76e+00 NA 1.58208 3.94e+00 +## sigma 2.76e+00 NA 1.58e+00 3.94e+00 ## ## ## DTx values: @@ -885,14 +892,14 @@ <div id="the-dfop-fraction-parameter-is-greater-than-1" class="section level1"> <h1 class="hasAnchor"> <a href="#the-dfop-fraction-parameter-is-greater-than-1" class="anchor"></a>The DFOP fraction parameter is greater than 1</h1> -<div class="sourceCode" id="cb108"><html><body><pre class="r"><span class="no">p16</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p16"</span>]])</pre></body></html></div> +<div class="sourceCode" id="cb116"><html><body><pre class="r"><span class="no">p16</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p16"</span>]])</pre></body></html></div> <pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre> <pre><code>## The representative half-life of the IORE model is longer than the one corresponding</code></pre> <pre><code>## to the terminal degradation rate found with the DFOP model.</code></pre> <pre><code>## The representative half-life obtained from the DFOP model may be used</code></pre> -<div class="sourceCode" id="cb113"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p16</span>)</pre></body></html></div> +<div class="sourceCode" id="cb121"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p16</span>)</pre></body></html></div> <p><img src="NAFTA_examples_files/figure-html/p16-1.png" width="700"></p> -<div class="sourceCode" id="cb114"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p16</span>)</pre></body></html></div> +<div class="sourceCode" id="cb122"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p16</span>)</pre></body></html></div> <pre><code>## Sums of squares: ## SFO IORE DFOP ## 3831.804 2062.008 1550.980 @@ -917,7 +924,7 @@ ## $DFOP ## Estimate Pr(>t) Lower Upper ## parent_0 88.5333 7.40e-18 79.9836 97.083 -## k1 18.5560 5.00e-01 0.0000 Inf +## k1 18.5561 5.00e-01 0.0000 Inf ## k2 0.0776 1.41e-05 0.0518 0.116 ## g 0.4733 1.41e-09 0.3674 0.582 ## sigma 7.1902 2.11e-08 5.2785 9.102 diff --git a/docs/articles/web_only/benchmarks.html b/docs/articles/web_only/benchmarks.html index 97e22303..0698baf6 100644 --- a/docs/articles/web_only/benchmarks.html +++ b/docs/articles/web_only/benchmarks.html @@ -5,13 +5,13 @@ <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<title>Benchmark timings for mkin • mkin</title> +<title>Benchmark timings for mkin on various systems • mkin</title> <!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous"> <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../../bootstrap-toc.css"> <script src="../../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"> <!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet"> -<script src="../../pkgdown.js"></script><meta property="og:title" content="Benchmark timings for mkin"> +<script src="../../pkgdown.js"></script><meta property="og:title" content="Benchmark timings for mkin on various systems"> <meta property="og:description" content="mkin"> <!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> @@ -68,9 +68,6 @@ <li> <a href="../../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -97,47 +94,60 @@ </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header toc-ignore"> - <h1 data-toc-skip>Benchmark timings for mkin</h1> + <h1 data-toc-skip>Benchmark timings for mkin on various systems</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2020-05-14</h4> + <h4 class="date">2020-05-27</h4> - <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/benchmarks.rmd"><code>vignettes/web_only/benchmarks.rmd</code></a></small> - <div class="hidden name"><code>benchmarks.rmd</code></div> + <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/benchmarks.Rmd"><code>vignettes/web_only/benchmarks.Rmd</code></a></small> + <div class="hidden name"><code>benchmarks.Rmd</code></div> </div> -<p>Each system is characterized by its CPU type, the operating system type and the mkin version. Currently only values for one system are available. A compiler was available, so if no analytical solution was available, compiled ODE models are used.</p> -<div id="test-cases" class="section level2"> +<div id="systems" class="section level2"> <h2 class="hasAnchor"> -<a href="#test-cases" class="anchor"></a>Test cases</h2> -<p>Parent only:</p> -<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="no">FOCUS_C</span> <span class="kw"><-</span> <span class="no">FOCUS_2006_C</span> -<span class="no">FOCUS_D</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html">subset</a></span>(<span class="no">FOCUS_2006_D</span>, <span class="no">value</span> <span class="kw">!=</span> <span class="fl">0</span>) -<span class="no">parent_datasets</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_C</span>, <span class="no">FOCUS_D</span>) +<a href="#systems" class="anchor"></a>Systems</h2> +<p>Each system is characterized by its CPU type, the operating system type and the mkin version.</p> +<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="no">cpu_model</span> <span class="kw"><-</span> <span class="kw pkg">benchmarkme</span><span class="kw ns">::</span><span class="fu"><a href="https://rdrr.io/pkg/benchmarkme/man/get_cpu.html">get_cpu</a></span>()$<span class="no">model_name</span> +<span class="no">operating_system</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html">Sys.info</a></span>()<span class="kw">[[</span><span class="st">"sysname"</span>]] +<span class="no">mkin_version</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/character.html">as.character</a></span>(<span class="fu"><a href="https://rdrr.io/r/utils/packageDescription.html">packageVersion</a></span>(<span class="st">"mkin"</span>)) +<span class="no">system_string</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="no">operating_system</span>, <span class="st">", "</span>, <span class="no">cpu_model</span>, <span class="st">", mkin version "</span>, <span class="no">mkin_version</span>) +<span class="fu"><a href="https://rdrr.io/r/base/load.html">load</a></span>(<span class="st">"~/git/mkin/vignettes/web_only/mkin_benchmarks.rda"</span>) +<span class="no">mkin_benchmarks</span>[<span class="no">system_string</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"CPU"</span>, <span class="st">"OS"</span>, <span class="st">"mkin"</span>)] <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">cpu_model</span>, <span class="no">operating_system</span>, <span class="no">mkin_version</span>) -<span class="no">t1</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="no">parent_datasets</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]] -<span class="no">t2</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="no">parent_datasets</span>, - <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div> -<p>One metabolite:</p> -<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="no">SFO_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>( +<span class="kw">if</span> (<span class="no">mkin_version</span> <span class="kw">></span> <span class="st">"0.9.48.1"</span>) { + <span class="no">mmkin_bench</span> <span class="kw"><-</span> <span class="kw">function</span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="no">error_model</span> <span class="kw">=</span> <span class="st">"const"</span>) <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="kw">error_model</span> <span class="kw">=</span> <span class="no">error_model</span>, <span class="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>) +} <span class="kw">else</span> { + <span class="no">mmkin_bench</span> <span class="kw"><-</span> <span class="kw">function</span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="no">error_model</span> <span class="kw">=</span> <span class="kw">NULL</span>) <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span>(<span class="no">models</span>, <span class="no">datasets</span>, <span class="kw">reweight.method</span> <span class="kw">=</span> <span class="no">error_model</span>, <span class="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>) +}</pre></body></html></div> +<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="no">FOCUS_C</span> <span class="kw"><-</span> <span class="no">FOCUS_2006_C</span> +<span class="no">FOCUS_D</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html">subset</a></span>(<span class="no">FOCUS_2006_D</span>, <span class="no">value</span> <span class="kw">!=</span> <span class="fl">0</span>) +<span class="co"># Parent only</span> +<span class="no">t1</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_C</span>, <span class="no">FOCUS_D</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]] +<span class="no">t2</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_C</span>, <span class="no">FOCUS_D</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div> +<pre><code>## Warning in mkinfit(models[[model_index]], datasets[[dataset_index]], ...): Optimisation did not converge: +## iteration limit reached without convergence (10)</code></pre> +<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="co"># One metabolite</span> +<span class="no">SFO_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>( <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"m1"</span>), - <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>)) -<span class="no">FOMC_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>( + <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div> +<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> +<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="no">FOMC_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>( <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>), - <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>)) -<span class="no">DFOP_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>( + <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div> +<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> +<div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="no">DFOP_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>( <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>), - <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>)) -<span class="no">t3</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]] -<span class="no">t4</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>), - <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]] -<span class="no">t5</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>), - <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div> -<p>Two metabolites, synthetic data:</p> -<div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="no">m_synth_SFO_lin</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M1"</span>), + <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div> +<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> +<div class="sourceCode" id="cb10"><html><body><pre class="r"><span class="no">t3</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]] +<span class="no">t4</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]] +<span class="no">t5</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]] + +<span class="co"># Two metabolites, synthetic data</span> +<span class="no">m_synth_SFO_lin</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M1"</span>), <span class="kw">M1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M2"</span>), <span class="kw">M2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>) @@ -151,194 +161,81 @@ <span class="no">DFOP_par_c</span> <span class="kw"><-</span> <span class="no">synthetic_data_for_UBA_2014</span><span class="kw">[[</span><span class="fl">12</span>]]$<span class="no">data</span> -<span class="no">t6</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]] -<span class="no">t7</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]] +<span class="no">t6</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>)))[<span class="st">"elapsed"</span>] +<span class="no">t7</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>)))[<span class="st">"elapsed"</span>] -<span class="no">t8</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>), - <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]] -<span class="no">t9</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>), - <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]] +<span class="no">t8</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))[<span class="st">"elapsed"</span>] +<span class="no">t9</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))[<span class="st">"elapsed"</span>] -<span class="no">t10</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>), - <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]] -<span class="no">t11</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>), - <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div> -<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="no">mkin_benchmarks</span>[<span class="no">system_string</span>, <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="st">"t"</span>, <span class="fl">1</span>:<span class="fl">11</span>)] <span class="kw"><-</span> - <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">t1</span>, <span class="no">t2</span>, <span class="no">t3</span>, <span class="no">t4</span>, <span class="no">t5</span>, <span class="no">t6</span>, <span class="no">t7</span>, <span class="no">t8</span>, <span class="no">t9</span>, <span class="no">t10</span>, <span class="no">t11</span>) -<span class="fu"><a href="https://rdrr.io/r/base/save.html">save</a></span>(<span class="no">mkin_benchmarks</span>, <span class="kw">file</span> <span class="kw">=</span> <span class="st">"~/git/mkin/vignettes/web_only/mkin_benchmarks.rda"</span>)</pre></body></html></div> -</div> -<div id="results" class="section level2"> -<h2 class="hasAnchor"> -<a href="#results" class="anchor"></a>Results</h2> -<p>Currently, we only have benchmark information on one system, therefore only the mkin version is shown with the results below. Timings are in seconds, shorter is better. All results were obtained by serial, i.e. not using multiple computing cores.</p> -<p>Benchmarks for all available error models are shown.</p> -<div id="parent-only" class="section level3"> -<h3 class="hasAnchor"> -<a href="#parent-only" class="anchor"></a>Parent only</h3> -<p>Constant variance (t1) and two-component error model (t2) for four models fitted to two datasets, i.e. eight fits for each test.</p> -<table class="table"> -<thead><tr class="header"> -<th align="left">mkin version</th> -<th align="right">t1 [s]</th> -<th align="right">t2 [s]</th> -</tr></thead> -<tbody> -<tr class="odd"> -<td align="left">0.9.48.1</td> -<td align="right">3.610</td> -<td align="right">11.019</td> -</tr> -<tr class="even"> -<td align="left">0.9.49.1</td> -<td align="right">8.184</td> -<td align="right">22.889</td> -</tr> -<tr class="odd"> -<td align="left">0.9.49.2</td> -<td align="right">7.064</td> -<td align="right">12.558</td> -</tr> -<tr class="even"> -<td align="left">0.9.49.3</td> -<td align="right">7.296</td> -<td align="right">21.239</td> -</tr> -<tr class="odd"> -<td align="left">0.9.49.4</td> -<td align="right">5.936</td> -<td align="right">20.545</td> -</tr> -<tr class="even"> -<td align="left">0.9.50.2</td> -<td align="right">1.714</td> -<td align="right">3.971</td> -</tr> -</tbody> -</table> -</div> -<div id="one-metabolite" class="section level3"> -<h3 class="hasAnchor"> -<a href="#one-metabolite" class="anchor"></a>One metabolite</h3> -<p>Constant variance (t3), two-component error model (t4), and variance by variable (t5) for three models fitted to one dataset, i.e. three fits for each test.</p> -<table class="table"> -<thead><tr class="header"> -<th align="left">mkin version</th> -<th align="right">t3 [s]</th> -<th align="right">t4 [s]</th> -<th align="right">t5 [s]</th> -</tr></thead> -<tbody> -<tr class="odd"> -<td align="left">0.9.48.1</td> -<td align="right">3.764</td> -<td align="right">14.347</td> -<td align="right">9.495</td> -</tr> -<tr class="even"> -<td align="left">0.9.49.1</td> -<td align="right">4.649</td> -<td align="right">13.789</td> -<td align="right">6.395</td> -</tr> -<tr class="odd"> -<td align="left">0.9.49.2</td> -<td align="right">4.786</td> -<td align="right">8.461</td> -<td align="right">5.675</td> -</tr> -<tr class="even"> -<td align="left">0.9.49.3</td> -<td align="right">4.510</td> -<td align="right">13.805</td> -<td align="right">7.386</td> -</tr> -<tr class="odd"> -<td align="left">0.9.49.4</td> -<td align="right">4.446</td> -<td align="right">15.335</td> -<td align="right">6.002</td> -</tr> -<tr class="even"> -<td align="left">0.9.50.2</td> -<td align="right">1.402</td> -<td align="right">6.174</td> -<td align="right">2.764</td> -</tr> -</tbody> -</table> -</div> -<div id="two-metabolites" class="section level3"> -<h3 class="hasAnchor"> -<a href="#two-metabolites" class="anchor"></a>Two metabolites</h3> -<p>Constant variance (t6 and t7), two-component error model (t8 and t9), and variance by variable (t10 and t11) for one model fitted to one dataset, i.e. one fit for each test.</p> -<table class="table"> -<thead><tr class="header"> -<th align="left">mkin version</th> -<th align="right">t6 [s]</th> -<th align="right">t7 [s]</th> -<th align="right">t8 [s]</th> -<th align="right">t9 [s]</th> -<th align="right">t10 [s]</th> -<th align="right">t11 [s]</th> -</tr></thead> -<tbody> -<tr class="odd"> -<td align="left">0.9.48.1</td> -<td align="right">2.623</td> -<td align="right">4.587</td> -<td align="right">7.525</td> -<td align="right">16.621</td> -<td align="right">8.576</td> -<td align="right">31.267</td> -</tr> -<tr class="even"> -<td align="left">0.9.49.1</td> -<td align="right">2.542</td> -<td align="right">4.128</td> -<td align="right">4.632</td> -<td align="right">8.171</td> -<td align="right">3.676</td> -<td align="right">5.636</td> -</tr> -<tr class="odd"> -<td align="left">0.9.49.2</td> -<td align="right">2.723</td> -<td align="right">4.478</td> -<td align="right">4.862</td> -<td align="right">7.618</td> -<td align="right">3.579</td> -<td align="right">5.574</td> -</tr> -<tr class="even"> -<td align="left">0.9.49.3</td> -<td align="right">2.643</td> -<td align="right">4.374</td> -<td align="right">7.020</td> -<td align="right">11.124</td> -<td align="right">5.388</td> -<td align="right">7.365</td> -</tr> -<tr class="odd"> -<td align="left">0.9.49.4</td> -<td align="right">2.635</td> -<td align="right">4.259</td> -<td align="right">4.737</td> -<td align="right">7.763</td> -<td align="right">3.427</td> -<td align="right">5.626</td> -</tr> -<tr class="even"> -<td align="left">0.9.50.2</td> -<td align="right">0.777</td> -<td align="right">1.236</td> -<td align="right">1.332</td> -<td align="right">2.872</td> -<td align="right">2.069</td> -<td align="right">2.987</td> -</tr> -</tbody> -</table> -</div> +<span class="no">t10</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))[<span class="st">"elapsed"</span>] +<span class="no">t11</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>), <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))[<span class="st">"elapsed"</span>] + +<span class="no">mkin_benchmarks</span>[<span class="no">system_string</span>, <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="st">"t"</span>, <span class="fl">1</span>:<span class="fl">11</span>)] <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">t1</span>, <span class="no">t2</span>, <span class="no">t3</span>, <span class="no">t4</span>, <span class="no">t5</span>, <span class="no">t6</span>, <span class="no">t7</span>, <span class="no">t8</span>, <span class="no">t9</span>, <span class="no">t10</span>, <span class="no">t11</span>) +<span class="no">mkin_benchmarks</span>[, -<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">1</span>:<span class="fl">3</span>)]</pre></body></html></div> +<pre><code>## t1 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 3.610 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 8.184 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 7.064 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.296 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.936 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 1.679 +## t2 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 11.019 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 22.889 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 12.558 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 21.239 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 20.545 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 3.613 +## t3 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 3.764 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 4.649 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 4.786 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 4.510 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.446 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 1.366 +## t4 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 14.347 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 13.789 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 8.461 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 13.805 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 15.335 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 6.545 +## t5 t6 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 9.495 2.623 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 6.395 2.542 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 5.675 2.723 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.386 2.643 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 6.002 2.635 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 2.709 0.752 +## t7 t8 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 4.587 7.525 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 4.128 4.632 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 4.478 4.862 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 4.374 7.02 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 4.259 4.737 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 1.214 1.455 +## t9 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 16.621 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 8.171 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 7.618 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 11.124 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 7.763 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 4.196 +## t10 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 8.576 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 3.676 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 3.579 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 5.388 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 3.427 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 1.996 +## t11 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.48.1 31.267 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.1 5.636 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.2 5.574 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.3 7.365 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.49.4 5.626 +## Linux, AMD Ryzen 7 1700 Eight-Core Processor, mkin version 0.9.50.2 3.1</code></pre> +<div class="sourceCode" id="cb12"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/save.html">save</a></span>(<span class="no">mkin_benchmarks</span>, <span class="kw">file</span> <span class="kw">=</span> <span class="st">"~/git/mkin/vignettes/mkin_benchmarks.rda"</span>)</pre></body></html></div> </div> </div> diff --git a/docs/articles/web_only/compiled_models.html b/docs/articles/web_only/compiled_models.html index 837b288b..5aaa09bc 100644 --- a/docs/articles/web_only/compiled_models.html +++ b/docs/articles/web_only/compiled_models.html @@ -68,9 +68,6 @@ <li> <a href="../../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -100,10 +97,10 @@ <h1 data-toc-skip>Performance benefit by using compiled model definitions in mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2020-05-14</h4> + <h4 class="date">2020-05-27</h4> - <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/compiled_models.rmd"><code>vignettes/web_only/compiled_models.rmd</code></a></small> - <div class="hidden name"><code>compiled_models.rmd</code></div> + <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/compiled_models.Rmd"><code>vignettes/web_only/compiled_models.Rmd</code></a></small> + <div class="hidden name"><code>compiled_models.Rmd</code></div> </div> @@ -122,57 +119,56 @@ <p>into your .Rprofile startup file. This is just a text file with some R code that is executed when your R session starts. It has to be named .Rprofile and has to be located in your home directory, which will generally be your Documents folder. You can check the location of the home directory used by R by issuing</p> <div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html">Sys.getenv</a></span>(<span class="st">"HOME"</span>)</pre></body></html></div> </div> -<div id="comparison-with-other-solution-methods" class="section level2"> +<div id="comparison-with-eigenvalue-based-solutions" class="section level2"> <h2 class="hasAnchor"> -<a href="#comparison-with-other-solution-methods" class="anchor"></a>Comparison with other solution methods</h2> -<p>First, we build a simple degradation model for a parent compound with one metabolite, and we remove zero values from the dataset.</p> +<a href="#comparison-with-eigenvalue-based-solutions" class="anchor"></a>Comparison with Eigenvalue based solutions</h2> +<p>First, we build a simple degradation model for a parent compound with one metabolite.</p> <div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="st">"mkin"</span>, <span class="kw">quietly</span> <span class="kw">=</span> <span class="fl">TRUE</span>) <span class="no">SFO_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>( <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"m1"</span>), <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="no">FOCUS_D</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html">subset</a></span>(<span class="no">FOCUS_2006_D</span>, <span class="no">value</span> <span class="kw">!=</span> <span class="fl">0</span>)</pre></body></html></div> -<p>We can compare the performance of the Eigenvalue based solution against the compiled version and the R implementation of the differential equations using the benchmark package. In the output of below code, the warnings about zero being removed from the FOCUS D dataset are suppressed. Since mkin version 0.9.49.11, an analytical solution is also implemented, which is included in the tests below.</p> -<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="kw">if</span> (<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="no">rbenchmark</span>)) { +<p>We can compare the performance of the Eigenvalue based solution against the compiled version and the R implementation of the differential equations using the benchmark package. In the output of below code, the warnings about zero being removed from the FOCUS D dataset are suppressed.</p> +<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="kw">if</span> (<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="no">rbenchmark</span>)) { <span class="no">b.1</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html">benchmark</a></span>( - <span class="st">"deSolve, not compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>, - <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"deSolve"</span>, - <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), - <span class="st">"Eigenvalue based"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>, - <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"eigen"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), - <span class="st">"deSolve, compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>, - <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"deSolve"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), - <span class="st">"analytical"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>, - <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"analytical"</span>, - <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), - <span class="kw">replications</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">order</span> <span class="kw">=</span> <span class="st">"relative"</span>, - <span class="kw">columns</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"test"</span>, <span class="st">"replications"</span>, <span class="st">"relative"</span>, <span class="st">"elapsed"</span>)) + <span class="st">"deSolve, not compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_2006_D</span>, + <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"deSolve"</span>, + <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), + <span class="st">"Eigenvalue based"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_2006_D</span>, + <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"eigen"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), + <span class="st">"deSolve, compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_2006_D</span>, + <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"deSolve"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), + <span class="kw">replications</span> <span class="kw">=</span> <span class="fl">3</span>) <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">b.1</span>) + <span class="no">factor_SFO_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html">round</a></span>(<span class="no">b.1</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>]) } <span class="kw">else</span> { + <span class="no">factor_SFO_SFO</span> <span class="kw"><-</span> <span class="fl">NA</span> <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="st">"R package rbenchmark is not available"</span>) }</pre></body></html></div> -<pre><code>## test replications relative elapsed -## 4 analytical 1 1.000 0.191 -## 3 deSolve, compiled 1 1.801 0.344 -## 2 Eigenvalue based 1 2.105 0.402 -## 1 deSolve, not compiled 1 42.864 8.187</code></pre> -<p>We see that using the compiled model is by more than a factor of 10 faster than using deSolve without compiled code.</p> +<pre><code>## test replications elapsed relative user.self sys.self +## 3 deSolve, compiled 3 0.997 1.000 0.997 0.000 +## 1 deSolve, not compiled 3 24.417 24.490 24.405 0.001 +## 2 Eigenvalue based 3 1.159 1.162 1.159 0.000 +## user.child sys.child +## 3 0 0 +## 1 0 0 +## 2 0 0</code></pre> +<p>We see that using the compiled model is by a factor of around 24 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs.</p> </div> -<div id="model-without-analytical-solution" class="section level2"> +<div id="model-that-can-not-be-solved-with-eigenvalues" class="section level2"> <h2 class="hasAnchor"> -<a href="#model-without-analytical-solution" class="anchor"></a>Model without analytical solution</h2> -<p>This evaluation is also taken from the example section of mkinfit. No analytical solution is available for this system, and now Eigenvalue based solution is possible, so only deSolve using with or without compiled code is available.</p> -<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="kw">if</span> (<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="no">rbenchmark</span>)) { +<a href="#model-that-can-not-be-solved-with-eigenvalues" class="anchor"></a>Model that can not be solved with Eigenvalues</h2> +<p>This evaluation is also taken from the example section of mkinfit.</p> +<div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="kw">if</span> (<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="no">rbenchmark</span>)) { <span class="no">FOMC_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>( <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>), <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>( <span class="st">"SFO"</span>)) <span class="no">b.2</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html">benchmark</a></span>( - <span class="st">"deSolve, not compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">FOMC_SFO</span>, <span class="no">FOCUS_D</span>, + <span class="st">"deSolve, not compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">FOMC_SFO</span>, <span class="no">FOCUS_2006_D</span>, <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), - <span class="st">"deSolve, compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">FOMC_SFO</span>, <span class="no">FOCUS_D</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), - <span class="kw">replications</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">order</span> <span class="kw">=</span> <span class="st">"relative"</span>, - <span class="kw">columns</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"test"</span>, <span class="st">"replications"</span>, <span class="st">"relative"</span>, <span class="st">"elapsed"</span>)) + <span class="st">"deSolve, compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">FOMC_SFO</span>, <span class="no">FOCUS_2006_D</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>), + <span class="kw">replications</span> <span class="kw">=</span> <span class="fl">3</span>) <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">b.2</span>) <span class="no">factor_FOMC_SFO</span> <span class="kw"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html">round</a></span>(<span class="no">b.2</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>]) } <span class="kw">else</span> { @@ -180,9 +176,12 @@ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="st">"R package benchmark is not available"</span>) }</pre></body></html></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<pre><code>## test replications relative elapsed -## 2 deSolve, compiled 1 1.000 0.466 -## 1 deSolve, not compiled 1 30.942 14.419</code></pre> +<pre><code>## test replications elapsed relative user.self sys.self +## 2 deSolve, compiled 3 1.392 1.000 1.391 0 +## 1 deSolve, not compiled 3 43.021 30.906 43.002 0 +## user.child sys.child +## 2 0 0 +## 1 0 0</code></pre> <p>Here we get a performance benefit of a factor of 31 using the version of the differential equation model compiled from C code!</p> <p>This vignette was built with mkin 0.9.50.2 on</p> <pre><code>## R version 4.0.0 (2020-04-24) diff --git a/docs/authors.html b/docs/authors.html index abf2534e..c445f8dc 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -108,9 +108,6 @@ <li> <a href="articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> diff --git a/docs/index.html b/docs/index.html index b2e60178..ce5d6a9a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,7 +37,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -74,9 +74,6 @@ <li> <a href="articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> diff --git a/docs/news/index.html b/docs/news/index.html index c26652e9..d61e532a 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -71,7 +71,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -108,9 +108,6 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -141,17 +138,6 @@ <small>Source: <a href='http://github.com/jranke/mkin/blob/master/NEWS.md'><code>NEWS.md</code></a></small> </div> - <div id="mkin-0-9-50-3-unreleased" class="section level1"> -<h1 class="page-header" data-toc-text="0.9.50.3"> -<a href="#mkin-0-9-50-3-unreleased" class="anchor"></a>mkin 0.9.50.3 (unreleased)<small> Unreleased </small> -</h1> -<ul> -<li><p>‘parms’: Add a method for mmkin objects</p></li> -<li><p>‘saemix_model’, ‘saemix_data’: Helper functions to fit nonlinear mixed-effects models for mmkin row objects using the saemix package</p></li> -<li><p>‘mmkin’ and ‘confint(method = ’profile’): Use all cores detected by parallel::detectCores() per default</p></li> -<li><p>‘confint(method = ’profile’): Choose accuracy based on ‘rel_tol’ argument, relative to the bounds obtained by the quadratic approximation</p></li> -</ul> -</div> <div id="mkin-0-9-50-2-2020-05-12" class="section level1"> <h1 class="page-header" data-toc-text="0.9.50.2"> <a href="#mkin-0-9-50-2-2020-05-12" class="anchor"></a>mkin 0.9.50.2 (2020-05-12)<small> 2020-05-12 </small> diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index a8b168ce..20a0b7d3 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -10,7 +10,7 @@ articles: NAFTA_examples: web_only/NAFTA_examples.html benchmarks: web_only/benchmarks.html compiled_models: web_only/compiled_models.html -last_built: 2020-05-26T16:38Z +last_built: 2020-05-27T05:02Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/reference/AIC.mmkin.html b/docs/reference/AIC.mmkin.html index 3f474d56..58590f52 100644 --- a/docs/reference/AIC.mmkin.html +++ b/docs/reference/AIC.mmkin.html @@ -189,13 +189,13 @@ dataframe if there are several fits in the column).</p> <span class='co'># of parameters, the higher (worse) the AIC</span> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>])</div><div class='output co'>#> df AIC #> SFO 3 55.28197 -#> FOMC 4 57.28211 +#> FOMC 4 57.28202 #> DFOP 5 59.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>], <span class='kw'>k</span> <span class='kw'>=</span> <span class='fl'>0</span>) <span class='co'># If we do not penalize additional parameters, we get nearly the same</span></div><div class='output co'>#> df AIC #> SFO 3 49.28197 -#> FOMC 4 49.28211 +#> FOMC 4 49.28202 #> DFOP 5 49.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>]) <span class='co'># Comparing the BIC gives a very similar picture</span></div><div class='output co'>#> df BIC #> SFO 3 55.52030 -#> FOMC 4 57.59987 +#> FOMC 4 57.59979 #> DFOP 5 59.67918</div><div class='input'> <span class='co'># For FOCUS C, the more complex models fit better</span> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='output co'>#> df AIC diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html index b7e8427e..a0916dba 100644 --- a/docs/reference/Extract.mmkin.html +++ b/docs/reference/Extract.mmkin.html @@ -214,7 +214,7 @@ either a list of mkinfit objects or a single mkinfit object.</p></td> #> #> $evaluations #> function gradient -#> 25 78 +#> 25 72 #> #> $message #> [1] "both X-convergence and relative convergence (5)" diff --git a/docs/reference/NAFTA_SOP_Attachment.html b/docs/reference/NAFTA_SOP_Attachment.html index 99b9f8c3..eadab723 100644 --- a/docs/reference/NAFTA_SOP_Attachment.html +++ b/docs/reference/NAFTA_SOP_Attachment.html @@ -188,7 +188,7 @@ #> Estimate Pr(>t) Lower Upper #> parent_0 9.99e+01 1.41e-26 98.8116 101.0810 #> k1 2.67e-02 5.05e-06 0.0243 0.0295 -#> k2 2.17e-12 5.00e-01 0.0000 Inf +#> k2 2.86e-12 5.00e-01 0.0000 Inf #> g 6.47e-01 3.67e-06 0.6248 0.6677 #> sigma 1.27e+00 8.91e-06 0.8395 1.6929 #> @@ -197,7 +197,7 @@ #> DT50 DT90 DT50_rep #> SFO 67.7 2.25e+02 6.77e+01 #> IORE 58.2 1.07e+03 3.22e+02 -#> DFOP 55.5 5.83e+11 3.20e+11 +#> DFOP 55.5 4.42e+11 2.42e+11 #> #> Representative half-life: #> [1] 321.51</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>nafta_att_p5a</span>)</div><div class='img'><img src='NAFTA_SOP_Attachment-1.png' alt='' width='700' height='433' /></div></pre> diff --git a/docs/reference/confint.mkinfit.html b/docs/reference/confint.mkinfit.html index 0686c7bb..a9080c39 100644 --- a/docs/reference/confint.mkinfit.html +++ b/docs/reference/confint.mkinfit.html @@ -79,7 +79,7 @@ method of Venzon and Moolgavkar (1988)." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -116,9 +116,6 @@ method of Venzon and Moolgavkar (1988)." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -171,8 +168,7 @@ method of Venzon and Moolgavkar (1988).</p> <span class='kw'>method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"quadratic"</span>, <span class='st'>"profile"</span>), <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>backtransform</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>cores</span> <span class='kw'>=</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>(), - <span class='kw'>rel_tol</span> <span class='kw'>=</span> <span class='fl'>0.01</span>, + <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>detectCores</span>()/<span class='fl'>2</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span> )</pre> @@ -228,12 +224,6 @@ their confidence intervals?</p></td> On Windows machines, cores > 1 is currently not supported.</p></td> </tr> <tr> - <th>rel_tol</th> - <td><p>If the method is 'profile', what should be the accuracy -of the lower and upper bounds, relative to the estimate obtained from -the quadratic method?</p></td> - </tr> - <tr> <th>quiet</th> <td><p>Should we suppress the message "Profiling the likelihood"</p></td> </tr> @@ -281,28 +271,28 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='no'>f_d_1</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> user system elapsed -#> 3.689 0.991 3.361 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span> +#> 3.430 0.000 3.432 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span> <span class='co'># If we additionally exclude parent_0 (the confidence of which is often of</span> <span class='co'># minor interest), we get a nice performance improvement from about 50</span> <span class='co'># seconds to about 12 seconds if we use at least four cores</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile_no_parent_0</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"k_parent_sink"</span>, <span class='st'>"k_parent_m1"</span>, <span class='st'>"k_m1_sink"</span>, <span class='st'>"sigma"</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>))</div><div class='output co'>#> <span class='message'>Profiling the likelihood</span></div><div class='output co'>#> <span class='warning'>Warning: scheduled cores 2, 1, 3 encountered errors in user code, all values of the jobs will be affected</span></div><div class='output co'>#> <span class='error'>Error in dimnames(x) <- dn: length of 'dimnames' [2] not equal to array extent</span></div><div class='output co'>#> <span class='message'>Timing stopped at: 0.007 0.042 0.193</span></div><div class='input'><span class='no'>ci_profile</span></div><div class='output co'>#> 2.5% 97.5% + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"k_parent_sink"</span>, <span class='st'>"k_parent_m1"</span>, <span class='st'>"k_m1_sink"</span>, <span class='st'>"sigma"</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>))</div><div class='output co'>#> <span class='message'>Profiling the likelihood</span></div><div class='output co'>#> <span class='warning'>Warning: scheduled cores 1, 2, 3 encountered errors in user code, all values of the jobs will be affected</span></div><div class='output co'>#> <span class='error'>Error in dimnames(x) <- dn: length of 'dimnames' [2] not equal to array extent</span></div><div class='output co'>#> <span class='message'>Timing stopped at: 0.012 0.042 0.211</span></div><div class='input'><span class='no'>ci_profile</span></div><div class='output co'>#> 2.5% 97.5% #> parent_0 96.456003640 1.027703e+02 #> k_parent 0.090911032 1.071578e-01 #> k_m1 0.003892605 6.702778e-03 #> f_parent_to_m1 0.471328495 5.611550e-01 #> sigma 2.535612399 3.985263e+00</div><div class='input'><span class='no'>ci_quadratic_transformed</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>) <span class='no'>ci_quadratic_transformed</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 96.403839460 1.027931e+02 +#> parent_0 96.403839476 1.027931e+02 #> k_parent 0.090823790 1.072543e-01 #> k_m1 0.004012216 6.897547e-03 #> f_parent_to_m1 0.469118713 5.595960e-01 #> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>ci_quadratic_untransformed</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) <span class='no'>ci_quadratic_untransformed</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 96.403839413 1.027931e+02 +#> parent_0 96.403839429 1.027931e+02 #> k_parent 0.090491931 1.069035e-01 #> k_m1 0.003835483 6.685819e-03 -#> f_parent_to_m1 0.469113365 5.598386e-01 +#> f_parent_to_m1 0.469113364 5.598386e-01 #> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='co'># Against the expectation based on Bates and Watts (1988), the confidence</span> <span class='co'># intervals based on the internal parameter transformation are less</span> <span class='co'># congruent with the likelihood based intervals. Note the superiority of the</span> @@ -314,7 +304,7 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> k_parent TRUE TRUE #> k_m1 FALSE FALSE #> f_parent_to_m1 TRUE FALSE -#> sigma FALSE FALSE</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span>(<span class='no'>rel_diffs_transformed</span>, <span class='fl'>3</span>)</div><div class='output co'>#> 2.5% 97.5% +#> sigma FALSE TRUE</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span>(<span class='no'>rel_diffs_transformed</span>, <span class='fl'>3</span>)</div><div class='output co'>#> 2.5% 97.5% #> parent_0 0.000541 0.000222 #> k_parent 0.000960 0.000900 #> k_m1 0.030700 0.029100 @@ -335,16 +325,16 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> f_parent_to_m1 0.471328495 5.611550e-01 #> sigma 2.535612399 3.985263e+00</div><div class='input'><span class='no'>ci_quadratic_transformed_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>) <span class='no'>ci_quadratic_transformed_ff</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 96.403839460 1.027931e+02 +#> parent_0 96.403839476 1.027931e+02 #> k_parent 0.090823790 1.072543e-01 #> k_m1 0.004012216 6.897547e-03 #> f_parent_to_m1 0.469118713 5.595960e-01 #> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>ci_quadratic_untransformed_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) <span class='no'>ci_quadratic_untransformed_ff</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 96.403839413 1.027931e+02 +#> parent_0 96.403839429 1.027931e+02 #> k_parent 0.090491931 1.069035e-01 #> k_m1 0.003835483 6.685819e-03 -#> f_parent_to_m1 0.469113365 5.598386e-01 +#> f_parent_to_m1 0.469113364 5.598386e-01 #> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>rel_diffs_transformed_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_transformed_ff</span> - <span class='no'>ci_profile_ff</span>)/<span class='no'>ci_profile_ff</span>) <span class='no'>rel_diffs_untransformed_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_untransformed_ff</span> - <span class='no'>ci_profile_ff</span>)/<span class='no'>ci_profile_ff</span>) <span class='co'># While the confidence interval for the parent rate constant is closer to</span> @@ -356,17 +346,17 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> k_parent TRUE TRUE #> k_m1 FALSE FALSE #> f_parent_to_m1 TRUE FALSE -#> sigma FALSE FALSE</div><div class='input'><span class='no'>rel_diffs_transformed_ff</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 0.0005408080 0.0002217794 +#> sigma FALSE TRUE</div><div class='input'><span class='no'>rel_diffs_transformed_ff</span></div><div class='output co'>#> 2.5% 97.5% +#> parent_0 0.0005408078 0.0002217796 #> k_parent 0.0009596417 0.0009003876 -#> k_m1 0.0307277370 0.0290579182 -#> f_parent_to_m1 0.0046884130 0.0027782556 -#> sigma 0.0550252516 0.0327066836</div><div class='input'><span class='no'>rel_diffs_untransformed_ff</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 0.0005408085 0.0002217799 -#> k_parent 0.0046100096 0.0023730229 -#> k_m1 0.0146746469 0.0025301011 -#> f_parent_to_m1 0.0046997599 0.0023460223 -#> sigma 0.0550252516 0.0327066836</div><div class='input'> +#> k_m1 0.0307277372 0.0290579184 +#> f_parent_to_m1 0.0046884131 0.0027782558 +#> sigma 0.0550252516 0.0327066836</div><div class='input'><span class='no'>rel_diffs_untransformed_ff</span></div><div class='output co'>#> 2.5% 97.5% +#> parent_0 0.0005408083 0.000221780 +#> k_parent 0.0046100096 0.002373023 +#> k_m1 0.0146746467 0.002530101 +#> f_parent_to_m1 0.0046997600 0.002346022 +#> sigma 0.0550252516 0.032706684</div><div class='input'> <span class='co'># The profiling for the following fit does not finish in a reasonable time,</span> <span class='co'># therefore we use the quadratic approximation</span> <span class='no'>m_synth_DFOP_par</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)), @@ -375,19 +365,19 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='no'>DFOP_par_c</span> <span class='kw'><-</span> <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span> <span class='no'>f_tc_2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_DFOP_par</span>, <span class='no'>DFOP_par_c</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, - <span class='kw'>error_model_algorithm</span> <span class='kw'>=</span> <span class='st'>"direct"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#> 2.5% 97.5% -#> parent_0 94.59613833 106.19939215 -#> k_M1 0.03760542 0.04490759 -#> k_M2 0.00856874 0.01087675 -#> f_parent_to_M1 0.02146166 0.62023888 -#> f_parent_to_M2 0.01516502 0.37975343 -#> k1 0.27389751 0.33388078 -#> k2 0.01861456 0.02250379 -#> g 0.67194349 0.73583256 -#> sigma_low 0.25128383 0.83992146 -#> rsd_high 0.04041100 0.07662001</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='st'>"parent_0"</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#> 2.5% 97.5% -#> parent_0 94.59614 106.1994</div><div class='input'># } + <span class='kw'>error_model_algorithm</span> <span class='kw'>=</span> <span class='st'>"direct"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> +#> <span class='warning'>iteration limit reached without convergence (10)</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 95.654015524 105.79279749 +#> k_M1 0.037723773 0.04447598 +#> k_M2 0.008586438 0.01078076 +#> f_parent_to_M1 0.230403596 0.61953014 +#> f_parent_to_M2 0.162909765 0.38019017 +#> k1 0.275434628 0.33331386 +#> k2 0.018602188 0.02249211 +#> g 0.675149759 0.73520889 +#> sigma_low 0.251416929 0.84272023 +#> rsd_high 0.040371818 0.07666540</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='st'>"parent_0"</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 95.65402 105.7928</div><div class='input'># } </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> diff --git a/docs/reference/create_deg_func.html b/docs/reference/create_deg_func.html index 1a6da920..3bb512cd 100644 --- a/docs/reference/create_deg_func.html +++ b/docs/reference/create_deg_func.html @@ -175,9 +175,9 @@ <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span>( <span class='kw'>analytical</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), <span class='kw'>deSolve</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), - <span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='output co'>#> <span class='message'>Lade nötiges Paket: rbenchmark</span></div><div class='output co'>#> test replications elapsed relative user.self sys.self user.child -#> 1 analytical 2 0.410 1.000 0.410 0.000 0 -#> 2 deSolve 2 0.704 1.717 0.703 0.001 0 + <span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='output co'>#> <span class='message'>Loading required package: rbenchmark</span></div><div class='output co'>#> test replications elapsed relative user.self sys.self user.child +#> 1 analytical 2 0.407 1.000 0.407 0 0 +#> 2 deSolve 2 0.699 1.717 0.698 0 0 #> sys.child #> 1 0 #> 2 0</div><div class='input'> <span class='no'>DFOP_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( @@ -186,8 +186,8 @@ <span class='kw'>analytical</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>DFOP_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), <span class='kw'>deSolve</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>DFOP_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), <span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='output co'>#> test replications elapsed relative user.self sys.self user.child -#> 1 analytical 2 0.894 1.000 0.894 0.000 0 -#> 2 deSolve 2 1.717 1.921 1.716 0.001 0 +#> 1 analytical 2 0.887 1.000 0.886 0 0 +#> 2 deSolve 2 1.639 1.848 1.638 0 0 #> sys.child #> 1 0 #> 2 0</div><div class='input'># } diff --git a/docs/reference/experimental_data_for_UBA-1.png b/docs/reference/experimental_data_for_UBA-1.png Binary files differindex 6c225daa..b316a5db 100644 --- a/docs/reference/experimental_data_for_UBA-1.png +++ b/docs/reference/experimental_data_for_UBA-1.png diff --git a/docs/reference/get_deg_func.html b/docs/reference/get_deg_func.html index 6eedafd2..812b25d7 100644 --- a/docs/reference/get_deg_func.html +++ b/docs/reference/get_deg_func.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -109,9 +109,6 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> diff --git a/docs/reference/index.html b/docs/reference/index.html index 10d3b53a..961352e0 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -108,9 +108,6 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -331,12 +328,6 @@ of an mmkin object</p></td> </tr><tr> <td> - <p><code><a href="saemix.html">saemix_model()</a></code> <code><a href="saemix.html">saemix_data()</a></code> </p> - </td> - <td><p>Create saemix models from mmkin row objects</p></td> - </tr><tr> - - <td> <p><code><a href="get_deg_func.html">get_deg_func()</a></code> </p> </td> <td><p>Retrieve a degradation function from the mmkin namespace</p></td> diff --git a/docs/reference/loftest-3.png b/docs/reference/loftest-3.png Binary files differindex 39fca72d..cb55838c 100644 --- a/docs/reference/loftest-3.png +++ b/docs/reference/loftest-3.png diff --git a/docs/reference/logistic.solution-3.png b/docs/reference/logistic.solution-3.png Binary files differdeleted file mode 100644 index fd11d0c0..00000000 --- a/docs/reference/logistic.solution-3.png +++ /dev/null diff --git a/docs/reference/logistic.solution-4.png b/docs/reference/logistic.solution-4.png Binary files differdeleted file mode 100644 index 78a31f93..00000000 --- a/docs/reference/logistic.solution-4.png +++ /dev/null diff --git a/docs/reference/logistic.solution.html b/docs/reference/logistic.solution.html index 4820d25f..87dc78a9 100644 --- a/docs/reference/logistic.solution.html +++ b/docs/reference/logistic.solution.html @@ -229,18 +229,18 @@ Version 1.1, 18 December 2014 <span class='no'>m</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"logistic"</span>, <span class='no'>d_2_1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>m</span>)</div><div class='img'><img src='logistic.solution-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>m</span>)$<span class='no'>bpar</span></div><div class='output co'>#> Estimate se_notrans t value Pr(>t) Lower -#> parent_0 1.057896e+02 1.9023449703 55.610119 3.768361e-16 1.016451e+02 -#> kmax 6.398190e-02 0.0143201031 4.467978 3.841829e-04 3.929235e-02 -#> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846688e-08 -#> r 2.263946e-01 0.1718110715 1.317695 1.061044e-01 4.335843e-02 +#> parent_0 1.057896e+02 1.9023449649 55.610120 3.768361e-16 1.016451e+02 +#> kmax 6.398190e-02 0.0143201029 4.467978 3.841828e-04 3.929235e-02 +#> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846685e-08 +#> r 2.263946e-01 0.1718110773 1.317695 1.061044e-01 4.335843e-02 #> sigma 5.332935e+00 0.9145907310 5.830952 4.036926e-05 3.340213e+00 #> Upper #> parent_0 109.9341588 #> kmax 0.1041853 -#> k0 0.4448749 -#> r 1.1821120 +#> k0 0.4448750 +#> r 1.1821121 #> sigma 7.3256566</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>m</span>)$<span class='no'>distimes</span></div><div class='output co'>#> DT50 DT90 DT50_k0 DT50_kmax -#> parent 36.86533 62.41511 4297.853 10.83349</div><div class='input'> +#> parent 36.86533 62.41511 4297.854 10.83349</div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> diff --git a/docs/reference/mccall81_245T-1.png b/docs/reference/mccall81_245T-1.png Binary files differdeleted file mode 100644 index 5b70455c..00000000 --- a/docs/reference/mccall81_245T-1.png +++ /dev/null diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index 06fcd79e..b2402e04 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -175,15 +175,15 @@ <span class='kw'>phenol</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"anisole"</span>), <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># \dontrun{</span> <span class='no'>fit.1</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.1</span>)$<span class='no'>bpar</span></div><div class='output co'>#> Estimate se_notrans t value Pr(>t) -#> T245_0 1.038550e+02 2.184707514 47.537272 4.472189e-18 +#> T245_0 1.038550e+02 2.184707509 47.537272 4.472189e-18 #> k_T245 4.337042e-02 0.001898397 22.845818 2.276912e-13 -#> k_phenol 4.050581e-01 0.298699428 1.356073 9.756994e-02 +#> k_phenol 4.050581e-01 0.298699410 1.356073 9.756993e-02 #> k_anisole 6.678742e-03 0.000802144 8.326114 2.623179e-07 -#> f_T245_to_phenol 6.227599e-01 0.398534167 1.562626 6.949418e-02 -#> f_phenol_to_anisole 1.000000e+00 0.671844168 1.488440 7.867794e-02 -#> sigma 2.514628e+00 0.490755943 5.123989 6.233164e-05 +#> f_T245_to_phenol 6.227599e-01 0.398534147 1.562626 6.949418e-02 +#> f_phenol_to_anisole 1.000000e+00 0.671844135 1.488440 7.867793e-02 +#> sigma 2.514628e+00 0.490755933 5.123989 6.233163e-05 #> Lower Upper -#> T245_0 99.246061371 1.084640e+02 +#> T245_0 99.246061427 1.084640e+02 #> k_T245 0.039631621 4.746194e-02 #> k_phenol 0.218013878 7.525762e-01 #> k_anisole 0.005370739 8.305299e-03 @@ -191,7 +191,7 @@ #> f_phenol_to_anisole 0.000000000 1.000000e+00 #> sigma 1.706607296 3.322649e+00</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.1</span>)</div><div class='output co'>#> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink -#> 6.227599e-01 3.772401e-01 1.000000e+00 1.748047e-10 +#> 6.227599e-01 3.772401e-01 1.000000e+00 1.005127e-10 #> #> $distimes #> DT50 DT90 @@ -201,16 +201,16 @@ #> </div><div class='input'> <span class='co'># k_phenol_sink is really small, therefore fix it to zero</span> <span class='no'>fit.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_phenol_sink</span> <span class='kw'>=</span> <span class='fl'>0</span>), - <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='st'>"k_phenol_sink"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Initial parameter(s) k_phenol_sink not used in the model</span></div><div class='output co'>#> <span class='error'>Error in data.frame(value = c(state.ini.fixed, parms.fixed)): Zeilennamen enthalten fehlende Werte</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.2</span>)$<span class='no'>bpar</span></div><div class='output co'>#> <span class='error'>Error in summary(fit.2): Objekt 'fit.2' nicht gefunden</span></div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.1</span>)</div><div class='output co'>#> $ff + <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='st'>"k_phenol_sink"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Initial parameter(s) k_phenol_sink not used in the model</span></div><div class='output co'>#> <span class='error'>Error in data.frame(value = c(state.ini.fixed, parms.fixed)): row names contain missing values</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.2</span>)$<span class='no'>bpar</span></div><div class='output co'>#> <span class='error'>Error in summary(fit.2): object 'fit.2' not found</span></div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.1</span>)</div><div class='output co'>#> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink -#> 6.227599e-01 3.772401e-01 1.000000e+00 1.748047e-10 +#> 6.227599e-01 3.772401e-01 1.000000e+00 1.005127e-10 #> #> $distimes #> DT50 DT90 #> T245 15.982025 53.09114 #> phenol 1.711229 5.68458 #> anisole 103.784092 344.76329 -#> </div><div class='input'> <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fit.2</span>)</div><div class='output co'>#> <span class='error'>Error in identical(fit$err_mod, "const"): Objekt 'fit.2' nicht gefunden</span></div><div class='input'> # } +#> </div><div class='input'> <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fit.2</span>)</div><div class='output co'>#> <span class='error'>Error in identical(fit$err_mod, "const"): object 'fit.2' not found</span></div><div class='input'> # } </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index ced0cb54..c38c5cca 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -41,11 +41,9 @@ <meta property="og:title" content="Fit a kinetic model to data with one or more state variables — mkinfit" /> <meta property="og:description" content="This function maximises the likelihood of the observed data using the Port -algorithm stats::nlminb(), and the specified initial or fixed +algorithm nlminb, and the specified initial or fixed parameters and starting values. In each step of the optimisation, the -kinetic model is solved using the function mkinpredict(), except -if an analytical solution is implemented, in which case the model is solved -using the degradation function in the mkinmod object. The +kinetic model is solved using the function mkinpredict. The parameters of the selected error model are fitted simultaneously with the degradation model parameters, as both of them are arguments of the likelihood function." /> @@ -80,7 +78,7 @@ likelihood function." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -117,9 +115,6 @@ likelihood function." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -153,11 +148,9 @@ likelihood function." /> <div class="ref-description"> <p>This function maximises the likelihood of the observed data using the Port -algorithm <code><a href='https://rdrr.io/r/stats/nlminb.html'>stats::nlminb()</a></code>, and the specified initial or fixed +algorithm <code><a href='https://rdrr.io/r/stats/nlminb.html'>nlminb</a></code>, and the specified initial or fixed parameters and starting values. In each step of the optimisation, the -kinetic model is solved using the function <code><a href='mkinpredict.html'>mkinpredict()</a></code>, except -if an analytical solution is implemented, in which case the model is solved -using the degradation function in the <a href='mkinmod.html'>mkinmod</a> object. The +kinetic model is solved using the function <code><a href='mkinpredict.html'>mkinpredict</a></code>. The parameters of the selected error model are fitted simultaneously with the degradation model parameters, as both of them are arguments of the likelihood function.</p> @@ -195,7 +188,7 @@ likelihood function.</p> <colgroup><col class="name" /><col class="desc" /></colgroup> <tr> <th>mkinmod</th> - <td><p>A list of class <a href='mkinmod.html'>mkinmod</a>, containing the kinetic + <td><p>A list of class <code><a href='mkinmod.html'>mkinmod</a></code>, containing the kinetic model to be fitted to the data, or one of the shorthand names ("SFO", "FOMC", "DFOP", "HS", "SFORB", "IORE"). If a shorthand name is given, a parent only degradation model is generated for the variable with the @@ -231,7 +224,7 @@ given below.</p></td> <td><p>A named vector of initial values for the state variables of the model. In case the observed variables are represented by more than one model variable, the names will differ from the names of the observed -variables (see <code>map</code> component of <a href='mkinmod.html'>mkinmod</a>). The default +variables (see <code>map</code> component of <code><a href='mkinmod.html'>mkinmod</a></code>). The default is to set the initial value of the first model variable to the mean of the time zero values for the variable with the maximum observed value, and all others to 0. If this variable has no time zero observations, its initial @@ -270,28 +263,30 @@ observed mean value is the new time zero.</p></td> <td><p>If set to "eigen", the solution of the system of differential equations is based on the spectral decomposition of the coefficient matrix in cases that this is possible. If set to "deSolve", a -numerical <a href='https://rdrr.io/pkg/deSolve/man/ode.html'>ode solver from package deSolve</a> is used. If -set to "analytical", an analytical solution of the model is used. This is -only implemented for relatively simple degradation models. The default is -"auto", which uses "analytical" if possible, otherwise "deSolve" if a -compiler is present, and "eigen" if no compiler is present and the model -can be expressed using eigenvalues and eigenvectors.</p></td> +numerical ode solver from package <code>deSolve</code> is used. If set to +"analytical", an analytical solution of the model is used. This is only +implemented for simple degradation experiments with only one state +variable, i.e. with no metabolites. The default is "auto", which uses +"analytical" if possible, otherwise "deSolve" if a compiler is present, +and "eigen" if no compiler is present and the model can be expressed using +eigenvalues and eigenvectors. This argument is passed on to the helper +function <code><a href='mkinpredict.html'>mkinpredict</a></code>.</p></td> </tr> <tr> <th>method.ode</th> - <td><p>The solution method passed via <code><a href='mkinpredict.html'>mkinpredict()</a></code> -to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code> in case the solution type is "deSolve". The default + <td><p>The solution method passed via <code><a href='mkinpredict.html'>mkinpredict</a></code> +to <code>ode</code> in case the solution type is "deSolve". The default "lsoda" is performant, but sometimes fails to converge.</p></td> </tr> <tr> <th>use_compiled</th> <td><p>If set to <code>FALSE</code>, no compiled version of the -<a href='mkinmod.html'>mkinmod</a> model is used in the calls to <code><a href='mkinpredict.html'>mkinpredict()</a></code> even if a compiled -version is present.</p></td> +<code><a href='mkinmod.html'>mkinmod</a></code> model is used in the calls to +<code><a href='mkinpredict.html'>mkinpredict</a></code> even if a compiled version is present.</p></td> </tr> <tr> <th>control</th> - <td><p>A list of control arguments passed to <code><a href='https://rdrr.io/r/stats/nlminb.html'>stats::nlminb()</a></code>.</p></td> + <td><p>A list of control arguments passed to <code><a href='https://rdrr.io/r/stats/nlminb.html'>nlminb</a></code>.</p></td> </tr> <tr> <th>transform_rates</th> @@ -311,7 +306,7 @@ fitting for better compliance with the assumption of normal distribution of the estimator. The default (TRUE) is to do transformations. If TRUE, the g parameter of the DFOP and HS models are also transformed, as they can also be seen as compositional data. The transformation used for these -transformations is the <code><a href='ilr.html'>ilr()</a></code> transformation.</p></td> +transformations is the <code><a href='ilr.html'>ilr</a></code> transformation.</p></td> </tr> <tr> <th>quiet</th> @@ -320,14 +315,13 @@ log-likelihood after each improvement?</p></td> </tr> <tr> <th>atol</th> - <td><p>Absolute error tolerance, passed to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>. Default -is 1e-8, which is lower than the default in the <code><a href='https://rdrr.io/pkg/deSolve/man/lsoda.html'>deSolve::lsoda()</a></code> -function which is used per default.</p></td> + <td><p>Absolute error tolerance, passed to <code>ode</code>. Default +is 1e-8, lower than in <code>lsoda</code>.</p></td> </tr> <tr> <th>rtol</th> - <td><p>Absolute error tolerance, passed to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>. Default -is 1e-10, much lower than in <code><a href='https://rdrr.io/pkg/deSolve/man/lsoda.html'>deSolve::lsoda()</a></code>.</p></td> + <td><p>Absolute error tolerance, passed to <code>ode</code>. Default +is 1e-10, much lower than in <code>lsoda</code>.</p></td> </tr> <tr> <th>error_model</th> @@ -348,9 +342,11 @@ normal distribution as assumed by this method.</p></td> the error model. If the error model is "const", unweighted nonlinear least squares fitting ("OLS") is selected. If the error model is "obs", or "tc", the "d_3" algorithm is selected.</p> -<p>The algorithm "d_3" will directly minimize the negative log-likelihood -and independently also use the three step algorithm described below. -The fit with the higher likelihood is returned.</p> +<p>The algorithm "d_3" will directly minimize the negative log-likelihood and</p><ul> +<li><p>independently - also use the three step algorithm described below. The +fit with the higher likelihood is returned.</p></li> +</ul> + <p>The algorithm "direct" will directly minimize the negative log-likelihood.</p> <p>The algorithm "twostep" will minimize the negative log-likelihood after an initial unweighted least squares optimisation step.</p> @@ -385,13 +381,14 @@ the error model parameters in IRLS fits.</p></td> <tr> <th>...</th> <td><p>Further arguments that will be passed on to -<code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>.</p></td> +<code>deSolve</code>.</p></td> </tr> </table> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - <p>A list with "mkinfit" in the class attribute.</p> + <p>A list with "mkinfit" in the class attribute. A summary can be +obtained by <code><a href='summary.mkinfit.html'>summary.mkinfit</a></code>.</p> <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> <p>Per default, parameters in the kinetic models are internally transformed in @@ -412,7 +409,8 @@ Degradation Data. <em>Environments</em> 6(12) 124 <a href='https://doi.org/10.3390/environments6120124'>doi:10.3390/environments6120124</a>.</p> <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> - <div class='dont-index'><p><a href='summary.mkinfit.html'>summary.mkinfit</a>, <a href='plot.mkinfit.html'>plot.mkinfit</a>, <a href='parms.html'>parms</a> and <a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a>.</p> + <div class='dont-index'><p>Plotting methods <code><a href='plot.mkinfit.html'>plot.mkinfit</a></code> and +<code><a href='mkinparplot.html'>mkinparplot</a></code>.</p> <p>Comparisons of models fitted to the same data can be made using <code><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></code> by virtue of the method <code><a href='logLik.mkinfit.html'>logLik.mkinfit</a></code>.</p> <p>Fitting of several models to several datasets in a single call to @@ -422,17 +420,17 @@ Degradation Data. <em>Environments</em> 6(12) 124 <pre class="examples"><div class='input'> <span class='co'># Use shorthand notation for parent only degradation</span> <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.3 +<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Mon May 25 12:29:22 2020 -#> Date of summary: Mon May 25 12:29:22 2020 +#> Date of fit: Wed May 27 07:03:45 2020 +#> Date of summary: Wed May 27 07:03:45 2020 #> #> 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.048 s +#> Fitted using 222 model solutions performed in 0.043 s #> #> Error model: Constant variance #> @@ -467,10 +465,10 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> #> Parameter correlation: #> parent_0 log_alpha log_beta sigma -#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.758e-08 -#> log_alpha -1.565e-01 1.000e+00 9.564e-01 1.007e-07 -#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.568e-08 -#> sigma 4.758e-08 1.007e-07 8.568e-08 1.000e+00 +#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.770e-08 +#> log_alpha -1.565e-01 1.000e+00 9.564e-01 9.974e-08 +#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.468e-08 +#> sigma 4.770e-08 9.974e-08 8.468e-08 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -509,15 +507,15 @@ Degradation Data. <em>Environments</em> 6(12) 124 <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)))</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> user system elapsed -#> 0.407 0.013 0.423 </div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 k_parent k_m1 f_parent_to_m1 sigma -#> 99.598483222 0.098697734 0.005260651 0.514475962 3.125503875 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff +#> 0.400 0.004 0.404 </div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 k_parent k_m1 f_parent_to_m1 sigma +#> 99.598481046 0.098697740 0.005260651 0.514475962 3.125503875 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff #> parent_m1 parent_sink #> 0.514476 0.485524 #> #> $distimes #> DT50 DT90 -#> parent 7.022929 23.32967 -#> m1 131.760715 437.69962 +#> parent 7.022929 23.32966 +#> m1 131.760724 437.69965 #> </div><div class='input'><span class='co'># \dontrun{</span> <span class='co'># deSolve is slower when no C compiler (gcc) was available during model generation</span> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fit.deSolve</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, @@ -534,19 +532,19 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> Sum of squared residuals at call 29: 1017.417 #> Sum of squared residuals at call 31: 1017.417 #> Sum of squared residuals at call 33: 1017.416 -#> Sum of squared residuals at call 34: 644.0471 -#> Sum of squared residuals at call 36: 644.0469 -#> Sum of squared residuals at call 38: 644.0469 +#> Sum of squared residuals at call 34: 644.0472 +#> Sum of squared residuals at call 36: 644.047 +#> Sum of squared residuals at call 38: 644.047 #> Sum of squared residuals at call 39: 590.5025 #> Sum of squared residuals at call 41: 590.5022 #> Sum of squared residuals at call 43: 590.5016 -#> Sum of squared residuals at call 44: 543.219 -#> Sum of squared residuals at call 45: 543.2187 -#> Sum of squared residuals at call 46: 543.2186 +#> Sum of squared residuals at call 44: 543.2196 +#> Sum of squared residuals at call 45: 543.2193 +#> Sum of squared residuals at call 46: 543.2192 #> Sum of squared residuals at call 50: 391.348 #> Sum of squared residuals at call 51: 391.3479 -#> Sum of squared residuals at call 56: 386.4789 -#> Sum of squared residuals at call 58: 386.4789 +#> Sum of squared residuals at call 56: 386.479 +#> Sum of squared residuals at call 58: 386.479 #> Sum of squared residuals at call 60: 386.4779 #> Sum of squared residuals at call 61: 384.0686 #> Sum of squared residuals at call 63: 384.0686 @@ -565,49 +563,49 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> Sum of squared residuals at call 91: 374.5774 #> Sum of squared residuals at call 93: 374.5774 #> Sum of squared residuals at call 95: 374.5774 -#> Sum of squared residuals at call 96: 373.5433 -#> Sum of squared residuals at call 100: 373.5433 -#> Sum of squared residuals at call 102: 373.2654 -#> Sum of squared residuals at call 104: 373.2654 -#> Sum of squared residuals at call 107: 372.6841 -#> Sum of squared residuals at call 111: 372.684 -#> Sum of squared residuals at call 114: 372.6374 -#> Sum of squared residuals at call 116: 372.6374 -#> Sum of squared residuals at call 119: 372.6223 -#> Sum of squared residuals at call 121: 372.6223 -#> Sum of squared residuals at call 123: 372.6223 -#> Sum of squared residuals at call 124: 372.5903 -#> Sum of squared residuals at call 126: 372.5903 -#> Sum of squared residuals at call 129: 372.5445 -#> Sum of squared residuals at call 130: 372.4921 -#> Sum of squared residuals at call 131: 372.2377 -#> Sum of squared residuals at call 132: 371.5434 -#> Sum of squared residuals at call 134: 371.5434 -#> Sum of squared residuals at call 137: 371.2857 -#> Sum of squared residuals at call 139: 371.2857 -#> Sum of squared residuals at call 143: 371.2247 -#> Sum of squared residuals at call 144: 371.2247 -#> Sum of squared residuals at call 149: 371.2189 -#> Sum of squared residuals at call 150: 371.2145 -#> Sum of squared residuals at call 153: 371.2145 -#> Sum of squared residuals at call 155: 371.2138 -#> Sum of squared residuals at call 156: 371.2138 -#> Sum of squared residuals at call 157: 371.2138 -#> Sum of squared residuals at call 161: 371.2134 -#> Sum of squared residuals at call 162: 371.2134 +#> Sum of squared residuals at call 96: 373.5438 +#> Sum of squared residuals at call 100: 373.5438 +#> Sum of squared residuals at call 102: 373.265 +#> Sum of squared residuals at call 104: 373.265 +#> Sum of squared residuals at call 107: 372.6825 +#> Sum of squared residuals at call 111: 372.6825 +#> Sum of squared residuals at call 114: 372.6356 +#> Sum of squared residuals at call 116: 372.6356 +#> Sum of squared residuals at call 119: 372.6199 +#> Sum of squared residuals at call 121: 372.6199 +#> Sum of squared residuals at call 123: 372.6199 +#> Sum of squared residuals at call 124: 372.5881 +#> Sum of squared residuals at call 126: 372.5881 +#> Sum of squared residuals at call 129: 372.5418 +#> Sum of squared residuals at call 130: 372.4866 +#> Sum of squared residuals at call 131: 372.2242 +#> Sum of squared residuals at call 132: 371.5237 +#> Sum of squared residuals at call 134: 371.5237 +#> Sum of squared residuals at call 137: 371.292 +#> Sum of squared residuals at call 139: 371.292 +#> Sum of squared residuals at call 143: 371.2256 +#> Sum of squared residuals at call 144: 371.2256 +#> Sum of squared residuals at call 146: 371.2256 +#> Sum of squared residuals at call 149: 371.2194 +#> Sum of squared residuals at call 150: 371.2147 +#> Sum of squared residuals at call 153: 371.2147 +#> Sum of squared residuals at call 155: 371.2137 +#> Sum of squared residuals at call 156: 371.2137 +#> Sum of squared residuals at call 157: 371.2137 +#> Sum of squared residuals at call 160: 371.2134 +#> Sum of squared residuals at call 164: 371.2134 #> Sum of squared residuals at call 165: 371.2134 -#> Sum of squared residuals at call 166: 371.2134 -#> Sum of squared residuals at call 168: 371.2134 -#> Negative log-likelihood at call 178: 97.22429</div><div class='output co'>#> <span class='message'>Optimisation successfully terminated.</span></div><div class='output co'>#> user system elapsed -#> 0.351 0.000 0.352 </div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> parent_0 k_parent k_m1 f_parent_to_m1 sigma -#> 99.598480759 0.098697739 0.005260651 0.514475958 3.125503874 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> $ff +#> Sum of squared residuals at call 167: 371.2134 +#> Negative log-likelihood at call 177: 97.22429</div><div class='output co'>#> <span class='message'>Optimisation successfully terminated.</span></div><div class='output co'>#> user system elapsed +#> 0.360 0.000 0.361 </div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> parent_0 k_parent k_m1 f_parent_to_m1 sigma +#> 99.598480300 0.098697739 0.005260651 0.514475968 3.125503874 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> $ff #> parent_m1 parent_sink #> 0.514476 0.485524 #> #> $distimes #> DT50 DT90 #> parent 7.022929 23.32966 -#> m1 131.760731 437.69967 +#> m1 131.760721 437.69964 #> </div><div class='input'><span class='co'># }</span> <span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, FOMC</span> @@ -631,10 +629,10 @@ Degradation Data. <em>Environments</em> 6(12) 124 <span class='co'># \dontrun{</span> <span class='co'># Weighted fits, including IRLS (error_model = "obs")</span> <span class='no'>SFO_SFO.ff</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>f.noweight</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.3 + <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>f.noweight</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Mon May 25 12:29:28 2020 -#> Date of summary: Mon May 25 12:29:28 2020 +#> Date of fit: Wed May 27 07:03:50 2020 +#> Date of summary: Wed May 27 07:03:50 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -642,7 +640,7 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> #> Model predictions using solution type analytical #> -#> Fitted using 421 model solutions performed in 0.147 s +#> Fitted using 421 model solutions performed in 0.129 s #> #> Error model: Constant variance #> @@ -681,11 +679,11 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> #> Parameter correlation: #> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma -#> parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -3.214e-07 +#> parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -3.190e-07 #> log_k_parent 5.174e-01 1.000e+00 -3.263e-01 -5.426e-01 3.168e-07 -#> log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.410e-07 -#> f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 5.093e-10 -#> sigma -3.214e-07 3.168e-07 -1.410e-07 5.093e-10 1.000e+00 +#> log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.406e-07 +#> f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 -1.587e-10 +#> sigma -3.190e-07 3.168e-07 -1.406e-07 -1.587e-10 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -753,10 +751,10 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> 100 m1 31.04 31.98163 -9.416e-01 #> 100 m1 33.13 31.98163 1.148e+00 #> 120 m1 25.15 28.78984 -3.640e+00 -#> 120 m1 33.31 28.78984 4.520e+00</div><div class='input'><span class='no'>f.obs</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.obs</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.3 +#> 120 m1 33.31 28.78984 4.520e+00</div><div class='input'><span class='no'>f.obs</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.obs</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Mon May 25 12:29:28 2020 -#> Date of summary: Mon May 25 12:29:28 2020 +#> Date of fit: Wed May 27 07:03:50 2020 +#> Date of summary: Wed May 27 07:03:50 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -764,7 +762,7 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> #> Model predictions using solution type analytical #> -#> Fitted using 978 model solutions performed in 0.337 s +#> Fitted using 978 model solutions performed in 0.407 s #> #> Error model: Variance unique to each observed variable #> @@ -890,10 +888,10 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> 100 m1 31.04 31.98773 -9.477e-01 #> 100 m1 33.13 31.98773 1.142e+00 #> 120 m1 25.15 28.80429 -3.654e+00 -#> 120 m1 33.31 28.80429 4.506e+00</div><div class='input'><span class='no'>f.tc</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.tc</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.3 +#> 120 m1 33.31 28.80429 4.506e+00</div><div class='input'><span class='no'>f.tc</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.tc</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Mon May 25 12:29:29 2020 -#> Date of summary: Mon May 25 12:29:29 2020 +#> Date of fit: Wed May 27 07:03:51 2020 +#> Date of summary: Wed May 27 07:03:51 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -901,7 +899,7 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> #> Model predictions using solution type analytical #> -#> Fitted using 1875 model solutions performed in 0.644 s +#> Fitted using 2088 model solutions performed in 0.722 s #> #> Error model: Two-component variance function #> diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index 79b21d33..40cc2ef4 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -255,7 +255,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media</p> <span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file61b4ce789c7.c 2> file61b4ce789c7.c.err.txt +#> /usr/lib/R/bin/R CMD SHLIB file5d7f45129ff2.c 2> file5d7f45129ff2.c.err.txt #> Program source: #> 1: #include <R.h> #> 2: diff --git a/docs/reference/mkinparplot-1.png b/docs/reference/mkinparplot-1.png Binary files differindex 6853a4ba..31800c09 100644 --- a/docs/reference/mkinparplot-1.png +++ b/docs/reference/mkinparplot-1.png diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index 89f48a09..e16de283 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -397,10 +397,10 @@ solver is used.</p></td> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)[<span class='fl'>201</span>,]) }</div><div class='output co'>#> test relative elapsed -#> 2 deSolve_compiled 1.0 0.005 -#> 4 analytical 1.0 0.005 -#> 1 eigen 4.0 0.020 -#> 3 deSolve 43.6 0.218</div><div class='input'> +#> 2 deSolve_compiled 1.00 0.004 +#> 4 analytical 1.00 0.004 +#> 1 eigen 4.75 0.019 +#> 3 deSolve 54.75 0.219</div><div class='input'> <span class='co'># \dontrun{</span> <span class='co'># Predict from a fitted model</span> <span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) diff --git a/docs/reference/mmkin-3.png b/docs/reference/mmkin-3.png Binary files differindex bce34531..e80448ab 100644 --- a/docs/reference/mmkin-3.png +++ b/docs/reference/mmkin-3.png diff --git a/docs/reference/mmkin-5.png b/docs/reference/mmkin-5.png Binary files differindex 56750342..4c771bc9 100644 --- a/docs/reference/mmkin-5.png +++ b/docs/reference/mmkin-5.png diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index 9628c017..67837ea3 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -75,7 +75,7 @@ datasets specified in its first two arguments." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -112,9 +112,6 @@ datasets specified in its first two arguments." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -155,7 +152,7 @@ datasets specified in its first two arguments.</p> <pre class="usage"><span class='fu'>mmkin</span>( <span class='kw'>models</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), <span class='no'>datasets</span>, - <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'>detectCores</span>(), + <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>detectCores</span>()/<span class='fl'>2</span>), <span class='kw'>cluster</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='no'>...</span> )</pre> @@ -179,8 +176,7 @@ data for <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td> <td><p>The number of cores to be used for multicore processing. This is only used when the <code>cluster</code> argument is <code>NULL</code>. On Windows machines, cores > 1 is not supported, you need to use the <code>cluster</code> -argument to use multiple logical processors. Per default, all cores -detected by <code><a href='https://rdrr.io/r/parallel/detectCores.html'>parallel::detectCores()</a></code> are used.</p></td> +argument to use multiple logical processors.</p></td> </tr> <tr> <th>cluster</th> @@ -220,17 +216,17 @@ plotting.</p></div> <span class='no'>time_1</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fits.4</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> #> <span class='warning'>false convergence (8)</span></div><div class='input'> <span class='no'>time_default</span></div><div class='output co'>#> user system elapsed -#> 4.457 0.561 1.328 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#> user system elapsed -#> 5.031 0.004 5.038 </div><div class='input'> +#> 4.471 0.405 1.961 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#> user system elapsed +#> 5.883 0.000 5.887 </div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span>]])</div><div class='output co'>#> $ff #> parent_M1 parent_sink M1_M2 M1_sink -#> 0.7340478 0.2659522 0.7505691 0.2494309 +#> 0.7340479 0.2659521 0.7505687 0.2494313 #> #> $distimes #> DT50 DT90 #> parent 0.8777688 2.915885 -#> M1 2.3257466 7.725963 -#> M2 33.7200800 112.015681 +#> M1 2.3257457 7.725960 +#> M2 33.7200848 112.015697 #> </div><div class='input'> <span class='co'># plot.mkinfit handles rows or columns of mmkin result objects</span> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, ])</div><div class='img'><img src='mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, ], <span class='kw'>obs_var</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>))</div><div class='img'><img src='mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[, <span class='fl'>1</span>])</div><div class='img'><img src='mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># Use double brackets to extract a single mkinfit object, which will be plotted</span> diff --git a/docs/reference/nlme-1.png b/docs/reference/nlme-1.png Binary files differindex 68ccb43f..bc04dea8 100644 --- a/docs/reference/nlme-1.png +++ b/docs/reference/nlme-1.png diff --git a/docs/reference/nlme.html b/docs/reference/nlme.html index 3462e52e..85929929 100644 --- a/docs/reference/nlme.html +++ b/docs/reference/nlme.html @@ -43,7 +43,7 @@ <meta property="og:description" content="These functions facilitate setting up a nonlinear mixed effects model for an mmkin row object. An mmkin row object is essentially a list of mkinfit objects that have been obtained by fitting the same model to a list of -datasets. They are used internally by the nlme.mmkin() method." /> +datasets." /> @@ -75,7 +75,7 @@ datasets. They are used internally by the nlme.mmkin() method." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -112,9 +112,6 @@ datasets. They are used internally by the nlme.mmkin() method." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -150,7 +147,7 @@ datasets. They are used internally by the nlme.mmkin() method." /> <p>These functions facilitate setting up a nonlinear mixed effects model for an mmkin row object. An mmkin row object is essentially a list of mkinfit objects that have been obtained by fitting the same model to a list of -datasets. They are used internally by the <code><a href='nlme.mmkin.html'>nlme.mmkin()</a></code> method.</p> +datasets.</p> </div> <pre class="usage"><span class='fu'>nlme_function</span>(<span class='no'>object</span>) @@ -178,7 +175,7 @@ datasets. They are used internally by the <code><a href='nlme.mmkin.html'>nlme.m <p>If random is FALSE (default), a named vector containing mean values of the fitted degradation model parameters. If random is TRUE, a list with fixed and random effects, in the format required by the start argument of -nlme for the case of a single grouping variable ds.</p> +nlme for the case of a single grouping variable ds?</p> <p>A <code><a href='https://rdrr.io/pkg/nlme/man/groupedData.html'>groupedData</a></code> object</p> <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> @@ -225,28 +222,28 @@ nlme for the case of a single grouping variable ds.</p> #> Model: value ~ nlme_f(name, time, parent_0, log_k_parent_sink) #> Data: grouped_data #> AIC BIC logLik -#> 298.2781 307.7372 -144.1391 +#> 252.7798 262.1358 -121.3899 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1) #> Level: ds #> Structure: Diagonal -#> parent_0 log_k_parent_sink Residual -#> StdDev: 0.9374733 0.7098105 3.83543 +#> parent_0 log_k_parent_sink Residual +#> StdDev: 0.004139378 0.6800778 2.489396 #> #> Fixed effects: parent_0 + log_k_parent_sink ~ 1 -#> Value Std.Error DF t-value p-value -#> parent_0 101.76838 1.1445444 45 88.91606 0 -#> log_k_parent_sink -3.05444 0.4195622 45 -7.28008 0 +#> Value Std.Error DF t-value p-value +#> parent_0 101.74884 0.6456057 44 157.60213 0 +#> log_k_parent_sink -3.05575 0.4015812 44 -7.60929 0 #> Correlation: #> prnt_0 -#> log_k_parent_sink 0.034 +#> log_k_parent_sink 0.026 #> #> Standardized Within-Group Residuals: -#> Min Q1 Med Q3 Max -#> -2.6169360 -0.2185329 0.0574070 0.5720937 3.0459868 +#> Min Q1 Med Q3 Max +#> -2.13168782 -0.68780415 0.08282907 0.85913228 2.95298904 #> -#> Number of Observations: 49 +#> Number of Observations: 48 #> Number of Groups: 3 </div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='fu'><a href='https://rdrr.io/pkg/nlme/man/augPred.html'>augPred</a></span>(<span class='no'>m_nlme</span>, <span class='kw'>level</span> <span class='kw'>=</span> <span class='fl'>0</span>:<span class='fl'>1</span>), <span class='kw'>layout</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>1</span>))</div><div class='img'><img src='nlme-1.png' alt='' width='700' height='433' /></div><div class='input'># augPred does not seem to work on fits with more than one state # variable diff --git a/docs/reference/nlme.mmkin.html b/docs/reference/nlme.mmkin.html index 2ada9501..c0fb499d 100644 --- a/docs/reference/nlme.mmkin.html +++ b/docs/reference/nlme.mmkin.html @@ -74,7 +74,7 @@ have been obtained by fitting the same model to a list of datasets." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -111,9 +111,6 @@ have been obtained by fitting the same model to a list of datasets." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -184,7 +181,7 @@ have been obtained by fitting the same model to a list of datasets.</p> </tr> <tr> <th>data</th> - <td><p>Ignored, data are taken from the mmkin model</p></td> + <td><p>Should the data be printed?</p></td> </tr> <tr> <th>fixed</th> @@ -274,19 +271,19 @@ with additional elements</p> #> Log-likelihood: -307.5269 #> Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1) #> parent_0 log_k_parent_sink -#> 85.541149 -3.229596 +#> 85.540979 -3.229602 #> #> Random effects: #> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1) #> Level: ds #> Structure: Diagonal #> parent_0 log_k_parent_sink Residual -#> StdDev: 1.30857 1.288591 6.304906 +#> StdDev: 1.308245 1.288586 6.304923 #> #> Number of Observations: 90 #> Number of Groups: 5 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#> $distimes #> DT50 DT90 -#> parent 17.51545 58.18505 +#> parent 17.51556 58.18543 #> </div><div class='input'><span class='co'># \dontrun{</span> <span class='no'>f_nlme_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>, <span class='kw'>start</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent_0</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>log_k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>)) <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>f_nlme_2</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>parent_0</span> ~ <span class='fl'>1</span>)</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood @@ -300,7 +297,7 @@ with additional elements</p> #> Random effects: #> Formula: parent_0 ~ 1 | ds #> parent_0 Residual -#> StdDev: 0.002416792 21.63027 +#> StdDev: 0.002416802 21.63027 #> #> Number of Observations: 90 #> Number of Groups: 5 </div><div class='input'> <span class='co'># Test on some real data</span> @@ -332,88 +329,88 @@ with additional elements</p> <span class='no'>f_nlme_fomc_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, ], <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>pnlsMaxIter</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>tolerance</span> <span class='kw'>=</span> <span class='fl'>1e-4</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> #> **Iteration 1 -#> LME step: Loglik: -394.1603, nlminb iterations: 3 +#> LME step: Loglik: -394.1603, nlminb iterations: 2 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -0.2079793 0.8563830 1.7454105 1.0917354 1.2756825 +#> -0.2079863 0.8563823 1.7454253 1.0917707 1.2756955 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.8803 -#> fixed effects: 94.17379 -5.473193 -0.6970236 -0.2025091 2.103883 +#> PNLS step: RSS = 643.8814 +#> fixed effects: 94.17379 -5.473189 -0.6970234 -0.202509 2.103883 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 0.7960134 0.1447728 +#> 0.7959873 0.1447512 #> #> **Iteration 2 #> LME step: Loglik: -396.3824, nlminb iterations: 7 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -1.712404e-01 -2.432655e-05 1.842120e+00 1.073975e+00 1.322925e+00 +#> -1.712406e-01 -2.278541e-05 1.842120e+00 1.073975e+00 1.322924e+00 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.8035 -#> fixed effects: 94.17385 -5.473487 -0.6970404 -0.2025137 2.103871 +#> PNLS step: RSS = 643.8025 +#> fixed effects: 94.17385 -5.473491 -0.6970406 -0.2025139 2.103871 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): -#> fixed reStruct -#> 5.382757e-05 1.236667e-03 +#> fixed reStruct +#> 5.51758e-05 1.26861e-03 #> #> **Iteration 3 #> LME step: Loglik: -396.3825, nlminb iterations: 7 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -0.1712499044 -0.0001499831 1.8420971364 1.0739799123 1.3229167796 +#> -0.1712500923 -0.0001515734 1.8420972550 1.0739796967 1.3229177241 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.7948 -#> fixed effects: 94.17386 -5.473521 -0.6970422 -0.2025144 2.10387 +#> PNLS step: RSS = 643.7941 +#> fixed effects: 94.17386 -5.473523 -0.6970424 -0.2025146 2.103869 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 6.072817e-06 1.400857e-04 +#> 5.792621e-06 1.335434e-04 #> #> **Iteration 4 #> LME step: Loglik: -396.3825, nlminb iterations: 7 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -0.1712529502 -0.0001641277 1.8420957542 1.0739797181 1.3229173076 +#> -0.1712517206 -0.0001651603 1.8420950864 1.0739800294 1.3229173529 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.7936 -#> fixed effects: 94.17386 -5.473526 -0.6970426 -0.2025146 2.103869 +#> PNLS step: RSS = 643.7949 +#> fixed effects: 94.17386 -5.473521 -0.6970423 -0.2025145 2.10387 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 1.027451e-06 2.275704e-05 </div><div class='input'> <span class='no'>f_nlme_dfop_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, ], +#> 4.025781e-07 9.628656e-06 </div><div class='input'> <span class='no'>f_nlme_dfop_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, ], <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>pnlsMaxIter</span> <span class='kw'>=</span> <span class='fl'>120</span>, <span class='kw'>tolerance</span> <span class='kw'>=</span> <span class='fl'>5e-4</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> #> **Iteration 1 -#> LME step: Loglik: -404.9582, nlminb iterations: 1 +#> LME step: Loglik: -404.9583, nlminb iterations: 1 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 ds6 -#> -0.4114355 0.9798697 1.6990037 0.7293315 0.3354323 1.7113046 +#> -0.4114357 0.9798641 1.6990035 0.7293314 0.3354323 1.7113047 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 630.3644 -#> fixed effects: 93.82269 -5.455991 -0.6788957 -1.862196 -4.199671 0.05532828 +#> PNLS step: RSS = 630.3642 +#> fixed effects: 93.82269 -5.455991 -0.6788957 -1.862196 -4.199671 0.0553284 #> iterations: 120 #> Convergence crit. (must all become <= tolerance = 0.0005): #> fixed reStruct -#> 0.7885368 0.5822683 +#> 0.7879730 0.5822574 #> #> **Iteration 2 #> LME step: Loglik: -407.7755, nlminb iterations: 11 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 ds6 -#> -0.371224133 0.003056179 1.789939402 0.724671158 0.301602977 1.754200729 +#> -0.371224105 0.003056163 1.789939431 0.724671132 0.301602942 1.754200482 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 630.3633 -#> fixed effects: 93.82269 -5.455992 -0.6788958 -1.862196 -4.199671 0.05532831 +#> PNLS step: RSS = 630.364 +#> fixed effects: 93.82269 -5.455991 -0.6788958 -1.862196 -4.199671 0.05532834 #> iterations: 120 #> Convergence crit. (must all become <= tolerance = 0.0005): #> fixed reStruct -#> 4.789774e-07 2.200661e-05 </div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_fomc_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'> +#> 9.814652e-07 1.059239e-05 </div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_fomc_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-6.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-7.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_fomc_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>)</div><div class='output co'>#> Model df AIC BIC logLik Test L.Ratio p-value -#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9273 -#> f_nlme_fomc_sfo 2 11 818.5149 853.0087 -398.2575 1 vs 2 21.33975 <.0001 -#> f_nlme_sfo_sfo 3 9 1085.1821 1113.4043 -533.5910 2 vs 3 270.66716 <.0001</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>) <span class='co'># if we ignore FOMC</span></div><div class='output co'>#> Model df AIC BIC logLik Test L.Ratio p-value -#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9273 +#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9274 +#> f_nlme_fomc_sfo 2 11 818.5151 853.0089 -398.2576 1 vs 2 21.33957 <.0001 +#> f_nlme_sfo_sfo 3 9 1085.1821 1113.4043 -533.5910 2 vs 3 270.66697 <.0001</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>) <span class='co'># if we ignore FOMC</span></div><div class='output co'>#> Model df AIC BIC logLik Test L.Ratio p-value +#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9274 #> f_nlme_sfo_sfo 2 9 1085.1821 1113.4043 -533.5910 1 vs 2 249.3274 <.0001</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme_sfo_sfo</span>)</div><div class='output co'>#> $ff #> parent_sink parent_A1 A1_sink @@ -430,7 +427,7 @@ with additional elements</p> #> $distimes #> DT50 DT90 DT50_k1 DT50_k2 #> parent 11.07091 104.6320 4.462384 46.20825 -#> A1 162.30536 539.1667 NA NA +#> A1 162.30518 539.1661 NA NA #> </div><div class='input'># } </div></pre> </div> diff --git a/docs/reference/parms.html b/docs/reference/parms.html index 2fe91c26..f62b3898 100644 --- a/docs/reference/parms.html +++ b/docs/reference/parms.html @@ -74,7 +74,7 @@ considering the error structure that was assumed for the fit." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -111,9 +111,6 @@ considering the error structure that was assumed for the fit." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -154,9 +151,6 @@ considering the error structure that was assumed for the fit.</p> <pre class="usage"><span class='fu'>parms</span>(<span class='no'>object</span>, <span class='no'>...</span>) <span class='co'># S3 method for mkinfit</span> -<span class='fu'>parms</span>(<span class='no'>object</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>) - -<span class='co'># S3 method for mmkin</span> <span class='fu'>parms</span>(<span class='no'>object</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> @@ -164,8 +158,7 @@ considering the error structure that was assumed for the fit.</p> <colgroup><col class="name" /><col class="desc" /></colgroup> <tr> <th>object</th> - <td><p>A fitted model object. Methods are implemented for -<code><a href='mkinfit.html'>mkinfit()</a></code> objects and for <code><a href='mmkin.html'>mmkin()</a></code> objects.</p></td> + <td><p>A fitted model object</p></td> </tr> <tr> <th>...</th> @@ -180,88 +173,24 @@ as used internally during the optimisation?</p></td> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - <p>For mkinfit objects, a numeric vector of fitted model parameters. -For mmkin row objects, a matrix with the parameters with a -row for each dataset. If the mmkin object has more than one row, a list of -such matrices is returned.</p> + <p>A numeric vector of fitted model parameters</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='co'># mkinfit objects</span> -<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>parms</span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 k_parent_sink sigma + <pre class="examples"><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>)</div><div class='output co'>#> <span class='message'>Ordinary least squares optimisation</span></div><div class='output co'>#> Sum of squared residuals at call 1: 2388.077 +#> Sum of squared residuals at call 3: 2388.077 +#> Sum of squared residuals at call 4: 247.1962 +#> Sum of squared residuals at call 7: 200.6791 +#> Sum of squared residuals at call 10: 197.7231 +#> Sum of squared residuals at call 11: 197.0872 +#> Sum of squared residuals at call 14: 196.535 +#> Sum of squared residuals at call 15: 196.535 +#> Sum of squared residuals at call 16: 196.535 +#> Sum of squared residuals at call 17: 196.5334 +#> Sum of squared residuals at call 20: 196.5334 +#> Sum of squared residuals at call 25: 196.5334 +#> Negative log-likelihood at call 31: 26.64668</div><div class='output co'>#> <span class='message'>Optimisation successfully terminated.</span></div><div class='input'><span class='fu'>parms</span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 k_parent_sink sigma #> 82.4921598 0.3060633 4.6730124 </div><div class='input'><span class='fu'>parms</span>(<span class='no'>fit</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink sigma -#> 82.492160 -1.183963 4.673012 </div><div class='input'> -<span class='co'># mmkin objects</span> -<span class='no'>ds</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>], - <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)])) -<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>ds</span>) <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>6</span>:<span class='fl'>10</span>) -<span class='co'># \dontrun{</span> -<span class='no'>fits</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>) -<span class='fu'>parms</span>(<span class='no'>fits</span>[<span class='st'>"SFO"</span>, ])</div><div class='output co'>#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450 -#> k_parent_sink 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421 -#> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673</div><div class='input'><span class='fu'>parms</span>(<span class='no'>fits</span>[, <span class='fl'>2</span>])</div><div class='output co'>#> $SFO -#> Dataset 7 -#> parent_0 82.666781678 -#> k_parent_sink 0.009647805 -#> sigma 7.040168584 -#> -#> $FOMC -#> Dataset 7 -#> parent_0 92.6837649 -#> alpha 0.4967832 -#> beta 14.1451255 -#> sigma 1.9167519 -#> -#> $DFOP -#> Dataset 7 -#> parent_0 91.058971503 -#> k1 0.044946770 -#> k2 0.002868336 -#> g 0.526942415 -#> sigma 2.221302196 -#> </div><div class='input'><span class='fu'>parms</span>(<span class='no'>fits</span>)</div><div class='output co'>#> $SFO -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450 -#> k_parent_sink 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421 -#> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673 -#> -#> $FOMC -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481458 -#> alpha 1.338667 0.4967832 1.639099 1.074460 0.2805272 -#> beta 13.033315 14.1451255 5.007077 4.397126 6.9052224 -#> sigma 1.847671 1.9167519 1.066063 3.146056 1.6222778 -#> -#> $DFOP -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 96.55213663 91.058971503 90.34509469 98.14858850 94.311323409 -#> k1 0.21954589 0.044946770 0.41232289 0.31697588 0.080663853 -#> k2 0.02957934 0.002868336 0.07581767 0.03260384 0.003425417 -#> g 0.44845068 0.526942415 0.66091965 0.65322767 0.342652880 -#> sigma 1.35690468 2.221302196 1.34169076 2.87159846 1.942067831 -#> </div><div class='input'><span class='fu'>parms</span>(<span class='no'>fits</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> $SFO -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 88.522754 82.666782 86.854731 91.777931 82.148094 -#> log_k_parent_sink -2.848234 -4.641025 -1.559232 -2.093737 -4.933090 -#> sigma 5.152745 7.040169 3.676964 6.466923 6.504577 -#> -#> $FOMC -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 95.5585751 92.6837649 90.7197870 98.38393897 94.848146 -#> log_alpha 0.2916741 -0.6996015 0.4941466 0.07181816 -1.271085 -#> log_beta 2.5675088 2.6493701 1.6108523 1.48095106 1.932278 -#> sigma 1.8476712 1.9167519 1.0660627 3.14605557 1.622278 -#> -#> $DFOP -#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 -#> parent_0 96.5521366 91.05897150 90.3450947 98.1485885 94.311323 -#> log_k1 -1.5161940 -3.10227638 -0.8859485 -1.1489296 -2.517465 -#> log_k2 -3.5206791 -5.85402317 -2.5794240 -3.4233253 -5.676532 -#> g_ilr -0.1463234 0.07627854 0.4719196 0.4477805 -0.460676 -#> sigma 1.3569047 2.22130220 1.3416908 2.8715985 1.942068 -#> </div><div class='input'># } -</div></pre> +#> 82.492160 -1.183963 4.673012 </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <nav id="toc" data-toggle="toc" class="sticky-top"> diff --git a/docs/reference/plot.nlme.mmkin-2.png b/docs/reference/plot.nlme.mmkin-2.png Binary files differindex 265fd2e0..c82d0271 100644 --- a/docs/reference/plot.nlme.mmkin-2.png +++ b/docs/reference/plot.nlme.mmkin-2.png diff --git a/docs/reference/saemix-1.png b/docs/reference/saemix-1.png Binary files differdeleted file mode 100644 index 0d79300d..00000000 --- a/docs/reference/saemix-1.png +++ /dev/null diff --git a/docs/reference/saemix-2.png b/docs/reference/saemix-2.png Binary files differdeleted file mode 100644 index 04de70b5..00000000 --- a/docs/reference/saemix-2.png +++ /dev/null diff --git a/docs/reference/saemix-3.png b/docs/reference/saemix-3.png Binary files differdeleted file mode 100644 index 7ccfd0ff..00000000 --- a/docs/reference/saemix-3.png +++ /dev/null diff --git a/docs/reference/saemix-4.png b/docs/reference/saemix-4.png Binary files differdeleted file mode 100644 index 55698bba..00000000 --- a/docs/reference/saemix-4.png +++ /dev/null diff --git a/docs/reference/saemix-5.png b/docs/reference/saemix-5.png Binary files differdeleted file mode 100644 index 27db3938..00000000 --- a/docs/reference/saemix-5.png +++ /dev/null diff --git a/docs/reference/saemix.html b/docs/reference/saemix.html deleted file mode 100644 index d3eb216c..00000000 --- a/docs/reference/saemix.html +++ /dev/null @@ -1,446 +0,0 @@ -<!-- Generated by pkgdown: do not edit by hand --> -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> -<meta http-equiv="X-UA-Compatible" content="IE=edge"> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> - -<title>Create saemix models from mmkin row objects — saemix_model • mkin</title> - - -<!-- jquery --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" /> - -<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script> - -<!-- bootstrap-toc --> -<link rel="stylesheet" href="../bootstrap-toc.css"> -<script src="../bootstrap-toc.js"></script> - -<!-- Font Awesome icons --> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" /> -<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" /> - -<!-- clipboard.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script> - -<!-- headroom.js --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script> - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../pkgdown.js"></script> - - - - -<meta property="og:title" content="Create saemix models from mmkin row objects — saemix_model" /> -<meta property="og:description" content="This function sets up a nonlinear mixed effects model for an mmkin row -object for use with the saemix package. An mmkin row object is essentially a -list of mkinfit objects that have been obtained by fitting the same model to -a list of datasets." /> - - - - -<!-- mathjax --> -<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script> -<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script> - -<!--[if lt IE 9]> -<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> -<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> -<![endif]--> - - - - </head> - - <body data-spy="scroll" data-target="#toc"> - <div class="container template-reference-topic"> - <header> - <div class="navbar navbar-default navbar-fixed-top" role="navigation"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false"> - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <span class="navbar-brand"> - <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> - </span> - </div> - - <div id="navbar" class="navbar-collapse collapse"> - <ul class="nav navbar-nav"> - <li> - <a href="../reference/index.html">Functions and data</a> -</li> -<li class="dropdown"> - <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> - Articles - - <span class="caret"></span> - </a> - <ul class="dropdown-menu" role="menu"> - <li> - <a href="../articles/mkin.html">Introduction to mkin</a> - </li> - <li> - <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a> - </li> - <li> - <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> - </li> - <li> - <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> - </li> - <li> - <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> - </li> - <li> - <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a> - </li> - <li> - <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> - </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> - </ul> -</li> -<li> - <a href="../news/index.html">News</a> -</li> - </ul> - <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin/"> - <span class="fab fa fab fa-github fa-lg"></span> - - </a> -</li> - </ul> - - </div><!--/.nav-collapse --> - </div><!--/.container --> -</div><!--/.navbar --> - - - - </header> - -<div class="row"> - <div class="col-md-9 contents"> - <div class="page-header"> - <h1>Create saemix models from mmkin row objects</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/saemix.R'><code>R/saemix.R</code></a></small> - <div class="hidden name"><code>saemix.Rd</code></div> - </div> - - <div class="ref-description"> - <p>This function sets up a nonlinear mixed effects model for an mmkin row -object for use with the saemix package. An mmkin row object is essentially a -list of mkinfit objects that have been obtained by fitting the same model to -a list of datasets.</p> - </div> - - <pre class="usage"><span class='fu'>saemix_model</span>(<span class='no'>object</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>()) - -<span class='fu'>saemix_data</span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre> - - <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> - <table class="ref-arguments"> - <colgroup><col class="name" /><col class="desc" /></colgroup> - <tr> - <th>object</th> - <td><p>An mmkin row object containing several fits of the same model to different datasets</p></td> - </tr> - <tr> - <th>cores</th> - <td><p>The number of cores to be used for multicore processing. -On Windows machines, cores > 1 is currently not supported.</p></td> - </tr> - <tr> - <th>...</th> - <td><p>Further parameters passed to <a href='https://rdrr.io/pkg/saemix/man/saemixData.html'>saemix::saemixData</a></p></td> - </tr> - </table> - - <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - - <p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixModel-class.html'>saemix::SaemixModel</a> object.</p> -<p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixData-class.html'>saemix::SaemixData</a> object.</p> - <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> - - <p>Starting values for the fixed effects (population mean parameters, argument psi0 of -<code><a href='https://rdrr.io/pkg/saemix/man/saemixModel.html'>saemix::saemixModel()</a></code> are the mean values of the parameters found using -mmkin. Starting variances of the random effects (argument omega.init) are the -variances of the deviations of the parameters from these mean values.</p> - - <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='no'>ds</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>], - <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)])) -<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>ds</span>) <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>6</span>:<span class='fl'>10</span>) -<span class='no'>sfo_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>), - <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># \dontrun{</span> -<span class='no'>f_mmkin</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>sfo_sfo</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>saemix</span>)</div><div class='output co'>#> <span class='message'>Package saemix, version 3.1.9000</span> -#> <span class='message'> please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr</span></div><div class='input'><span class='no'>m_saemix</span> <span class='kw'><-</span> <span class='fu'>saemix_model</span>(<span class='no'>f_mmkin</span>)</div><div class='output co'>#> -#> -#> The following SaemixModel object was successfully created: -#> -#> Nonlinear mixed-effects model -#> Model function: Mixed model generated from mmkin object Model type: structural -#> function (psi, id, xidep) -#> { -#> uid <- unique(id) -#> res_list <- parallel::mclapply(uid, function(i) { -#> transparms_optim <- psi[i, ] -#> names(transparms_optim) <- names(degparms_optim) -#> odeini_optim <- transparms_optim[odeini_optim_parm_names] -#> names(odeini_optim) <- gsub("_0$", "", odeini_optim_parm_names) -#> odeini <- c(odeini_optim, odeini_fixed)[names(mkin_model$diffs)] -#> ode_transparms_optim_names <- setdiff(names(transparms_optim), -#> odeini_optim_parm_names) -#> odeparms_optim <- backtransform_odeparms(transparms_optim[ode_transparms_optim_names], -#> mkin_model, transform_rates = object[[1]]$transform_rates, -#> transform_fractions = object[[1]]$transform_fractions) -#> odeparms <- c(odeparms_optim, odeparms_fixed) -#> xidep_i <- subset(xidep, id == i) -#> if (analytical) { -#> out_values <- mkin_model$deg_func(xidep_i, odeini, -#> odeparms) -#> } -#> else { -#> i_time <- xidep_i$time -#> i_name <- xidep_i$name -#> out_wide <- mkinpredict(mkin_model, odeparms = odeparms, -#> odeini = odeini, solution_type = object[[1]]$solution_type, -#> outtimes = sort(unique(i_time))) -#> out_index <- cbind(as.character(i_time), as.character(i_name)) -#> out_values <- out_wide[out_index] -#> } -#> return(out_values) -#> }, mc.cores = cores) -#> res <- unlist(res_list) -#> return(res) -#> } -#> <bytecode: 0x555559668108> -#> <environment: 0x555559677c08> -#> Nb of parameters: 4 -#> parameter names: parent_0 log_k_parent log_k_A1 f_parent_ilr_1 -#> distribution: -#> Parameter Distribution Estimated -#> [1,] parent_0 normal Estimated -#> [2,] log_k_parent normal Estimated -#> [3,] log_k_A1 normal Estimated -#> [4,] f_parent_ilr_1 normal Estimated -#> Variance-covariance matrix: -#> parent_0 log_k_parent log_k_A1 f_parent_ilr_1 -#> parent_0 1 0 0 0 -#> log_k_parent 0 1 0 0 -#> log_k_A1 0 0 1 0 -#> f_parent_ilr_1 0 0 0 1 -#> Error model: constant , initial values: a.1=1 -#> No covariate in the model. -#> Initial values -#> parent_0 log_k_parent log_k_A1 f_parent_ilr_1 -#> Pop.CondInit 86.53449 -3.207005 -3.060308 -1.920449</div><div class='input'><span class='no'>d_saemix</span> <span class='kw'><-</span> <span class='fu'>saemix_data</span>(<span class='no'>f_mmkin</span>)</div><div class='output co'>#> -#> -#> The following SaemixData object was successfully created: -#> -#> Object of class SaemixData -#> longitudinal data for use with the SAEM algorithm -#> Dataset ds_saemix -#> Structured data: value ~ time + name | ds -#> X variable for graphs: time () </div><div class='input'><span class='no'>saemix_options</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456</span>, - <span class='kw'>save</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>save.graphs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>displayProgress</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>nbiter.saemix</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>200</span>, <span class='fl'>80</span>)) -<span class='no'>f_saemix</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix</a></span>(<span class='no'>m_saemix</span>, <span class='no'>d_saemix</span>, <span class='no'>saemix_options</span>)</div><div class='output co'>#> Running main SAEM algorithm -#> [1] "Tue May 26 18:25:16 2020" -#> .. -#> Minimisation finished -#> [1] "Tue May 26 18:31:09 2020"</div><div class='img'><img src='saemix-1.png' alt='' width='700' height='433' /></div><div class='output co'>#> Nonlinear mixed-effects model fit by the SAEM algorithm -#> ----------------------------------- -#> ---- Data ---- -#> ----------------------------------- -#> Object of class SaemixData -#> longitudinal data for use with the SAEM algorithm -#> Dataset ds_saemix -#> Structured data: value ~ time + name | ds -#> X variable for graphs: time () -#> Dataset characteristics: -#> number of subjects: 5 -#> number of observations: 170 -#> average/min/max nb obs: 34.00 / 30 / 38 -#> First 10 lines of data: -#> ds time name value mdv cens occ ytype -#> 1 Dataset 6 0 parent 97.2 0 0 1 1 -#> 2 Dataset 6 0 parent 96.4 0 0 1 1 -#> 3 Dataset 6 3 parent 71.1 0 0 1 1 -#> 4 Dataset 6 3 parent 69.2 0 0 1 1 -#> 5 Dataset 6 6 parent 58.1 0 0 1 1 -#> 6 Dataset 6 6 parent 56.6 0 0 1 1 -#> 7 Dataset 6 10 parent 44.4 0 0 1 1 -#> 8 Dataset 6 10 parent 43.4 0 0 1 1 -#> 9 Dataset 6 20 parent 33.3 0 0 1 1 -#> 10 Dataset 6 20 parent 29.2 0 0 1 1 -#> ----------------------------------- -#> ---- Model ---- -#> ----------------------------------- -#> Nonlinear mixed-effects model -#> Model function: Mixed model generated from mmkin object Model type: structural -#> function (psi, id, xidep) -#> { -#> uid <- unique(id) -#> res_list <- parallel::mclapply(uid, function(i) { -#> transparms_optim <- psi[i, ] -#> names(transparms_optim) <- names(degparms_optim) -#> odeini_optim <- transparms_optim[odeini_optim_parm_names] -#> names(odeini_optim) <- gsub("_0$", "", odeini_optim_parm_names) -#> odeini <- c(odeini_optim, odeini_fixed)[names(mkin_model$diffs)] -#> ode_transparms_optim_names <- setdiff(names(transparms_optim), -#> odeini_optim_parm_names) -#> odeparms_optim <- backtransform_odeparms(transparms_optim[ode_transparms_optim_names], -#> mkin_model, transform_rates = object[[1]]$transform_rates, -#> transform_fractions = object[[1]]$transform_fractions) -#> odeparms <- c(odeparms_optim, odeparms_fixed) -#> xidep_i <- subset(xidep, id == i) -#> if (analytical) { -#> out_values <- mkin_model$deg_func(xidep_i, odeini, -#> odeparms) -#> } -#> else { -#> i_time <- xidep_i$time -#> i_name <- xidep_i$name -#> out_wide <- mkinpredict(mkin_model, odeparms = odeparms, -#> odeini = odeini, solution_type = object[[1]]$solution_type, -#> outtimes = sort(unique(i_time))) -#> out_index <- cbind(as.character(i_time), as.character(i_name)) -#> out_values <- out_wide[out_index] -#> } -#> return(out_values) -#> }, mc.cores = cores) -#> res <- unlist(res_list) -#> return(res) -#> } -#> <bytecode: 0x555559668108> -#> <environment: 0x555559677c08> -#> Nb of parameters: 4 -#> parameter names: parent_0 log_k_parent log_k_A1 f_parent_ilr_1 -#> distribution: -#> Parameter Distribution Estimated -#> [1,] parent_0 normal Estimated -#> [2,] log_k_parent normal Estimated -#> [3,] log_k_A1 normal Estimated -#> [4,] f_parent_ilr_1 normal Estimated -#> Variance-covariance matrix: -#> parent_0 log_k_parent log_k_A1 f_parent_ilr_1 -#> parent_0 1 0 0 0 -#> log_k_parent 0 1 0 0 -#> log_k_A1 0 0 1 0 -#> f_parent_ilr_1 0 0 0 1 -#> Error model: constant , initial values: a.1=1 -#> No covariate in the model. -#> Initial values -#> parent_0 log_k_parent log_k_A1 f_parent_ilr_1 -#> Pop.CondInit 86.53449 -3.207005 -3.060308 -1.920449 -#> ----------------------------------- -#> ---- Key algorithm options ---- -#> ----------------------------------- -#> Estimation of individual parameters (MAP) -#> Estimation of standard errors and linearised log-likelihood -#> Estimation of log-likelihood by importance sampling -#> Number of iterations: K1=200, K2=80 -#> Number of chains: 10 -#> Seed: 123456 -#> Number of MCMC iterations for IS: 5000 -#> Simulations: -#> nb of simulated datasets used for npde: 1000 -#> nb of simulated datasets used for VPC: 100 -#> Input/output -#> save the results to a file: FALSE -#> save the graphs to files: FALSE -#> ---------------------------------------------------- -#> ---- Results ---- -#> ---------------------------------------------------- -#> ----------------- Fixed effects ------------------ -#> ---------------------------------------------------- -#> Parameter Estimate SE CV(%) -#> [1,] parent_0 86.14 1.61 1.9 -#> [2,] log_k_parent -3.21 0.59 18.5 -#> [3,] log_k_A1 -4.66 0.30 6.4 -#> [4,] f_parent_ilr_1 -0.33 0.30 91.7 -#> [5,] a.1 4.68 0.27 5.8 -#> ---------------------------------------------------- -#> ----------- Variance of random effects ----------- -#> ---------------------------------------------------- -#> Parameter Estimate SE CV(%) -#> parent_0 omega2.parent_0 7.71 8.14 106 -#> log_k_parent omega2.log_k_parent 1.76 1.12 63 -#> log_k_A1 omega2.log_k_A1 0.26 0.26 101 -#> f_parent_ilr_1 omega2.f_parent_ilr_1 0.39 0.28 71 -#> ---------------------------------------------------- -#> ------ Correlation matrix of random effects ------ -#> ---------------------------------------------------- -#> omega2.parent_0 omega2.log_k_parent omega2.log_k_A1 -#> omega2.parent_0 1 0 0 -#> omega2.log_k_parent 0 1 0 -#> omega2.log_k_A1 0 0 1 -#> omega2.f_parent_ilr_1 0 0 0 -#> omega2.f_parent_ilr_1 -#> omega2.parent_0 0 -#> omega2.log_k_parent 0 -#> omega2.log_k_A1 0 -#> omega2.f_parent_ilr_1 1 -#> ---------------------------------------------------- -#> --------------- Statistical criteria ------------- -#> ---------------------------------------------------- -#> Likelihood computed by linearisation -#> -2LL= 1064.364 -#> AIC = 1082.364 -#> BIC = 1078.848 -#> -#> Likelihood computed by importance sampling -#> -2LL= 1063.462 -#> AIC = 1081.462 -#> BIC = 1077.947 -#> ----------------------------------------------------</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span>(<span class='no'>f_saemix</span>, <span class='kw'>plot.type</span> <span class='kw'>=</span> <span class='st'>"convergence"</span>)</div><div class='output co'>#> Plotting convergence plots</div><div class='img'><img src='saemix-2.png' alt='' width='700' height='433' /></div><div class='input'># } -</div></pre> - </div> - <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> - <nav id="toc" data-toggle="toc" class="sticky-top"> - <h2 data-toc-skip>Contents</h2> - </nav> - </div> -</div> - - - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> -</div> - -<div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> -</div> - - </footer> - </div> - - - - - </body> -</html> - - diff --git a/docs/reference/schaefer07_complex_case-1.png b/docs/reference/schaefer07_complex_case-1.png Binary files differindex 40a1ed45..7cf7484d 100644 --- a/docs/reference/schaefer07_complex_case-1.png +++ b/docs/reference/schaefer07_complex_case-1.png diff --git a/docs/reference/schaefer07_complex_case.html b/docs/reference/schaefer07_complex_case.html index dcecc9b5..70f1ee9a 100644 --- a/docs/reference/schaefer07_complex_case.html +++ b/docs/reference/schaefer07_complex_case.html @@ -180,15 +180,15 @@ <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='schaefer07_complex_case-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff #> parent_A1 parent_B1 parent_C1 parent_sink A1_A2 A1_sink -#> 0.3809618 0.1954667 0.4235715 0.0000000 0.4479625 0.5520375 +#> 0.3809619 0.1954667 0.4235714 0.0000000 0.4479609 0.5520391 #> #> $distimes #> DT50 DT90 #> parent 13.95078 46.34350 -#> A1 49.75346 165.27741 -#> B1 37.26904 123.80508 -#> C1 11.23130 37.30958 -#> A2 28.50628 94.69580 +#> A1 49.75343 165.27733 +#> B1 37.26907 123.80517 +#> C1 11.23131 37.30959 +#> A2 28.50638 94.69614 #> </div><div class='input'> <span class='co'># }</span> <span class='co'># Compare with the results obtained in the original publication</span> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>schaefer07_complex_results</span>)</div><div class='output co'>#> compound parameter KinGUI ModelMaker deviation diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index 55ce22cf..ad6217e6 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -231,15 +231,15 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, <pre class="examples"><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)), <span class='no'>FOCUS_2006_A</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Tue May 12 15:31:20 2020 -#> Date of summary: Tue May 12 15:31:20 2020 +#> Date of fit: Wed May 27 07:05:18 2020 +#> Date of summary: Wed May 27 07:05:18 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 131 model solutions performed in 0.027 s +#> Fitted using 131 model solutions performed in 0.026 s #> #> Error model: Constant variance #> @@ -271,9 +271,9 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, #> #> Parameter correlation: #> parent_0 log_k_parent sigma -#> parent_0 1.000e+00 5.428e-01 1.642e-07 -#> log_k_parent 5.428e-01 1.000e+00 2.507e-07 -#> sigma 1.642e-07 2.507e-07 1.000e+00 +#> parent_0 1.000e+00 5.428e-01 1.648e-07 +#> log_k_parent 5.428e-01 1.000e+00 2.513e-07 +#> sigma 1.648e-07 2.513e-07 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. diff --git a/docs/reference/synthetic_data_for_UBA_2014.html b/docs/reference/synthetic_data_for_UBA_2014.html index 17d2f973..1444be76 100644 --- a/docs/reference/synthetic_data_for_UBA_2014.html +++ b/docs/reference/synthetic_data_for_UBA_2014.html @@ -290,8 +290,8 @@ Compare also the code in the example section to see the degradation models." /> <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='synthetic_data_for_UBA_2014-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 #> R version used for fitting: 4.0.0 -#> Date of fit: Tue May 12 15:31:29 2020 -#> Date of summary: Tue May 12 15:31:29 2020 +#> Date of fit: Wed May 27 07:05:27 2020 +#> Date of summary: Wed May 27 07:05:27 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent @@ -300,7 +300,7 @@ Compare also the code in the example section to see the degradation models." /> #> #> Model predictions using solution type deSolve #> -#> Fitted using 819 model solutions performed in 0.619 s +#> Fitted using 817 model solutions performed in 0.627 s #> #> Error model: Constant variance #> @@ -352,15 +352,15 @@ Compare also the code in the example section to see the degradation models." /> #> log_k_M2 2.819e-02 7.166e-02 -3.929e-01 1.000e+00 -2.658e-01 #> f_parent_ilr_1 -4.624e-01 -5.682e-01 7.478e-01 -2.658e-01 1.000e+00 #> f_M1_ilr_1 1.614e-01 4.102e-01 -8.109e-01 5.419e-01 -8.605e-01 -#> sigma 1.285e-07 1.054e-07 -1.671e-07 3.644e-08 -2.503e-07 +#> sigma -1.384e-07 -2.581e-07 9.499e-08 1.518e-07 1.236e-07 #> f_M1_ilr_1 sigma -#> parent_0 1.614e-01 1.285e-07 -#> log_k_parent 4.102e-01 1.054e-07 -#> log_k_M1 -8.109e-01 -1.671e-07 -#> log_k_M2 5.419e-01 3.644e-08 -#> f_parent_ilr_1 -8.605e-01 -2.503e-07 -#> f_M1_ilr_1 1.000e+00 2.636e-07 -#> sigma 2.636e-07 1.000e+00 +#> parent_0 1.614e-01 -1.384e-07 +#> log_k_parent 4.102e-01 -2.581e-07 +#> log_k_M1 -8.109e-01 9.499e-08 +#> log_k_M2 5.419e-01 1.518e-07 +#> f_parent_ilr_1 -8.605e-01 1.236e-07 +#> f_M1_ilr_1 1.000e+00 8.795e-09 +#> sigma 8.795e-09 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -397,8 +397,8 @@ Compare also the code in the example section to see the degradation models." /> #> #> Data: #> time variable observed predicted residual -#> 0 parent 101.5 1.021e+02 -0.56249 -#> 0 parent 101.2 1.021e+02 -0.86249 +#> 0 parent 101.5 1.021e+02 -0.56248 +#> 0 parent 101.2 1.021e+02 -0.86248 #> 1 parent 53.9 4.873e+01 5.17118 #> 1 parent 47.5 4.873e+01 -1.22882 #> 3 parent 10.4 1.111e+01 -0.70773 @@ -407,8 +407,8 @@ Compare also the code in the example section to see the degradation models." /> #> 7 parent 0.3 5.772e-01 -0.27717 #> 14 parent 3.5 3.264e-03 3.49674 #> 28 parent 3.2 1.045e-07 3.20000 -#> 90 parent 0.6 9.531e-10 0.60000 -#> 120 parent 3.5 -5.940e-10 3.50000 +#> 90 parent 0.6 9.535e-10 0.60000 +#> 120 parent 3.5 -5.941e-10 3.50000 #> 1 M1 36.4 3.479e+01 1.61088 #> 1 M1 37.4 3.479e+01 2.61088 #> 3 M1 34.3 3.937e+01 -5.07027 @@ -418,9 +418,9 @@ Compare also the code in the example section to see the degradation models." /> #> 14 M1 5.8 1.995e+00 3.80469 #> 14 M1 1.2 1.995e+00 -0.79531 #> 60 M1 0.5 2.111e-06 0.50000 -#> 90 M1 3.2 -9.670e-10 3.20000 -#> 120 M1 1.5 7.670e-10 1.50000 -#> 120 M1 0.6 7.670e-10 0.60000 +#> 90 M1 3.2 -9.676e-10 3.20000 +#> 120 M1 1.5 7.671e-10 1.50000 +#> 120 M1 0.6 7.671e-10 0.60000 #> 1 M2 4.8 4.455e+00 0.34517 #> 3 M2 20.9 2.153e+01 -0.62527 #> 3 M2 19.3 2.153e+01 -2.22527 diff --git a/docs/reference/test_data_from_UBA_2014.html b/docs/reference/test_data_from_UBA_2014.html index 237149a5..6059a4d2 100644 --- a/docs/reference/test_data_from_UBA_2014.html +++ b/docs/reference/test_data_from_UBA_2014.html @@ -191,26 +191,26 @@ <span class='kw'>M3</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='no'>f_soil</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_soil</span>, <span class='no'>test_data_from_UBA_2014</span><span class='kw'>[[</span><span class='fl'>3</span>]]$<span class='no'>data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>f_soil</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"topright"</span>, <span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><div class='img'><img src='test_data_from_UBA_2014-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f_soil</span>)$<span class='no'>bpar</span></div><div class='output co'>#> Estimate se_notrans t value Pr(>t) Lower -#> parent_0 76.55425585 0.859186419 89.1008682 1.113862e-26 74.755958727 -#> k_parent 0.12081956 0.004601919 26.2541704 1.077361e-16 0.111561576 -#> k_M1 0.84258631 0.806165101 1.0451783 1.545282e-01 0.113778787 -#> k_M2 0.04210878 0.017083048 2.4649453 1.170195e-02 0.018013823 -#> k_M3 0.01122919 0.007245869 1.5497365 6.885076e-02 0.002909418 -#> f_parent_to_M1 0.32240194 0.240785506 1.3389591 9.819219e-02 NA -#> f_parent_to_M2 0.16099854 0.033691990 4.7785405 6.531222e-05 NA -#> f_M1_to_M3 0.27921506 0.269425556 1.0363347 1.565282e-01 0.022977927 -#> f_M2_to_M3 0.55641328 0.595121733 0.9349571 1.807710e-01 0.008002321 +#> parent_0 76.55425584 0.859186419 89.1008681 1.113862e-26 74.755958720 +#> k_parent 0.12081956 0.004601919 26.2541703 1.077361e-16 0.111561576 +#> k_M1 0.84258629 0.806165149 1.0451783 1.545282e-01 0.113778910 +#> k_M2 0.04210878 0.017083049 2.4649452 1.170195e-02 0.018013823 +#> k_M3 0.01122919 0.007245870 1.5497364 6.885076e-02 0.002909418 +#> f_parent_to_M1 0.32240193 0.240785518 1.3389590 9.819221e-02 NA +#> f_parent_to_M2 0.16099854 0.033691991 4.7785404 6.531224e-05 NA +#> f_M1_to_M3 0.27921506 0.269425582 1.0363346 1.565282e-01 0.022977955 +#> f_M2_to_M3 0.55641331 0.595121774 0.9349571 1.807710e-01 0.008002320 #> sigma 1.14005399 0.149696423 7.6157731 1.727024e-07 0.826735778 #> Upper -#> parent_0 78.35255298 +#> parent_0 78.35255297 #> k_parent 0.13084582 -#> k_M1 6.23975442 -#> k_M2 0.09843270 -#> k_M3 0.04334016 +#> k_M1 6.23974738 +#> k_M2 0.09843271 +#> k_M3 0.04334017 #> f_parent_to_M1 NA #> f_parent_to_M2 NA -#> f_M1_to_M3 0.86450919 -#> f_M2_to_M3 0.99489910 +#> f_M1_to_M3 0.86450905 +#> f_M2_to_M3 0.99489911 #> sigma 1.45337221</div><div class='input'> <span class='fu'><a href='mkinerrmin.html'>mkinerrmin</a></span>(<span class='no'>f_soil</span>)</div><div class='output co'>#> err.min n.optim df #> All data 0.09649963 9 20 #> parent 0.04721283 2 6 diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html index 7a9198de..9b84d6bf 100644 --- a/docs/reference/transform_odeparms.html +++ b/docs/reference/transform_odeparms.html @@ -77,7 +77,7 @@ the ilr transformation is used." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> </span> </div> @@ -114,9 +114,6 @@ the ilr transformation is used." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> - <li> - <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> - </li> </ul> </li> <li> @@ -214,12 +211,19 @@ fitting procedure.</p></td> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - <p>A vector of transformed or backtransformed parameters</p> + <p>A vector of transformed or backtransformed parameters with the same +names as the original parameters.</p> <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> <p>The transformation of sets of formation fractions is fragile, as it supposes the same ordering of the components in forward and backward transformation. This is no problem for the internal use in <code><a href='mkinfit.html'>mkinfit</a></code>.</p> + <h2 class="hasAnchor" id="functions"><a class="anchor" href="#functions"></a>Functions</h2> + + +<ul> +<li><p><code>backtransform_odeparms</code>: Backtransform the set of transformed parameters</p></li> +</ul> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> @@ -241,7 +245,7 @@ This is no problem for the internal use in <code><a href='mkinfit.html'>mkinfit< #> sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.8549</div><div class='input'> <span class='co'># \dontrun{</span> <span class='co'># Compare to the version without transforming rate parameters</span> -<span class='no'>fit.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='error'>Error in if (cost < cost.current) { assign("cost.current", cost, inherits = TRUE) if (!quiet) cat(ifelse(OLS, "Sum of squared residuals", "Negative log-likelihood"), " at call ", calls, ": ", cost.current, "\n", sep = "")}: missing value where TRUE/FALSE needed</span></div><div class='output co'>#> <span class='message'>Timing stopped at: 0.002 0.001 0.002</span></div><div class='input'><span class='no'>fit.2.s</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.2</span>)</div><div class='output co'>#> <span class='error'>Error in summary(fit.2): object 'fit.2' not found</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.2.s</span>$<span class='no'>par</span>, <span class='fl'>3</span>)</div><div class='output co'>#> <span class='error'>Error in print(fit.2.s$par, 3): object 'fit.2.s' not found</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.2.s</span>$<span class='no'>bpar</span>, <span class='fl'>3</span>)</div><div class='output co'>#> <span class='error'>Error in print(fit.2.s$bpar, 3): object 'fit.2.s' not found</span></div><div class='input'><span class='co'># }</span> +<span class='no'>fit.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='error'>Error in if (cost < cost.current) { assign("cost.current", cost, inherits = TRUE) if (!quiet) cat(ifelse(OLS, "Sum of squared residuals", "Negative log-likelihood"), " at call ", calls, ": ", cost.current, "\n", sep = "")}: missing value where TRUE/FALSE needed</span></div><div class='output co'>#> <span class='message'>Timing stopped at: 0.002 0 0.002</span></div><div class='input'><span class='no'>fit.2.s</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.2</span>)</div><div class='output co'>#> <span class='error'>Error in summary(fit.2): object 'fit.2' not found</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.2.s</span>$<span class='no'>par</span>, <span class='fl'>3</span>)</div><div class='output co'>#> <span class='error'>Error in print(fit.2.s$par, 3): object 'fit.2.s' not found</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.2.s</span>$<span class='no'>bpar</span>, <span class='fl'>3</span>)</div><div class='output co'>#> <span class='error'>Error in print(fit.2.s$bpar, 3): object 'fit.2.s' not found</span></div><div class='input'><span class='co'># }</span> <span class='no'>initials</span> <span class='kw'><-</span> <span class='no'>fit</span>$<span class='no'>start</span>$<span class='no'>value</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>initials</span>) <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/colnames.html'>rownames</a></span>(<span class='no'>fit</span>$<span class='no'>start</span>) diff --git a/docs/reference/update.mkinfit.html b/docs/reference/update.mkinfit.html index f958fc14..83b8c466 100644 --- a/docs/reference/update.mkinfit.html +++ b/docs/reference/update.mkinfit.html @@ -177,7 +177,7 @@ remove arguments given in the original call</p></td> <pre class="examples"><div class='input'><span class='co'># \dontrun{</span> <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 k_parent_sink sigma -#> 99.44423885 0.09793574 3.39632469 </div><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_err</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='update.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='no'>fit_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>fit</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>) +#> 99.44423886 0.09793574 3.39632469 </div><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_err</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='update.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='no'>fit_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>fit</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>) <span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit_2</span>)</div><div class='output co'>#> parent_0 k_parent_sink sigma_low rsd_high #> 1.008549e+02 1.005665e-01 3.752222e-03 6.763434e-02 </div><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_err</a></span>(<span class='no'>fit_2</span>)</div><div class='img'><img src='update.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'># } </div></pre> diff --git a/docs/sitemap.xml b/docs/sitemap.xml index e284abf6..81368436 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -172,9 +172,6 @@ <loc>https://pkgdown.jrwb.de/mkin/reference/residuals.mkinfit.html</loc> </url> <url> - <loc>https://pkgdown.jrwb.de/mkin/reference/saemix.html</loc> - </url> - <url> <loc>https://pkgdown.jrwb.de/mkin/reference/schaefer07_complex_case.html</loc> </url> <url> |