diff options
Diffstat (limited to 'docs/dev')
29 files changed, 339 insertions, 258 deletions
diff --git a/docs/dev/articles/index.html b/docs/dev/articles/index.html index 2aacc53a..c9116643 100644 --- a/docs/dev/articles/index.html +++ b/docs/dev/articles/index.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway.html b/docs/dev/articles/prebuilt/2022_cyan_pathway.html index 875f5ac9..7bb0fa5b 100644 --- a/docs/dev/articles/prebuilt/2022_cyan_pathway.html +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway.html @@ -34,7 +34,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> @@ -135,8 +135,8 @@ residue data on cyantraniliprole</h1> <h4 data-toc-skip class="author">Johannes Ranke</h4> - <h4 data-toc-skip class="date">Last change on 6 January -2023, last compiled on 16 April 2023</h4> + <h4 data-toc-skip class="date">Last change on 20 April 2023, +last compiled on 20 April 2023</h4> <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/vignettes/prebuilt/2022_cyan_pathway.rmd" class="external-link"><code>vignettes/prebuilt/2022_cyan_pathway.rmd</code></a></small> <div class="hidden name"><code>2022_cyan_pathway.rmd</code></div> @@ -156,7 +156,7 @@ be fitted with the mkin package.</p> 173340 (Application of nonlinear hierarchical models to the kinetic evaluation of chemical degradation data) of the German Environment Agency carried out in 2022 and 2023.</p> -<p>The mkin package is used in version 1.2.3 which is currently under +<p>The mkin package is used in version 1.2.4 which is currently under development. The newly introduced functionality that is used here is a simplification of excluding random effects for a set of fits based on a related set of fits with a reduced model, and the documentation of the @@ -174,11 +174,19 @@ processing, the <code>parallel</code> package is used.</p> <span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">saemix</span><span class="op">)</span></span> <span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">parallel</span><span class="op">)</span></span> <span><span class="va">n_cores</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/detectCores.html" class="external-link">detectCores</a></span><span class="op">(</span><span class="op">)</span></span> -<span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html" class="external-link">Sys.info</a></span><span class="op">(</span><span class="op">)</span><span class="op">[</span><span class="st">"sysname"</span><span class="op">]</span> <span class="op">==</span> <span class="st">"Windows"</span><span class="op">)</span> <span class="op">{</span></span> -<span> <span class="va">cl</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makePSOCKcluster</a></span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> -<span><span class="op">}</span> <span class="kw">else</span> <span class="op">{</span></span> -<span> <span class="va">cl</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makeForkCluster</a></span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> -<span><span class="op">}</span></span></code></pre></div> +<span></span> +<span><span class="co"># We need to start a new cluster after defining a compiled model that is</span></span> +<span><span class="co"># saved as a DLL to the user directory, therefore we define a function</span></span> +<span><span class="co"># This is used again after defining the pathway model</span></span> +<span><span class="va">start_cluster</span> <span class="op"><-</span> <span class="kw">function</span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span> <span class="op">{</span></span> +<span> <span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html" class="external-link">Sys.info</a></span><span class="op">(</span><span class="op">)</span><span class="op">[</span><span class="st">"sysname"</span><span class="op">]</span> <span class="op">==</span> <span class="st">"Windows"</span><span class="op">)</span> <span class="op">{</span></span> +<span> <span class="va">ret</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makePSOCKcluster</a></span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> +<span> <span class="op">}</span> <span class="kw">else</span> <span class="op">{</span></span> +<span> <span class="va">ret</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makeForkCluster</a></span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> +<span> <span class="op">}</span></span> +<span> <span class="kw"><a href="https://rdrr.io/r/base/function.html" class="external-link">return</a></span><span class="op">(</span><span class="va">ret</span><span class="op">)</span></span> +<span><span class="op">}</span></span> +<span><span class="va">cl</span> <span class="op"><-</span> <span class="fu">start_cluster</span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span></code></pre></div> <div class="section level3"> <h3 id="test-data">Test data<a class="anchor" aria-label="anchor" href="#test-data"></a> </h3> @@ -1366,6 +1374,8 @@ when the two-component error model is used.</p> two-component error model is preferable for all parent models with the exception of DFOP. The lowest AIC and BIC values are are obtained with the FOMC model, followed by SFORB and DFOP.</p> +<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">stopCluster</a></span><span class="op">(</span><span class="va">cl</span><span class="op">)</span></span></code></pre></div> </div> <div class="section level2"> <h2 id="pathway-fits">Pathway fits<a class="anchor" aria-label="anchor" href="#pathway-fits"></a> @@ -1378,7 +1388,7 @@ degradation models with different transformation pathway models, a list of <code>mkinmod</code> models is set up below. As in the EU evaluation, parallel formation of metabolites JCZ38 and J9Z38 and secondary formation of metabolite JSE76 from JCZ38 is used.</p> -<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.exists</a></span><span class="op">(</span><span class="st">"cyan_dlls"</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.create</a></span><span class="op">(</span><span class="st">"cyan_dlls"</span><span class="op">)</span></span> <span><span class="va">cyan_path_1</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span></span> <span> sfo_path_1 <span class="op">=</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span><span class="op">(</span></span> @@ -1411,15 +1421,16 @@ formation of metabolite JSE76 from JCZ38 is used.</p> <span> J9Z38 <span class="op">=</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span> <span> JSE76 <span class="op">=</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span>,</span> <span> name <span class="op">=</span> <span class="st">"hs_path_1"</span>, dll_dir <span class="op">=</span> <span class="st">"cyan_dlls"</span>, overwrite <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> -<span><span class="op">)</span></span></code></pre></div> +<span><span class="op">)</span></span> +<span><span class="va">cl_path_1</span> <span class="op"><-</span> <span class="fu">start_cluster</span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span></code></pre></div> <p>To obtain suitable starting values for the NLHM fits, separate pathway fits are performed for all datasets.</p> -<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="va">f_sep_1_const</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span><span class="op">(</span></span> <span> <span class="va">cyan_path_1</span>,</span> <span> <span class="va">cyan_ds</span>,</span> <span> error_model <span class="op">=</span> <span class="st">"const"</span>,</span> -<span> cluster <span class="op">=</span> <span class="va">cl</span>,</span> +<span> cluster <span class="op">=</span> <span class="va">cl_path_1</span>,</span> <span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> <span><span class="fu"><a href="../../reference/status.html">status</a></span><span class="op">(</span><span class="va">f_sep_1_const</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> @@ -1474,7 +1485,7 @@ pathway fits are performed for all datasets.</p> </tr> </tbody> </table> -<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb11"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="va">f_sep_1_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_sep_1_const</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span> <span><span class="fu"><a href="../../reference/status.html">status</a></span><span class="op">(</span><span class="va">f_sep_1_tc</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> @@ -1539,11 +1550,11 @@ for the parent only fits is used as an argument <code>no_random_effect</code> to the <code>mhmkin</code> function. The possibility to do so was introduced in mkin version <code>1.2.2</code> which is currently under development.</p> -<div class="sourceCode" id="cb11"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="va">f_saem_1</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/mhmkin.html">mhmkin</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="va">f_sep_1_const</span>, <span class="va">f_sep_1_tc</span><span class="op">)</span>,</span> <span> no_random_effect <span class="op">=</span> <span class="fu"><a href="../../reference/illparms.html">illparms</a></span><span class="op">(</span><span class="va">cyan_saem_full</span><span class="op">)</span>,</span> -<span> cluster <span class="op">=</span> <span class="va">cl</span><span class="op">)</span></span></code></pre></div> -<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r"> +<span> cluster <span class="op">=</span> <span class="va">cl_path_1</span><span class="op">)</span></span></code></pre></div> +<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="../../reference/status.html">status</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> <thead><tr class="header"> @@ -1586,7 +1597,7 @@ Fisher Information Matrix could not be inverted for the fixed effects fits, ill-defined parameters cannot be determined using the <code>illparms</code> function, because it relies on the Fisher Information Matrix.</p> -<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="../../reference/illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> <colgroup> @@ -1630,7 +1641,7 @@ sd(f_JCZ38_qlogis)</td> </table> <p>The model comparison below suggests that the pathway fits using DFOP or SFORB for the parent compound provide the best fit.</p> -<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span>digits <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></code></pre></div> <table class="table"> <thead><tr class="header"> @@ -1715,23 +1726,25 @@ or SFORB for the parent compound provide the best fit.</p> </table> <p>For these two parent model, successful fits are shown below. Plots of the fits with the other parent models are shown in the Appendix.</p> -<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">[[</span><span class="st">"dfop_path_1"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-6-1.png" alt="DFOP pathway fit with two-component error" width="700"><p class="caption"> +<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-7-1.png" alt="DFOP pathway fit with two-component error" width="700"><p class="caption"> DFOP pathway fit with two-component error </p> </div> -<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">[[</span><span class="st">"sforb_path_1"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-7-1.png" alt="SFORB pathway fit with two-component error" width="700"><p class="caption"> +<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-8-1.png" alt="SFORB pathway fit with two-component error" width="700"><p class="caption"> SFORB pathway fit with two-component error </p> </div> <p>A closer graphical analysis of these Figures shows that the residues of transformation product JCZ38 in the soils Tama and Nambsheim observed at later time points are strongly and systematically underestimated.</p> +<div class="sourceCode" id="cb18"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">stopCluster</a></span><span class="op">(</span><span class="va">cl_path_1</span><span class="op">)</span></span></code></pre></div> </div> <div class="section level3"> <h3 id="alternative-pathway-fits">Alternative pathway fits<a class="anchor" aria-label="anchor" href="#alternative-pathway-fits"></a> @@ -1744,7 +1757,7 @@ corresponding amide (Addendum 2014, p. 109). As FOMC provided the best fit for the parent, and the biexponential models DFOP and SFORB provided the best initial pathway fits, these three parent models are used in the alternative pathway fits.</p> -<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb19"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="va">cyan_path_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span></span> <span> fomc_path_2 <span class="op">=</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span><span class="op">(</span></span> <span> cyan <span class="op">=</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"FOMC"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"JCZ38"</span>, <span class="st">"J9Z38"</span><span class="op">)</span><span class="op">)</span>,</span> @@ -1774,11 +1787,13 @@ alternative pathway fits.</p> <span> overwrite <span class="op">=</span> <span class="cn">TRUE</span></span> <span> <span class="op">)</span></span> <span><span class="op">)</span></span> +<span></span> +<span><span class="va">cl_path_2</span> <span class="op"><-</span> <span class="fu">start_cluster</span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> <span><span class="va">f_sep_2_const</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span><span class="op">(</span></span> <span> <span class="va">cyan_path_2</span>,</span> <span> <span class="va">cyan_ds</span>,</span> <span> error_model <span class="op">=</span> <span class="st">"const"</span>,</span> -<span> cluster <span class="op">=</span> <span class="va">cl</span>,</span> +<span> cluster <span class="op">=</span> <span class="va">cl_path_2</span>,</span> <span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> <span></span> <span><span class="fu"><a href="../../reference/status.html">status</a></span><span class="op">(</span><span class="va">f_sep_2_const</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> @@ -1820,7 +1835,7 @@ alternative pathway fits.</p> </table> <p>Using constant variance, separate fits converge with the exception of the fits to the Sassafras soil data.</p> -<div class="sourceCode" id="cb18"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="va">f_sep_2_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_sep_2_const</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span> <span><span class="fu"><a href="../../reference/status.html">status</a></span><span class="op">(</span><span class="va">f_sep_2_tc</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> @@ -1862,11 +1877,11 @@ the fits to the Sassafras soil data.</p> <p>Using the two-component error model, all separate fits converge with the exception of the alternative pathway fit with DFOP used for the parent and the Sassafras dataset.</p> -<div class="sourceCode" id="cb19"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="va">f_saem_2</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/mhmkin.html">mhmkin</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="va">f_sep_2_const</span>, <span class="va">f_sep_2_tc</span><span class="op">)</span>,</span> <span> no_random_effect <span class="op">=</span> <span class="fu"><a href="../../reference/illparms.html">illparms</a></span><span class="op">(</span><span class="va">cyan_saem_full</span><span class="op">[</span><span class="fl">2</span><span class="op">:</span><span class="fl">4</span>, <span class="op">]</span><span class="op">)</span>,</span> -<span> cluster <span class="op">=</span> <span class="va">cl</span><span class="op">)</span></span></code></pre></div> -<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r"> +<span> cluster <span class="op">=</span> <span class="va">cl_path_2</span><span class="op">)</span></span></code></pre></div> +<div class="sourceCode" id="cb22"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="../../reference/status.html">status</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> <thead><tr class="header"> @@ -1894,7 +1909,7 @@ parent and the Sassafras dataset.</p> </table> <p>The hierarchical fits for the alternative pathway completed successfully.</p> -<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb23"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="../../reference/illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> <colgroup> @@ -1928,7 +1943,7 @@ successfully.</p> <p>In both fits, the random effects for the formation fractions for the pathways from JCZ38 to JSE76, and for the reverse pathway from JSE76 to JCZ38 are ill-defined.</p> -<div class="sourceCode" id="cb22"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb24"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span>digits <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></code></pre></div> <table class="table"> <thead><tr class="header"> @@ -1989,24 +2004,24 @@ and BIC values and are plotted below. Compared with the original pathway, the AIC and BIC values indicate a large improvement. This is confirmed by the plots, which show that the metabolite JCZ38 is fitted much better with this model.</p> -<div class="sourceCode" id="cb23"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb25"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">[[</span><span class="st">"fomc_path_2"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-11-1.png" alt="FOMC pathway fit with two-component error, alternative pathway" width="700"><p class="caption"> +<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-13-1.png" alt="FOMC pathway fit with two-component error, alternative pathway" width="700"><p class="caption"> FOMC pathway fit with two-component error, alternative pathway </p> </div> -<div class="sourceCode" id="cb24"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">[[</span><span class="st">"dfop_path_2"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-12-1.png" alt="DFOP pathway fit with two-component error, alternative pathway" width="700"><p class="caption"> +<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-14-1.png" alt="DFOP pathway fit with two-component error, alternative pathway" width="700"><p class="caption"> DFOP pathway fit with two-component error, alternative pathway </p> </div> -<div class="sourceCode" id="cb25"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">[[</span><span class="st">"sforb_path_2"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-13-1.png" alt="SFORB pathway fit with two-component error, alternative pathway" width="700"><p class="caption"> +<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-15-1.png" alt="SFORB pathway fit with two-component error, alternative pathway" width="700"><p class="caption"> SFORB pathway fit with two-component error, alternative pathway </p> </div> @@ -2021,7 +2036,7 @@ created below that can be indexed by row and column indices, and which contains the degradation parameter names for which random effects should be excluded for each of the hierarchical fits contained in <code>f_saem_2</code>.</p> -<div class="sourceCode" id="cb26"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb28"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="va">no_ranef</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/matrix.html" class="external-link">matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="op">)</span>, nrow <span class="op">=</span> <span class="fl">3</span>, ncol <span class="op">=</span> <span class="fl">2</span>, dimnames <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/dimnames.html" class="external-link">dimnames</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">)</span><span class="op">)</span></span> <span><span class="va">no_ranef</span><span class="op">[[</span><span class="st">"fomc_path_2"</span>, <span class="st">"const"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"log_beta"</span>, <span class="st">"f_JCZ38_qlogis"</span>, <span class="st">"f_JSE76_qlogis"</span><span class="op">)</span></span> <span><span class="va">no_ranef</span><span class="op">[[</span><span class="st">"fomc_path_2"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"cyan_0"</span>, <span class="st">"f_JCZ38_qlogis"</span>, <span class="st">"f_JSE76_qlogis"</span><span class="op">)</span></span> @@ -2031,12 +2046,12 @@ be excluded for each of the hierarchical fits contained in <span> <span class="st">"f_JCZ38_qlogis"</span>, <span class="st">"f_JSE76_qlogis"</span><span class="op">)</span></span> <span><span class="va">no_ranef</span><span class="op">[[</span><span class="st">"sforb_path_2"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"cyan_free_0"</span>, <span class="st">"log_k_cyan_free_bound"</span>,</span> <span> <span class="st">"f_JCZ38_qlogis"</span>, <span class="st">"f_JSE76_qlogis"</span><span class="op">)</span></span> -<span><span class="fu"><a href="https://rdrr.io/r/parallel/clusterApply.html" class="external-link">clusterExport</a></span><span class="op">(</span><span class="va">cl</span>, <span class="st">"no_ranef"</span><span class="op">)</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/parallel/clusterApply.html" class="external-link">clusterExport</a></span><span class="op">(</span><span class="va">cl_path_2</span>, <span class="st">"no_ranef"</span><span class="op">)</span></span> <span></span> <span><span class="va">f_saem_3</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_2</span>,</span> <span> no_random_effect <span class="op">=</span> <span class="va">no_ranef</span>,</span> -<span> cluster <span class="op">=</span> <span class="va">cl</span><span class="op">)</span></span></code></pre></div> -<div class="sourceCode" id="cb27"><pre class="downlit sourceCode r"> +<span> cluster <span class="op">=</span> <span class="va">cl_path_2</span><span class="op">)</span></span></code></pre></div> +<div class="sourceCode" id="cb29"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="../../reference/status.html">status</a></span><span class="op">(</span><span class="va">f_saem_3</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> <thead><tr class="header"> @@ -2066,7 +2081,7 @@ be excluded for each of the hierarchical fits contained in all updated fits completed successfully. However, the Fisher Information Matrix for the fixed effects (Fth) could not be inverted, so no confidence intervals for the optimised parameters are available.</p> -<div class="sourceCode" id="cb28"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb30"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="../../reference/illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_3</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div> <table class="table"> <thead><tr class="header"> @@ -2092,7 +2107,7 @@ confidence intervals for the optimised parameters are available.</p> </tr> </tbody> </table> -<div class="sourceCode" id="cb29"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb31"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_3</span><span class="op">)</span> <span class="op">|></span> <span class="fu"><a href="https://rdrr.io/pkg/knitr/man/kable.html" class="external-link">kable</a></span><span class="op">(</span>digits <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></code></pre></div> <table class="table"> <thead><tr class="header"> @@ -2144,6 +2159,8 @@ confidence intervals for the optimised parameters are available.</p> two-component error) are lower than in the previous fits with the alternative pathway, the practical value of these refined evaluations is limited as no confidence intervals are obtained.</p> +<div class="sourceCode" id="cb32"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">stopCluster</a></span><span class="op">(</span><span class="va">cl_path_2</span><span class="op">)</span></span></code></pre></div> </div> </div> <div class="section level2"> @@ -2170,24 +2187,24 @@ Agency are gratefully acknowledged.</p> <div class="section level3"> <h3 id="plots-of-fits-that-were-not-refined-further">Plots of fits that were not refined further<a class="anchor" aria-label="anchor" href="#plots-of-fits-that-were-not-refined-further"></a> </h3> -<div class="sourceCode" id="cb30"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb33"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">[[</span><span class="st">"sfo_path_1"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-17-1.png" alt="SFO pathway fit with two-component error" width="700"><p class="caption"> +<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-20-1.png" alt="SFO pathway fit with two-component error" width="700"><p class="caption"> SFO pathway fit with two-component error </p> </div> -<div class="sourceCode" id="cb31"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb34"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">[[</span><span class="st">"fomc_path_1"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-18-1.png" alt="FOMC pathway fit with two-component error" width="700"><p class="caption"> +<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-21-1.png" alt="FOMC pathway fit with two-component error" width="700"><p class="caption"> FOMC pathway fit with two-component error </p> </div> -<div class="sourceCode" id="cb32"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb35"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">[[</span><span class="st">"sforb_path_1"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-19-1.png" alt="HS pathway fit with two-component error" width="700"><p class="caption"> +<img src="2022_cyan_pathway_files/figure-html/unnamed-chunk-22-1.png" alt="HS pathway fit with two-component error" width="700"><p class="caption"> HS pathway fit with two-component error </p> </div> @@ -2203,10 +2220,10 @@ Hierarchical SFO path 1 fit with constant variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:07:38 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:33:05 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - k_cyan * cyan @@ -2219,7 +2236,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1088.473 s +Fitted in 438.011 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -2331,10 +2348,10 @@ Hierarchical SFO path 1 fit with two-component error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:08:17 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:32:55 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - k_cyan * cyan @@ -2347,7 +2364,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1127.552 s +Fitted in 427.249 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -2461,10 +2478,10 @@ Hierarchical FOMC path 1 fit with constant variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:09:12 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:33:49 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan @@ -2479,7 +2496,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1182.258 s +Fitted in 481.497 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -2606,10 +2623,10 @@ Hierarchical FOMC path 1 fit with two-component error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:09:18 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:33:59 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan @@ -2624,7 +2641,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1188.041 s +Fitted in 491.071 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -2744,10 +2761,10 @@ Hierarchical DFOP path 1 fit with constant variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:10:30 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:34:33 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -2766,7 +2783,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1260.905 s +Fitted in 525.551 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -2890,10 +2907,10 @@ Hierarchical DFOP path 1 fit with two-component error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:16:28 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:37:03 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -2912,7 +2929,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1617.774 s +Fitted in 675.804 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -3036,10 +3053,10 @@ Hierarchical SFORB path 1 fit with constant variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:10:49 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:34:43 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * @@ -3057,7 +3074,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1279.472 s +Fitted in 535.818 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -3201,10 +3218,10 @@ Hierarchical SFORB path 1 fit with two-component error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:17:00 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:37:02 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * @@ -3222,7 +3239,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1649.941 s +Fitted in 674.859 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -3366,10 +3383,10 @@ Hierarchical HS path 1 fit with constant variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:11:04 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:34:41 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - ifelse(time <= tb, k1, k2) * cyan @@ -3384,7 +3401,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1294.259 s +Fitted in 533.787 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -3508,10 +3525,10 @@ Hierarchical HS path 1 fit with two-component error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:11:24 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:34:39 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - ifelse(time <= tb, k1, k2) * cyan @@ -3526,7 +3543,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1313.805 s +Fitted in 531.084 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -3656,10 +3673,10 @@ Hierarchical FOMC path 2 fit with constant variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:34:28 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:45:51 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan @@ -3674,7 +3691,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1030.246 s +Fitted in 517.002 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -3820,10 +3837,10 @@ Hierarchical FOMC path 2 fit with two-component error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:37:36 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:45:39 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan @@ -3838,7 +3855,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1217.619 s +Fitted in 505.619 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -3966,10 +3983,10 @@ Hierarchical DFOP path 2 fit with constant variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:38:34 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:46:46 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -3989,7 +4006,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1276.128 s +Fitted in 572.382 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -4157,10 +4174,10 @@ Hierarchical DFOP path 2 fit with two-component error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:45:32 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:49:18 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -4180,7 +4197,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1693.767 s +Fitted in 724.515 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -4348,10 +4365,10 @@ Hierarchical SFORB path 2 fit with constant variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:38:37 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:46:33 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * @@ -4369,7 +4386,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1279.102 s +Fitted in 559.097 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -4544,10 +4561,10 @@ Hierarchical SFORB path 2 fit with two-component error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 10:46:02 2023 -Date of summary: Sun Apr 16 08:35:20 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 20:49:20 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * @@ -4565,7 +4582,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1723.343 s +Fitted in 726.293 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -4745,10 +4762,10 @@ error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 11:18:41 2023 -Date of summary: Sun Apr 16 08:35:21 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 21:02:39 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - (alpha/beta) * 1/((time/beta) + 1) * cyan @@ -4763,7 +4780,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1957.271 s +Fitted in 796.615 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -4888,10 +4905,10 @@ variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 11:16:32 2023 -Date of summary: Sun Apr 16 08:35:21 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 21:04:15 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -4911,7 +4928,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1828.403 s +Fitted in 893.328 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -5054,10 +5071,10 @@ error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 11:22:28 2023 -Date of summary: Sun Apr 16 08:35:21 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 21:04:33 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 * @@ -5077,7 +5094,7 @@ Data: Model predictions using solution type deSolve -Fitted in 2183.989 s +Fitted in 910.788 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -5220,10 +5237,10 @@ variance </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 11:17:37 2023 -Date of summary: Sun Apr 16 08:35:21 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 21:04:09 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * @@ -5241,7 +5258,7 @@ Data: Model predictions using solution type deSolve -Fitted in 1893.29 s +Fitted in 887.369 s Using 300, 100 iterations and 10 chains Variance model: Constant variance @@ -5391,10 +5408,10 @@ error </caption> <pre><code> saemix version used for fitting: 3.2 -mkin version used for pre-fitting: 1.2.2 -R version used for fitting: 4.2.2 -Date of fit: Sat Jan 28 11:21:01 2023 -Date of summary: Sun Apr 16 08:35:21 2023 +mkin version used for pre-fitting: 1.2.4 +R version used for fitting: 4.2.3 +Date of fit: Thu Apr 20 21:04:32 2023 +Date of summary: Thu Apr 20 21:04:34 2023 Equations: d_cyan_free/dt = - k_cyan_free * cyan_free - k_cyan_free_bound * @@ -5412,7 +5429,7 @@ Data: Model predictions using solution type deSolve -Fitted in 2097.842 s +Fitted in 910.017 s Using 300, 100 iterations and 10 chains Variance model: Two-component variance function @@ -5582,29 +5599,32 @@ attached base packages: [8] base other attached packages: -[1] saemix_3.2 npde_3.3 knitr_1.42 mkin_1.2.3 +[1] saemix_3.2 npde_3.3 knitr_1.42 mkin_1.2.4 loaded via a namespace (and not attached): - [1] pillar_1.9.0 bslib_0.4.2 compiler_4.2.3 jquerylib_0.1.4 - [5] tools_4.2.3 mclust_6.0.0 digest_0.6.31 tibble_3.2.1 - [9] jsonlite_1.8.4 evaluate_0.20 memoise_2.0.1 lifecycle_1.0.3 -[13] nlme_3.1-162 gtable_0.3.3 lattice_0.21-8 pkgconfig_2.0.3 -[17] rlang_1.1.0 DBI_1.1.3 cli_3.6.1 yaml_2.3.7 -[21] pkgdown_2.0.7 xfun_0.38 fastmap_1.1.1 gridExtra_2.3 -[25] dplyr_1.1.1 stringr_1.5.0 generics_0.1.3 desc_1.4.2 -[29] fs_1.6.1 vctrs_0.6.1 sass_0.4.5 systemfonts_1.0.4 -[33] tidyselect_1.2.0 rprojroot_2.0.3 lmtest_0.9-40 grid_4.2.3 -[37] inline_0.3.19 glue_1.6.2 R6_2.5.1 textshaping_0.3.6 -[41] fansi_1.0.4 rmarkdown_2.21 purrr_1.0.1 ggplot2_3.4.2 -[45] magrittr_2.0.3 scales_1.2.1 htmltools_0.5.5 colorspace_2.1-0 -[49] ragg_1.2.5 utf8_1.2.3 stringi_1.7.12 munsell_0.5.0 -[53] cachem_1.0.7 zoo_1.8-12 </code></pre> + [1] deSolve_1.35 zoo_1.8-12 tidyselect_1.2.0 xfun_0.38 + [5] bslib_0.4.2 purrr_1.0.1 lattice_0.21-8 colorspace_2.1-0 + [9] vctrs_0.6.1 generics_0.1.3 htmltools_0.5.5 yaml_2.3.7 +[13] utf8_1.2.3 rlang_1.1.0 pkgbuild_1.4.0 pkgdown_2.0.7 +[17] jquerylib_0.1.4 pillar_1.9.0 glue_1.6.2 DBI_1.1.3 +[21] readxl_1.4.2 lifecycle_1.0.3 stringr_1.5.0 munsell_0.5.0 +[25] gtable_0.3.3 cellranger_1.1.0 ragg_1.2.5 codetools_0.2-19 +[29] memoise_2.0.1 evaluate_0.20 inline_0.3.19 callr_3.7.3 +[33] fastmap_1.1.1 ps_1.7.4 lmtest_0.9-40 fansi_1.0.4 +[37] highr_0.10 scales_1.2.1 cachem_1.0.7 desc_1.4.2 +[41] jsonlite_1.8.4 systemfonts_1.0.4 fs_1.6.1 textshaping_0.3.6 +[45] gridExtra_2.3 ggplot2_3.4.2 digest_0.6.31 stringi_1.7.12 +[49] processx_3.8.0 dplyr_1.1.1 grid_4.2.3 rprojroot_2.0.3 +[53] cli_3.6.1 tools_4.2.3 magrittr_2.0.3 sass_0.4.5 +[57] tibble_3.2.1 crayon_1.5.2 pkgconfig_2.0.3 prettyunits_1.1.1 +[61] rmarkdown_2.21 R6_2.5.1 mclust_6.0.0 nlme_3.1-162 +[65] compiler_4.2.3 </code></pre> </div> <div class="section level3"> <h3 id="hardware-info">Hardware info<a class="anchor" aria-label="anchor" href="#hardware-info"></a> </h3> <pre><code>CPU model: AMD Ryzen 9 7950X 16-Core Processor</code></pre> -<pre><code>MemTotal: 64940452 kB</code></pre> +<pre><code>MemTotal: 64936316 kB</code></pre> </div> </div> </div> diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-13-1.png b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-13-1.png Binary files differindex b9a410f7..b969f2ff 100644 --- a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-13-1.png +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-13-1.png diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-14-1.png b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-14-1.png Binary files differnew file mode 100644 index 00000000..60393da3 --- /dev/null +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-14-1.png diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-15-1.png b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-15-1.png Binary files differnew file mode 100644 index 00000000..b9a410f7 --- /dev/null +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-15-1.png diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-20-1.png b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-20-1.png Binary files differnew file mode 100644 index 00000000..cf921dab --- /dev/null +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-20-1.png diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-21-1.png b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-21-1.png Binary files differnew file mode 100644 index 00000000..ff732730 --- /dev/null +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-21-1.png diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-22-1.png b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-22-1.png Binary files differnew file mode 100644 index 00000000..e30011bc --- /dev/null +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-22-1.png diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-7-1.png b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-7-1.png Binary files differindex e30011bc..4aad76df 100644 --- a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-7-1.png +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-7-1.png diff --git a/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-8-1.png b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-8-1.png Binary files differnew file mode 100644 index 00000000..e30011bc --- /dev/null +++ b/docs/dev/articles/prebuilt/2022_cyan_pathway_files/figure-html/unnamed-chunk-8-1.png diff --git a/docs/dev/articles/prebuilt/2022_dmta_pathway.html b/docs/dev/articles/prebuilt/2022_dmta_pathway.html index 0285a193..959f3429 100644 --- a/docs/dev/articles/prebuilt/2022_dmta_pathway.html +++ b/docs/dev/articles/prebuilt/2022_dmta_pathway.html @@ -34,7 +34,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> @@ -135,8 +135,8 @@ residue data on dimethenamid and dimethenamid-P</h1> <h4 data-toc-skip class="author">Johannes Ranke</h4> - <h4 data-toc-skip class="date">Last change on 8 January -2023, last compiled on 16 April 2023</h4> + <h4 data-toc-skip class="date">Last change on 20 April 2023, +last compiled on 20 April 2023</h4> <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/vignettes/prebuilt/2022_dmta_pathway.rmd" class="external-link"><code>vignettes/prebuilt/2022_dmta_pathway.rmd</code></a></small> <div class="hidden name"><code>2022_dmta_pathway.rmd</code></div> @@ -156,7 +156,7 @@ can be fitted with the mkin package.</p> 173340 (Application of nonlinear hierarchical models to the kinetic evaluation of chemical degradation data) of the German Environment Agency carried out in 2022 and 2023.</p> -<p>The mkin package is used in version 1.2.3, which is currently under +<p>The mkin package is used in version 1.2.4, which is currently under development. It contains the test data, and the functions used in the evaluations. The <code>saemix</code> package is used as a backend for fitting the NLHM, but is also loaded to make the convergence plot @@ -171,10 +171,17 @@ processing, the <code>parallel</code> package is used.</p> <span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">saemix</span><span class="op">)</span></span> <span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">parallel</span><span class="op">)</span></span> <span><span class="va">n_cores</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/detectCores.html" class="external-link">detectCores</a></span><span class="op">(</span><span class="op">)</span></span> -<span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html" class="external-link">Sys.info</a></span><span class="op">(</span><span class="op">)</span><span class="op">[</span><span class="st">"sysname"</span><span class="op">]</span> <span class="op">==</span> <span class="st">"Windows"</span><span class="op">)</span> <span class="op">{</span></span> -<span> <span class="va">cl</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makePSOCKcluster</a></span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> -<span><span class="op">}</span> <span class="kw">else</span> <span class="op">{</span></span> -<span> <span class="va">cl</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makeForkCluster</a></span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># We need to start a new cluster after defining a compiled model that is</span></span> +<span><span class="co"># saved as a DLL to the user directory, therefore we define a function</span></span> +<span><span class="co"># This is used again after defining the pathway model</span></span> +<span><span class="va">start_cluster</span> <span class="op"><-</span> <span class="kw">function</span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span> <span class="op">{</span></span> +<span> <span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html" class="external-link">Sys.info</a></span><span class="op">(</span><span class="op">)</span><span class="op">[</span><span class="st">"sysname"</span><span class="op">]</span> <span class="op">==</span> <span class="st">"Windows"</span><span class="op">)</span> <span class="op">{</span></span> +<span> <span class="va">ret</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makePSOCKcluster</a></span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> +<span> <span class="op">}</span> <span class="kw">else</span> <span class="op">{</span></span> +<span> <span class="va">ret</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makeForkCluster</a></span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> +<span> <span class="op">}</span></span> +<span> <span class="kw"><a href="https://rdrr.io/r/base/function.html" class="external-link">return</a></span><span class="op">(</span><span class="va">ret</span><span class="op">)</span></span> <span><span class="op">}</span></span></code></pre></div> </div> <div class="section level2"> @@ -1441,6 +1448,8 @@ of parent models tested here.</p> <span> unload <span class="op">=</span> <span class="cn">TRUE</span>, overwrite <span class="op">=</span> <span class="cn">TRUE</span>,</span> <span> quiet <span class="op">=</span> <span class="cn">TRUE</span></span> <span><span class="op">)</span></span> +<span><span class="va">cl</span> <span class="op"><-</span> <span class="fu">start_cluster</span><span class="op">(</span><span class="va">n_cores</span><span class="op">)</span></span> +<span></span> <span><span class="va">deg_mods_1</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span></span> <span> sfo_path_1 <span class="op">=</span> <span class="va">m_sfo_path_1</span>,</span> <span> fomc_path_1 <span class="op">=</span> <span class="va">m_fomc_path_1</span>,</span> @@ -1883,6 +1892,8 @@ SFORB pathway fit with two-component error, reduced parameter model </div> <p>Plots of the remaining fits and listings for all successful fits are shown in the Appendix.</p> +<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r"> +<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">stopCluster</a></span><span class="op">(</span><span class="va">cl</span><span class="op">)</span></span></code></pre></div> </div> <div class="section level2"> <h2 id="conclusions">Conclusions<a class="anchor" aria-label="anchor" href="#conclusions"></a> @@ -1921,24 +1932,24 @@ Level with Nonlinear Mixed-Effects Models.”</span> <em>Environments</em> <div class="section level3"> <h3 id="plots-of-hierarchical-fits-not-selected-for-refinement">Plots of hierarchical fits not selected for refinement<a class="anchor" aria-label="anchor" href="#plots-of-hierarchical-fits-not-selected-for-refinement"></a> </h3> -<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">saem_1</span><span class="op">[[</span><span class="st">"sfo_path_1"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_dmta_pathway_files/figure-html/unnamed-chunk-5-1.png" alt="SFO pathway fit with two-component error" width="700"><p class="caption"> +<img src="2022_dmta_pathway_files/figure-html/unnamed-chunk-6-1.png" alt="SFO pathway fit with two-component error" width="700"><p class="caption"> SFO pathway fit with two-component error </p> </div> -<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb22"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">saem_1</span><span class="op">[[</span><span class="st">"fomc_path_1"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_dmta_pathway_files/figure-html/unnamed-chunk-6-1.png" alt="FOMC pathway fit with two-component error" width="700"><p class="caption"> +<img src="2022_dmta_pathway_files/figure-html/unnamed-chunk-7-1.png" alt="FOMC pathway fit with two-component error" width="700"><p class="caption"> FOMC pathway fit with two-component error </p> </div> -<div class="sourceCode" id="cb22"><pre class="downlit sourceCode r"> +<div class="sourceCode" id="cb23"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">saem_1</span><span class="op">[[</span><span class="st">"sforb_path_1"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></code></pre></div> <div class="figure" style="text-align: center"> -<img src="2022_dmta_pathway_files/figure-html/unnamed-chunk-7-1.png" alt="HS pathway fit with two-component error" width="700"><p class="caption"> +<img src="2022_dmta_pathway_files/figure-html/unnamed-chunk-8-1.png" alt="HS pathway fit with two-component error" width="700"><p class="caption"> HS pathway fit with two-component error </p> </div> @@ -1961,9 +1972,9 @@ error<a class="anchor" aria-label="anchor" href="#improved-fit-of-the-sforb-path <div class="section level3"> <h3 id="session-info">Session info<a class="anchor" aria-label="anchor" href="#session-info"></a> </h3> -<pre><code>R version 4.2.2 Patched (2022-11-10 r83330) +<pre><code>R version 4.2.3 (2023-03-15) Platform: x86_64-pc-linux-gnu (64-bit) -Running under: Debian GNU/Linux bookworm/sid +Running under: Debian GNU/Linux 12 (bookworm) Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas-serial/libblas.so.3 @@ -1982,31 +1993,31 @@ attached base packages: [8] base other attached packages: -[1] saemix_3.2 npde_3.3 knitr_1.41 mkin_1.2.2 +[1] saemix_3.2 npde_3.3 knitr_1.42 mkin_1.2.4 loaded via a namespace (and not attached): - [1] deSolve_1.34 zoo_1.8-11 tidyselect_1.2.0 xfun_0.35 - [5] bslib_0.4.2 purrr_1.0.0 lattice_0.20-45 colorspace_2.0-3 - [9] vctrs_0.5.1 generics_0.1.3 htmltools_0.5.4 yaml_2.3.6 -[13] pkgbuild_1.4.0 utf8_1.2.2 rlang_1.0.6 pkgdown_2.0.7 -[17] jquerylib_0.1.4 pillar_1.8.1 glue_1.6.2 DBI_1.1.3 -[21] lifecycle_1.0.3 stringr_1.5.0 munsell_0.5.0 gtable_0.3.1 -[25] ragg_1.2.4 codetools_0.2-18 memoise_2.0.1 evaluate_0.19 -[29] inline_0.3.19 callr_3.7.3 fastmap_1.1.0 ps_1.7.2 -[33] lmtest_0.9-40 fansi_1.0.3 highr_0.9 scales_1.2.1 -[37] cachem_1.0.6 desc_1.4.2 jsonlite_1.8.4 systemfonts_1.0.4 -[41] fs_1.5.2 textshaping_0.3.6 gridExtra_2.3 ggplot2_3.4.0 -[45] digest_0.6.31 stringi_1.7.8 processx_3.8.0 dplyr_1.0.10 -[49] grid_4.2.2 rprojroot_2.0.3 cli_3.5.0 tools_4.2.2 -[53] magrittr_2.0.3 sass_0.4.4 tibble_3.1.8 crayon_1.5.2 -[57] pkgconfig_2.0.3 prettyunits_1.1.1 assertthat_0.2.1 rmarkdown_2.19 -[61] R6_2.5.1 mclust_6.0.0 nlme_3.1-161 compiler_4.2.2 </code></pre> + [1] deSolve_1.35 zoo_1.8-12 tidyselect_1.2.0 xfun_0.38 + [5] bslib_0.4.2 purrr_1.0.1 lattice_0.21-8 colorspace_2.1-0 + [9] vctrs_0.6.1 generics_0.1.3 htmltools_0.5.5 yaml_2.3.7 +[13] utf8_1.2.3 rlang_1.1.0 pkgbuild_1.4.0 pkgdown_2.0.7 +[17] jquerylib_0.1.4 pillar_1.9.0 glue_1.6.2 DBI_1.1.3 +[21] lifecycle_1.0.3 stringr_1.5.0 munsell_0.5.0 gtable_0.3.3 +[25] ragg_1.2.5 codetools_0.2-19 memoise_2.0.1 evaluate_0.20 +[29] inline_0.3.19 callr_3.7.3 fastmap_1.1.1 ps_1.7.4 +[33] lmtest_0.9-40 fansi_1.0.4 highr_0.10 scales_1.2.1 +[37] cachem_1.0.7 desc_1.4.2 jsonlite_1.8.4 systemfonts_1.0.4 +[41] fs_1.6.1 textshaping_0.3.6 gridExtra_2.3 ggplot2_3.4.2 +[45] digest_0.6.31 stringi_1.7.12 processx_3.8.0 dplyr_1.1.1 +[49] grid_4.2.3 rprojroot_2.0.3 cli_3.6.1 tools_4.2.3 +[53] magrittr_2.0.3 sass_0.4.5 tibble_3.2.1 crayon_1.5.2 +[57] pkgconfig_2.0.3 prettyunits_1.1.1 rmarkdown_2.21 R6_2.5.1 +[61] mclust_6.0.0 nlme_3.1-162 compiler_4.2.3 </code></pre> </div> <div class="section level3"> <h3 id="hardware-info">Hardware info<a class="anchor" aria-label="anchor" href="#hardware-info"></a> </h3> <pre><code>CPU model: AMD Ryzen 9 7950X 16-Core Processor</code></pre> -<pre><code>MemTotal: 64940452 kB</code></pre> +<pre><code>MemTotal: 64936316 kB</code></pre> </div> </div> </div> diff --git a/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-6-1.png b/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-6-1.png Binary files differindex ac5271ec..00db0c76 100644 --- a/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-6-1.png +++ b/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-6-1.png diff --git a/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-7-1.png b/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-7-1.png Binary files differindex 1c81601e..ac5271ec 100644 --- a/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-7-1.png +++ b/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-7-1.png diff --git a/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-8-1.png b/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-8-1.png Binary files differnew file mode 100644 index 00000000..1c81601e --- /dev/null +++ b/docs/dev/articles/prebuilt/2022_dmta_pathway_files/figure-html/unnamed-chunk-8-1.png diff --git a/docs/dev/articles/web_only/multistart.html b/docs/dev/articles/web_only/multistart.html index b5635df2..2de5059c 100644 --- a/docs/dev/articles/web_only/multistart.html +++ b/docs/dev/articles/web_only/multistart.html @@ -34,7 +34,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> @@ -127,13 +127,15 @@ - </header><script src="multistart_files/accessible-code-block-0.0.1/empty-anchor.js"></script><div class="row"> + </header><div class="row"> <div class="col-md-9 contents"> <div class="page-header toc-ignore"> <h1 data-toc-skip>Short demo of the multistart method</h1> - <h4 data-toc-skip class="author">Johannes Ranke</h4> + <h4 data-toc-skip class="author">Johannes +Ranke</h4> - <h4 data-toc-skip class="date">Last change 17 April 2023 (rebuilt 2023-04-17)</h4> + <h4 data-toc-skip class="date">Last change 20 April 2023 +(rebuilt 2023-04-20)</h4> <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/vignettes/web_only/multistart.rmd" class="external-link"><code>vignettes/web_only/multistart.rmd</code></a></small> <div class="hidden name"><code>multistart.rmd</code></div> @@ -142,7 +144,8 @@ -<p>The dimethenamid data from 2018 from seven soils is used as example data in this vignette.</p> +<p>The dimethenamid data from 2018 from seven soils is used as example +data in this vignette.</p> <div class="sourceCode" id="cb1"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/mkin/">mkin</a></span><span class="op">)</span></span> <span><span class="va">dmta_ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="fl">1</span><span class="op">:</span><span class="fl">7</span>, <span class="kw">function</span><span class="op">(</span><span class="va">i</span><span class="op">)</span> <span class="op">{</span></span> @@ -154,26 +157,34 @@ <span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">dmta_ds</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">dimethenamid_2018</span><span class="op">$</span><span class="va">ds</span>, <span class="kw">function</span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="va">ds</span><span class="op">$</span><span class="va">title</span><span class="op">)</span></span> <span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/cbind.html" class="external-link">rbind</a></span><span class="op">(</span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 1"</span><span class="op">]</span><span class="op">]</span>, <span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 2"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span> <span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 1"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 2"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="cn">NULL</span></span></code></pre></div> -<p>First, we check the DFOP model with the two-component error model and random effects for all degradation parameters.</p> +<p>First, we check the DFOP model with the two-component error model and +random effects for all degradation parameters.</p> <div class="sourceCode" id="cb2"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="va">f_mmkin</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/mmkin.html">mmkin</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="va">dmta_ds</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, cores <span class="op">=</span> <span class="fl">7</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> <span><span class="va">f_saem_full</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/saem.html">saem</a></span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">)</span></span> <span><span class="fu"><a href="../../reference/illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_full</span><span class="op">)</span></span></code></pre></div> <pre><code><span><span class="co">## [1] "sd(log_k2)"</span></span></code></pre> -<p>We see that not all variability parameters are identifiable. The <code>illparms</code> function tells us that the confidence interval for the standard deviation of ‘log_k2’ includes zero. We check this assessment using multiple runs with different starting values.</p> +<p>We see that not all variability parameters are identifiable. The +<code>illparms</code> function tells us that the confidence interval for +the standard deviation of ‘log_k2’ includes zero. We check this +assessment using multiple runs with different starting values.</p> <div class="sourceCode" id="cb4"><pre class="downlit sourceCode r"> -<code class="sourceCode R"><span><span class="va">f_saem_full_multi</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/multistart.html">multistart</a></span><span class="op">(</span><span class="va">f_saem_full</span>, n <span class="op">=</span> <span class="fl">16</span>, cores <span class="op">=</span> <span class="fl">8</span><span class="op">)</span></span> +<code class="sourceCode R"><span><span class="va">f_saem_full_multi</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/multistart.html">multistart</a></span><span class="op">(</span><span class="va">f_saem_full</span>, n <span class="op">=</span> <span class="fl">16</span>, cores <span class="op">=</span> <span class="fl">16</span><span class="op">)</span></span> <span><span class="fu"><a href="../../reference/parplot.html">parplot</a></span><span class="op">(</span><span class="va">f_saem_full_multi</span>, lpos <span class="op">=</span> <span class="st">"topleft"</span><span class="op">)</span></span></code></pre></div> <p><img src="multistart_files/figure-html/unnamed-chunk-3-1.png" width="700"></p> -<p>This confirms that the variance of k2 is the most problematic parameter, so we reduce the parameter distribution model by removing the intersoil variability for k2.</p> +<p>This confirms that the variance of k2 is the most problematic +parameter, so we reduce the parameter distribution model by removing the +intersoil variability for k2.</p> <div class="sourceCode" id="cb5"><pre class="downlit sourceCode r"> -<code class="sourceCode R"><span><span class="va">f_saem_reduced</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_full</span>, no_random_effect <span class="op">=</span> <span class="st">"log_k2"</span><span class="op">)</span></span> +<code class="sourceCode R"><span><span class="va">f_saem_reduced</span> <span class="op"><-</span> <span class="fu">stats</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_full</span>, no_random_effect <span class="op">=</span> <span class="st">"log_k2"</span><span class="op">)</span></span> <span><span class="fu"><a href="../../reference/illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_reduced</span><span class="op">)</span></span> -<span><span class="va">f_saem_reduced_multi</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/multistart.html">multistart</a></span><span class="op">(</span><span class="va">f_saem_reduced</span>, n <span class="op">=</span> <span class="fl">16</span>, cores <span class="op">=</span> <span class="fl">8</span><span class="op">)</span></span> +<span><span class="va">f_saem_reduced_multi</span> <span class="op"><-</span> <span class="fu"><a href="../../reference/multistart.html">multistart</a></span><span class="op">(</span><span class="va">f_saem_reduced</span>, n <span class="op">=</span> <span class="fl">16</span>, cores <span class="op">=</span> <span class="fl">16</span><span class="op">)</span></span> <span><span class="fu"><a href="../../reference/parplot.html">parplot</a></span><span class="op">(</span><span class="va">f_saem_reduced_multi</span>, lpos <span class="op">=</span> <span class="st">"topright"</span>, ylim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.5</span>, <span class="fl">2</span><span class="op">)</span><span class="op">)</span></span></code></pre></div> <p><img src="multistart_files/figure-html/unnamed-chunk-4-1.png" width="700"></p> -<p>The results confirm that all remaining parameters can be determined with sufficient certainty.</p> -<p>We can also analyse the log-likelihoods obtained in the multiple runs:</p> +<p>The results confirm that all remaining parameters can be determined +with sufficient certainty.</p> +<p>We can also analyse the log-likelihoods obtained in the multiple +runs:</p> <div class="sourceCode" id="cb6"><pre class="downlit sourceCode r"> <code class="sourceCode R"><span><span class="fu"><a href="../../reference/llhist.html">llhist</a></span><span class="op">(</span><span class="va">f_saem_reduced_multi</span><span class="op">)</span></span></code></pre></div> <p><img src="multistart_files/figure-html/unnamed-chunk-5-1.png" width="700"></p> @@ -184,11 +195,16 @@ <pre><code><span><span class="co">## Data: 155 observations of 1 variable(s) grouped in 6 datasets</span></span> <span><span class="co">## </span></span> <span><span class="co">## npar AIC BIC Lik Chisq Df Pr(>Chisq)</span></span> -<span><span class="co">## f_saem_reduced 9 663.74 661.87 -322.87 </span></span> -<span><span class="co">## best(f_saem_reduced_multi) 9 663.60 661.72 -322.80 0.1476 0 </span></span> -<span><span class="co">## f_saem_full 10 670.35 668.26 -325.17 0.0000 1 1</span></span> -<span><span class="co">## best(f_saem_full_multi) 10 665.61 663.53 -322.80 4.7372 0</span></span></code></pre> -<p>The reduced model results in lower AIC and BIC values, so it is clearly preferable. Using multiple starting values gives a large improvement in case of the full model, because it is less well-defined, which impedes convergence. For the reduced model, using multiple starting values only results in a small improvement of the model fit.</p> +<span><span class="co">## f_saem_reduced 9 663.73 661.86 -322.86 </span></span> +<span><span class="co">## best(f_saem_reduced_multi) 9 663.69 661.82 -322.85 0.0361 0 </span></span> +<span><span class="co">## f_saem_full 10 669.77 667.69 -324.89 0.0000 1 1</span></span> +<span><span class="co">## best(f_saem_full_multi) 10 665.56 663.48 -322.78 4.2060 0</span></span></code></pre> +<p>The reduced model results in lower AIC and BIC values, so it is +clearly preferable. Using multiple starting values gives a large +improvement in case of the full model, because it is less well-defined, +which impedes convergence. For the reduced model, using multiple +starting values only results in a small improvement of the model +fit.</p> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> diff --git a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-3-1.png b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-3-1.png Binary files differindex 7ad9fa28..1ef2ba24 100644 --- a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-3-1.png +++ b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-3-1.png diff --git a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-4-1.png b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-4-1.png Binary files differindex f36995ae..b1582557 100644 --- a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-4-1.png +++ b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-4-1.png diff --git a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-5-1.png b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-5-1.png Binary files differindex 152554f5..f0270537 100644 --- a/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-5-1.png +++ b/docs/dev/articles/web_only/multistart_files/figure-html/unnamed-chunk-5-1.png diff --git a/docs/dev/authors.html b/docs/dev/authors.html index 3c95e7e0..1e2fc48f 100644 --- a/docs/dev/authors.html +++ b/docs/dev/authors.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> @@ -132,13 +132,13 @@ <p>Ranke J (2023). <em>mkin: Kinetic Evaluation of Chemical Degradation Data</em>. -R package version 1.2.3, <a href="https://pkgdown.jrwb.de/mkin/">https://pkgdown.jrwb.de/mkin/</a>. +R package version 1.2.4, <a href="https://pkgdown.jrwb.de/mkin/">https://pkgdown.jrwb.de/mkin/</a>. </p> <pre>@Manual{, title = {mkin: Kinetic Evaluation of Chemical Degradation Data}, author = {Johannes Ranke}, year = {2023}, - note = {R package version 1.2.3}, + note = {R package version 1.2.4}, url = {https://pkgdown.jrwb.de/mkin/}, }</pre> diff --git a/docs/dev/index.html b/docs/dev/index.html index f892841f..59b78ff0 100644 --- a/docs/dev/index.html +++ b/docs/dev/index.html @@ -45,7 +45,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> @@ -245,12 +245,21 @@ <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a> </h2> <table class="table"> -<tr><td>Ranke J, Wöltjen J, Schmidt J, and Comets E (2021) Taking kinetic evaluations of degradation data to the next level with nonlinear mixed-effects models. <i>Environments</i> <b>8</b> (8) 71 <a href="https://doi.org/10.3390/environments8080071" class="external-link">doi:10.3390/environments8080071</a> -</td></tr> -<tr><td>Ranke J, Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical Degradation Data <i>Environments</i> <b>6</b> (12) 124 <a href="https://doi.org/10.3390/environments6120124" class="external-link">doi:10.3390/environments6120124</a> -</td></tr> -<tr><td>Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic evaluation of chemical degradation data <i>Environmental Sciences Europe</i> <b>30</b> 17 <a href="https://doi.org/10.1186/s12302-018-0145-1" class="external-link">doi:10.1186/s12302-018-0145-1</a> -</td></tr> +<tr> +<td> +Ranke J, Wöltjen J, Schmidt J, and Comets E (2021) Taking kinetic evaluations of degradation data to the next level with nonlinear mixed-effects models. <i>Environments</i> <b>8</b> (8) 71 <a href="https://doi.org/10.3390/environments8080071" class="external-link">doi:10.3390/environments8080071</a> +</td> +</tr> +<tr> +<td> +Ranke J, Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical Degradation Data <i>Environments</i> <b>6</b> (12) 124 <a href="https://doi.org/10.3390/environments6120124" class="external-link">doi:10.3390/environments6120124</a> +</td> +</tr> +<tr> +<td> +Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic evaluation of chemical degradation data <i>Environmental Sciences Europe</i> <b>30</b> 17 <a href="https://doi.org/10.1186/s12302-018-0145-1" class="external-link">doi:10.1186/s12302-018-0145-1</a> +</td> +</tr> </table> </div> <div class="section level2"> diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html index 70eeeed6..93207241 100644 --- a/docs/dev/news/index.html +++ b/docs/dev/news/index.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> @@ -105,6 +105,13 @@ </div> <div class="section level2"> +<h2 class="page-header" data-toc-text="1.2.4" id="mkin-124">mkin 1.2.4<a class="anchor" aria-label="anchor" href="#mkin-124"></a></h2> +</div> + <div class="section level2"> +<h2 class="page-header" data-toc-text="1.2.3.1" id="mkin-1231-unreleased">mkin 1.2.3.1 (unreleased)<a class="anchor" aria-label="anchor" href="#mkin-1231-unreleased"></a></h2> +<ul><li>Small fixes to get the online docs right (example code in R/hierarchical_kinetics, cluster setup in cyantraniliprole and dmta pathway vignettes, graphics and model comparison in multistart vignette), rebuild online docs</li> +</ul></div> + <div class="section level2"> <h2 class="page-header" data-toc-text="1.2.3" id="mkin-123">mkin 1.2.3<a class="anchor" aria-label="anchor" href="#mkin-123"></a></h2> <ul><li><p>‘R/{endpoints,parms,plot.mixed.mmkin,summary.saem.mmkin}.R’: Calculate parameters and endpoints and plot population curves for specific covariate values, or specific percentiles of covariate values used in saem fits.</p></li> <li><p>Depend on current deSolve version with the possibility to avoid resolving symbols in a shared library (compiled models) over and over, thanks to Thomas Petzoldt.</p></li> @@ -171,7 +178,8 @@ </div> <div class="section level2"> <h2 class="page-header" data-toc-text="1.0.5" id="mkin-105-2021-09-15">mkin 1.0.5 (2021-09-15)<a class="anchor" aria-label="anchor" href="#mkin-105-2021-09-15"></a></h2> -<ul><li>‘dimethenamid_2018’: Correct the data for the Borstel soil. The five observations from Staudenmaier (2013) that were previously stored as “Borstel 2” are actually just a subset of the 16 observations in “Borstel 1” which is now simply “Borstel”</li></ul></div> +<ul><li>‘dimethenamid_2018’: Correct the data for the Borstel soil. The five observations from Staudenmaier (2013) that were previously stored as “Borstel 2” are actually just a subset of the 16 observations in “Borstel 1” which is now simply “Borstel”</li> +</ul></div> <div class="section level2"> <h2 class="page-header" data-toc-text="1.0.4" id="mkin-104-2021-04-20">mkin 1.0.4 (2021-04-20)<a class="anchor" aria-label="anchor" href="#mkin-104-2021-04-20"></a></h2> <ul><li><p>All plotting functions setting graphical parameters: Use on.exit() for resetting graphical parameters</p></li> @@ -180,10 +188,12 @@ </ul></div> <div class="section level2"> <h2 class="page-header" data-toc-text="1.0.3" id="mkin-103-2021-02-15">mkin 1.0.3 (2021-02-15)<a class="anchor" aria-label="anchor" href="#mkin-103-2021-02-15"></a></h2> -<ul><li>Review and update README, the ‘Introduction to mkin’ vignette and some of the help pages</li></ul></div> +<ul><li>Review and update README, the ‘Introduction to mkin’ vignette and some of the help pages</li> +</ul></div> <div class="section level2"> <h2 class="page-header" data-toc-text="1.0.2" id="mkin-102-unreleased">mkin 1.0.2 (Unreleased)<a class="anchor" aria-label="anchor" href="#mkin-102-unreleased"></a></h2> -<ul><li>‘mkinfit’: Keep model names stored in ‘mkinmod’ objects, avoiding their loss in ‘gmkin’</li></ul></div> +<ul><li>‘mkinfit’: Keep model names stored in ‘mkinmod’ objects, avoiding their loss in ‘gmkin’</li> +</ul></div> <div class="section level2"> <h2 class="page-header" data-toc-text="1.0.1" id="mkin-101-2021-02-10">mkin 1.0.1 (2021-02-10)<a class="anchor" aria-label="anchor" href="#mkin-101-2021-02-10"></a></h2> <ul><li><p>‘confint.mmkin’, ‘nlme.mmkin’, ‘transform_odeparms’: Fix example code in dontrun sections that failed with current defaults</p></li> @@ -238,7 +248,8 @@ </ul></div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9.49.11" id="mkin-094911-2020-04-20">mkin 0.9.49.11 (2020-04-20)<a class="anchor" aria-label="anchor" href="#mkin-094911-2020-04-20"></a></h2> -<ul><li>Increase a test tolerance to make it pass on all CRAN check machines</li></ul></div> +<ul><li>Increase a test tolerance to make it pass on all CRAN check machines</li> +</ul></div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9.49.10" id="mkin-094910-2020-04-18">mkin 0.9.49.10 (2020-04-18)<a class="anchor" aria-label="anchor" href="#mkin-094910-2020-04-18"></a></h2> <ul><li><p>‘nlme.mmkin’: An nlme method for mmkin row objects and an associated S3 class with print, plot, anova and endpoint methods</p></li> @@ -353,7 +364,8 @@ </ul></div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9.46" id="mkin-0946-2017-07-24">mkin 0.9.46 (2017-07-24)<a class="anchor" aria-label="anchor" href="#mkin-0946-2017-07-24"></a></h2> -<ul><li>Remove <code>test_FOMC_ill-defined.R</code> as it is too platform dependent</li></ul></div> +<ul><li>Remove <code>test_FOMC_ill-defined.R</code> as it is too platform dependent</li> +</ul></div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9.45.2" id="mkin-09452-2017-07-24">mkin 0.9.45.2 (2017-07-24)<a class="anchor" aria-label="anchor" href="#mkin-09452-2017-07-24"></a></h2> <ul><li><p>Rename <code>twa</code> to <code>max_twa_parent</code> to avoid conflict with <code>twa</code> from my <code>pfm</code> package</p></li> @@ -365,7 +377,8 @@ <h2 class="page-header" data-toc-text="0.9.45.1" id="mkin-09451-2016-12-20">mkin 0.9.45.1 (2016-12-20)<a class="anchor" aria-label="anchor" href="#mkin-09451-2016-12-20"></a></h2> <div class="section level3"> <h3 id="new-features-0-9-45-1">New features<a class="anchor" aria-label="anchor" href="#new-features-0-9-45-1"></a></h3> -<ul><li>A <code>twa</code> function, calculating maximum time weighted average concentrations for the parent (SFO, FOMC and DFOP).</li></ul></div> +<ul><li>A <code>twa</code> function, calculating maximum time weighted average concentrations for the parent (SFO, FOMC and DFOP).</li> +</ul></div> </div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9.45" id="mkin-0945-2016-12-08">mkin 0.9.45 (2016-12-08)<a class="anchor" aria-label="anchor" href="#mkin-0945-2016-12-08"></a></h2> @@ -380,7 +393,8 @@ <h2 class="page-header" data-toc-text="0.9.44" id="mkin-0944-2016-06-29">mkin 0.9.44 (2016-06-29)<a class="anchor" aria-label="anchor" href="#mkin-0944-2016-06-29"></a></h2> <div class="section level3"> <h3 id="bug-fixes-0-9-44">Bug fixes<a class="anchor" aria-label="anchor" href="#bug-fixes-0-9-44"></a></h3> -<ul><li>The test <code>test_FOMC_ill-defined</code> failed on several architectures, so the test is now skipped</li></ul></div> +<ul><li>The test <code>test_FOMC_ill-defined</code> failed on several architectures, so the test is now skipped</li> +</ul></div> </div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9.43" id="mkin-0943-2016-06-28">mkin 0.9.43 (2016-06-28)<a class="anchor" aria-label="anchor" href="#mkin-0943-2016-06-28"></a></h2> @@ -414,7 +428,8 @@ <h2 class="page-header" data-toc-text="0.9.42" id="mkin-0942-2016-03-25">mkin 0.9.42 (2016-03-25)<a class="anchor" aria-label="anchor" href="#mkin-0942-2016-03-25"></a></h2> <div class="section level3"> <h3 id="major-changes-0-9-42">Major changes<a class="anchor" aria-label="anchor" href="#major-changes-0-9-42"></a></h3> -<ul><li>Add the argument <code>from_max_mean</code> to <code>mkinfit</code>, for fitting only the decline from the maximum observed value for models with a single observed variable</li></ul></div> +<ul><li>Add the argument <code>from_max_mean</code> to <code>mkinfit</code>, for fitting only the decline from the maximum observed value for models with a single observed variable</li> +</ul></div> <div class="section level3"> <h3 id="minor-changes-0-9-42">Minor changes<a class="anchor" aria-label="anchor" href="#minor-changes-0-9-42"></a></h3> <ul><li><p>Add plots to <code>compiled_models</code> vignette</p></li> @@ -434,18 +449,21 @@ <div class="section level3"> <h3 id="bug-fixes-0-9-41">Bug fixes<a class="anchor" aria-label="anchor" href="#bug-fixes-0-9-41"></a></h3> <ul><li> -<code><a href="../reference/summary.mkinfit.html">print.summary.mkinfit()</a></code>: Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36</li></ul></div> +<code><a href="../reference/summary.mkinfit.html">print.summary.mkinfit()</a></code>: Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36</li> +</ul></div> </div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9-40" id="mkin-09-40-2015-07-21">mkin 0.9-40 (2015-07-21)<a class="anchor" aria-label="anchor" href="#mkin-09-40-2015-07-21"></a></h2> <div class="section level3"> <h3 id="bug-fixes-0-9-40">Bug fixes<a class="anchor" aria-label="anchor" href="#bug-fixes-0-9-40"></a></h3> <ul><li> -<code><a href="../reference/endpoints.html">endpoints()</a></code>: For DFOP and SFORB models, where <code><a href="https://rdrr.io/r/stats/optimize.html" class="external-link">optimize()</a></code> is used, make use of the fact that the DT50 must be between DT50_k1 and DT50_k2 (DFOP) or DT50_b1 and DT50_b2 (SFORB), as <code><a href="https://rdrr.io/r/stats/optimize.html" class="external-link">optimize()</a></code> sometimes did not find the minimum. Likewise for finding DT90 values. Also fit on the log scale to make the function more efficient.</li></ul></div> +<code><a href="../reference/endpoints.html">endpoints()</a></code>: For DFOP and SFORB models, where <code><a href="https://rdrr.io/r/stats/optimize.html" class="external-link">optimize()</a></code> is used, make use of the fact that the DT50 must be between DT50_k1 and DT50_k2 (DFOP) or DT50_b1 and DT50_b2 (SFORB), as <code><a href="https://rdrr.io/r/stats/optimize.html" class="external-link">optimize()</a></code> sometimes did not find the minimum. Likewise for finding DT90 values. Also fit on the log scale to make the function more efficient.</li> +</ul></div> <div class="section level3"> <h3 id="internal-changes-0-9-40">Internal changes<a class="anchor" aria-label="anchor" href="#internal-changes-0-9-40"></a></h3> <ul><li> -<code>DESCRIPTION</code>, <code>NAMESPACE</code>, <code>R/*.R</code>: Import (from) stats, graphics and methods packages, and qualify some function calls for non-base packages installed with R to avoid NOTES made by R CMD check –as-cran with upcoming R versions.</li></ul></div> +<code>DESCRIPTION</code>, <code>NAMESPACE</code>, <code>R/*.R</code>: Import (from) stats, graphics and methods packages, and qualify some function calls for non-base packages installed with R to avoid NOTES made by R CMD check –as-cran with upcoming R versions.</li> +</ul></div> </div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9-39" id="mkin-09-39-2015-06-26">mkin 0.9-39 (2015-06-26)<a class="anchor" aria-label="anchor" href="#mkin-09-39-2015-06-26"></a></h2> @@ -457,7 +475,8 @@ <div class="section level3"> <h3 id="bug-fixes-0-9-39">Bug fixes<a class="anchor" aria-label="anchor" href="#bug-fixes-0-9-39"></a></h3> <ul><li> -<code><a href="../reference/mkinparplot.html">mkinparplot()</a></code>: Fix the x axis scaling for rate constants and formation fractions that got confused by the introduction of the t-values of transformed parameters.</li></ul></div> +<code><a href="../reference/mkinparplot.html">mkinparplot()</a></code>: Fix the x axis scaling for rate constants and formation fractions that got confused by the introduction of the t-values of transformed parameters.</li> +</ul></div> </div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9-38" id="mkin-09-38-2015-06-24">mkin 0.9-38 (2015-06-24)<a class="anchor" aria-label="anchor" href="#mkin-09-38-2015-06-24"></a></h2> @@ -469,7 +488,8 @@ <div class="section level3"> <h3 id="bug-fixes-0-9-38">Bug fixes<a class="anchor" aria-label="anchor" href="#bug-fixes-0-9-38"></a></h3> <ul><li> -<code><a href="../reference/mkinmod.html">mkinmod()</a></code>: When generating the C code for the derivatives, only declare the time variable when it is needed and remove the ‘-W-no-unused-variable’ compiler flag as the C compiler used in the CRAN checks on Solaris does not know it.</li></ul></div> +<code><a href="../reference/mkinmod.html">mkinmod()</a></code>: When generating the C code for the derivatives, only declare the time variable when it is needed and remove the ‘-W-no-unused-variable’ compiler flag as the C compiler used in the CRAN checks on Solaris does not know it.</li> +</ul></div> </div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9-36" id="mkin-09-36-2015-06-21">mkin 0.9-36 (2015-06-21)<a class="anchor" aria-label="anchor" href="#mkin-09-36-2015-06-21"></a></h2> @@ -482,13 +502,15 @@ </ul></div> <div class="section level3"> <h3 id="minor-changes-0-9-36">Minor changes<a class="anchor" aria-label="anchor" href="#minor-changes-0-9-36"></a></h3> -<ul><li>Added a simple showcase vignette with an evaluation of FOCUS example dataset D</li></ul></div> +<ul><li>Added a simple showcase vignette with an evaluation of FOCUS example dataset D</li> +</ul></div> </div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9-35" id="mkin-09-35-2015-05-15">mkin 0.9-35 (2015-05-15)<a class="anchor" aria-label="anchor" href="#mkin-09-35-2015-05-15"></a></h2> <div class="section level3"> <h3 id="major-changes-0-9-35">Major changes<a class="anchor" aria-label="anchor" href="#major-changes-0-9-35"></a></h3> -<ul><li>Switch from RUnit to testthat for testing</li></ul></div> +<ul><li>Switch from RUnit to testthat for testing</li> +</ul></div> <div class="section level3"> <h3 id="bug-fixes-0-9-35">Bug fixes<a class="anchor" aria-label="anchor" href="#bug-fixes-0-9-35"></a></h3> <ul><li><p><code><a href="../reference/mkinparplot.html">mkinparplot()</a></code>: Avoid warnings that occurred when not all confidence intervals were available in the summary of the fit</p></li> @@ -570,13 +592,15 @@ <h2 class="page-header" data-toc-text="0.9-31" id="mkin-09-31-2014-07-14">mkin 0.9-31 (2014-07-14)<a class="anchor" aria-label="anchor" href="#mkin-09-31-2014-07-14"></a></h2> <div class="section level3"> <h3 id="bug-fixes-0-9-31">Bug fixes<a class="anchor" aria-label="anchor" href="#bug-fixes-0-9-31"></a></h3> -<ul><li>The internal renaming of optimised parameters in Version 0.9-30 led to errors in the determination of the degrees of freedom for the chi2 error level calulations in <code><a href="../reference/mkinerrmin.html">mkinerrmin()</a></code> used by the summary function.</li></ul></div> +<ul><li>The internal renaming of optimised parameters in Version 0.9-30 led to errors in the determination of the degrees of freedom for the chi2 error level calulations in <code><a href="../reference/mkinerrmin.html">mkinerrmin()</a></code> used by the summary function.</li> +</ul></div> </div> <div class="section level2"> <h2 class="page-header" data-toc-text="0.9-30" id="mkin-09-30-2014-07-11">mkin 0.9-30 (2014-07-11)<a class="anchor" aria-label="anchor" href="#mkin-09-30-2014-07-11"></a></h2> <div class="section level3"> <h3 id="new-features-0-9-30">New features<a class="anchor" aria-label="anchor" href="#new-features-0-9-30"></a></h3> -<ul><li>It is now possible to use formation fractions in combination with turning off the sink in <code><a href="../reference/mkinmod.html">mkinmod()</a></code>.</li></ul></div> +<ul><li>It is now possible to use formation fractions in combination with turning off the sink in <code><a href="../reference/mkinmod.html">mkinmod()</a></code>.</li> +</ul></div> <div class="section level3"> <h3 id="major-changes-0-9-30">Major changes<a class="anchor" aria-label="anchor" href="#major-changes-0-9-30"></a></h3> <ul><li><p>The original and the transformed parameters now have different names (e.g. <code>k_parent</code> and <code>log_k_parent</code>. They also differ in how many they are when we have formation fractions but no pathway to sink.</p></li> diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index a9ab0c60..c3829f60 100644 --- a/docs/dev/pkgdown.yml +++ b/docs/dev/pkgdown.yml @@ -1,4 +1,4 @@ -pandoc: 2.9.2.1 +pandoc: 2.17.1.1 pkgdown: 2.0.7 pkgdown_sha: ~ articles: @@ -16,7 +16,7 @@ articles: dimethenamid_2018: web_only/dimethenamid_2018.html multistart: web_only/multistart.html saem_benchmarks: web_only/saem_benchmarks.html -last_built: 2023-04-17T17:35Z +last_built: 2023-04-20T18:24Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/Rplot001.png b/docs/dev/reference/Rplot001.png Binary files differindex 278fd2e2..70d084a3 100644 --- a/docs/dev/reference/Rplot001.png +++ b/docs/dev/reference/Rplot001.png diff --git a/docs/dev/reference/Rplot002.png b/docs/dev/reference/Rplot002.png Binary files differindex 4b646f22..0f7d4405 100644 --- a/docs/dev/reference/Rplot002.png +++ b/docs/dev/reference/Rplot002.png diff --git a/docs/dev/reference/hierarchical_kinetics.html b/docs/dev/reference/hierarchical_kinetics.html index a696916f..7ece90cc 100644 --- a/docs/dev/reference/hierarchical_kinetics.html +++ b/docs/dev/reference/hierarchical_kinetics.html @@ -24,7 +24,7 @@ includes them.'><meta name="robots" content="noindex"><!-- mathjax --><script sr </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> @@ -164,8 +164,9 @@ and then to run 'tinytex::tlmgr_install(c("float", "listing"))'.</p> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># \dontrun{</span></span></span> <span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/rstudio/rmarkdown" class="external-link">rmarkdown</a></span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="fu"><a href="https://pkgs.rstudio.com/rmarkdown/reference/draft.html" class="external-link">draft</a></span><span class="op">(</span><span class="st">"example_analysis.rmd"</span>, template <span class="op">=</span> <span class="st">"hierarchical_kinetics"</span>, package <span class="op">=</span> <span class="st">"mkin"</span><span class="op">)</span></span></span> -<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in draft("example_analysis.rmd", template = "hierarchical_kinetics", package = "mkin"):</span> The directory 'example_analysis' already exists.</span> +<span class="r-in"><span><span class="co"># The following is now commented out after the relase of v1.2.3 for the generation</span></span></span> +<span class="r-in"><span><span class="co"># of online docs, as the command creates a directory and opens an editor</span></span></span> +<span class="r-in"><span><span class="co">#draft("example_analysis.rmd", template = "hierarchical_kinetics", package = "mkin")</span></span></span> <span class="r-in"><span><span class="co"># }</span></span></span> <span class="r-in"><span></span></span> </code></pre></div> diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html index 85dc7c6e..d1b789c3 100644 --- a/docs/dev/reference/index.html +++ b/docs/dev/reference/index.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> diff --git a/docs/dev/reference/multistart-1.png b/docs/dev/reference/multistart-1.png Binary files differindex ee0306d6..c7937d67 100644 --- a/docs/dev/reference/multistart-1.png +++ b/docs/dev/reference/multistart-1.png diff --git a/docs/dev/reference/multistart-2.png b/docs/dev/reference/multistart-2.png Binary files differindex 69a178e3..b6e29ba5 100644 --- a/docs/dev/reference/multistart-2.png +++ b/docs/dev/reference/multistart-2.png diff --git a/docs/dev/reference/multistart.html b/docs/dev/reference/multistart.html index 36767560..6fc88621 100644 --- a/docs/dev/reference/multistart.html +++ b/docs/dev/reference/multistart.html @@ -22,7 +22,7 @@ mixed-effects models by Duchesne et al (2021)."><meta name="robots" content="noi </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.3</span> + <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">1.2.4</span> </span> </div> |