diff options
Diffstat (limited to 'docs/reference')
86 files changed, 1596 insertions, 1479 deletions
diff --git a/docs/reference/AIC.mmkin.html b/docs/reference/AIC.mmkin.html index 58590f52..26a880e3 100644 --- a/docs/reference/AIC.mmkin.html +++ b/docs/reference/AIC.mmkin.html @@ -73,7 +73,7 @@ same dataset." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ same dataset." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ same dataset." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ same dataset." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Calculate the AIC for a column of an mmkin object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/AIC.mmkin.R'><code>R/AIC.mmkin.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/AIC.mmkin.R'><code>R/AIC.mmkin.R</code></a></small> <div class="hidden name"><code>AIC.mmkin.Rd</code></div> </div> @@ -147,10 +150,10 @@ same dataset.</p> </div> <pre class="usage"><span class='co'># S3 method for mmkin</span> -<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>object</span>, <span class='no'>...</span>, <span class='kw'>k</span> <span class='kw'>=</span> <span class='fl'>2</span>) +<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span>, k <span class='op'>=</span> <span class='fl'>2</span><span class='op'>)</span> <span class='co'># S3 method for mmkin</span> -<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -174,34 +177,45 @@ column.</p></td> <p>As in the generic method (a numeric value for single fits, or a dataframe if there are several fits in the column).</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># skip, as it takes > 10 s on winbuilder</span> - <span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), - <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"FOCUS A"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_A</span>, - <span class='st'>"FOCUS C"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_C</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> + <span class='va'>f</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"FOCUS A"</span> <span class='op'>=</span> <span class='va'>FOCUS_2006_A</span>, + <span class='st'>"FOCUS C"</span> <span class='op'>=</span> <span class='va'>FOCUS_2006_C</span><span class='op'>)</span>, cores <span class='op'>=</span> <span class='fl'>1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> #> <span class='warning'>false convergence (8)</span></div><div class='input'> <span class='co'># We get a warning because the FOMC model does not converge for the</span> <span class='co'># FOCUS A dataset, as it is well described by SFO</span> - <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[<span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span>]) <span class='co'># We get a single number for a single fit</span></div><div class='output co'>#> [1] 55.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span><span class='kw'>[[</span><span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span>]]) <span class='co'># or when extracting an mkinfit object</span></div><div class='output co'>#> [1] 55.28197</div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span><span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># We get a single number for a single fit</span> +</div><div class='output co'>#> [1] 55.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[[</span><span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># or when extracting an mkinfit object</span> +</div><div class='output co'>#> [1] 55.28197</div><div class='input'> <span class='co'># For FOCUS A, the models fit almost equally well, so the higher the number</span> <span class='co'># of parameters, the higher (worse) the AIC</span> - <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>])</div><div class='output co'>#> df AIC + <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> df AIC #> SFO 3 55.28197 -#> FOMC 4 57.28202 -#> DFOP 5 59.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>], <span class='kw'>k</span> <span class='kw'>=</span> <span class='fl'>0</span>) <span class='co'># If we do not penalize additional parameters, we get nearly the same</span></div><div class='output co'>#> df AIC +#> FOMC 4 57.28211 +#> DFOP 5 59.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span>, k <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span> <span class='co'># If we do not penalize additional parameters, we get nearly the same</span> +</div><div class='output co'>#> df AIC #> SFO 3 49.28197 -#> FOMC 4 49.28202 -#> DFOP 5 49.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>]) <span class='co'># Comparing the BIC gives a very similar picture</span></div><div class='output co'>#> df BIC +#> FOMC 4 49.28211 +#> DFOP 5 49.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># Comparing the BIC gives a very similar picture</span> +</div><div class='output co'>#> df BIC #> SFO 3 55.52030 -#> FOMC 4 57.59979 +#> FOMC 4 57.59987 #> DFOP 5 59.67918</div><div class='input'> <span class='co'># For FOCUS C, the more complex models fit better</span> - <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='output co'>#> df AIC + <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS C"</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> df AIC #> SFO 3 59.29336 #> FOMC 4 44.68652 -#> DFOP 5 29.02372</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='output co'>#> df BIC +#> DFOP 5 29.02372</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS C"</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> df BIC #> SFO 3 59.88504 #> FOMC 4 45.47542 #> DFOP 5 30.00984</div><div class='input'> @@ -222,7 +236,7 @@ dataframe if there are several fits in the column).</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/DFOP.solution-1.png b/docs/reference/DFOP.solution-1.png Binary files differindex a2d75ccc..616e19d5 100644 --- a/docs/reference/DFOP.solution-1.png +++ b/docs/reference/DFOP.solution-1.png diff --git a/docs/reference/DFOP.solution.html b/docs/reference/DFOP.solution.html index 3c1fff89..2bc1ee96 100644 --- a/docs/reference/DFOP.solution.html +++ b/docs/reference/DFOP.solution.html @@ -73,7 +73,7 @@ two exponential decline functions." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ two exponential decline functions." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ two exponential decline functions." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ two exponential decline functions." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Double First-Order in Parallel kinetics</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> <div class="hidden name"><code>DFOP.solution.Rd</code></div> </div> @@ -146,7 +149,7 @@ two exponential decline functions." /> two exponential decline functions.</p> </div> - <pre class="usage"><span class='fu'>DFOP.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>g</span>)</pre> + <pre class="usage"><span class='fu'>DFOP.solution</span><span class='op'>(</span><span class='va'>t</span>, <span class='va'>parent_0</span>, <span class='va'>k1</span>, <span class='va'>k2</span>, <span class='va'>g</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -201,7 +204,8 @@ Version 1.1, 18 December 2014 <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>DFOP.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>5</span>, <span class='fl'>0.5</span>, <span class='fl'>0.3</span>), <span class='fl'>0</span>, <span class='fl'>4</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>,<span class='fl'>100</span>))</div><div class='img'><img src='DFOP.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>DFOP.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>5</span>, <span class='fl'>0.5</span>, <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fl'>0</span>, <span class='fl'>4</span>, ylim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>,<span class='fl'>100</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='img'><img src='DFOP.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -218,7 +222,7 @@ Version 1.1, 18 December 2014 </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/FOMC.solution-1.png b/docs/reference/FOMC.solution-1.png Binary files differindex aa41a253..1d32355a 100644 --- a/docs/reference/FOMC.solution-1.png +++ b/docs/reference/FOMC.solution-1.png diff --git a/docs/reference/FOMC.solution.html b/docs/reference/FOMC.solution.html index a7236844..d279f32f 100644 --- a/docs/reference/FOMC.solution.html +++ b/docs/reference/FOMC.solution.html @@ -73,7 +73,7 @@ a decreasing rate constant." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ a decreasing rate constant." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ a decreasing rate constant." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ a decreasing rate constant." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>First-Order Multi-Compartment kinetics</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> <div class="hidden name"><code>FOMC.solution.Rd</code></div> </div> @@ -146,7 +149,7 @@ a decreasing rate constant." /> a decreasing rate constant.</p> </div> - <pre class="usage"><span class='fu'>FOMC.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>alpha</span>, <span class='no'>beta</span>)</pre> + <pre class="usage"><span class='fu'>FOMC.solution</span><span class='op'>(</span><span class='va'>t</span>, <span class='va'>parent_0</span>, <span class='va'>alpha</span>, <span class='va'>beta</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -210,7 +213,8 @@ Technology</em> <b>24</b>, 1032-1038</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>FOMC.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>10</span>, <span class='fl'>2</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>100</span>))</div><div class='img'><img src='FOMC.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>FOMC.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>10</span>, <span class='fl'>2</span><span class='op'>)</span>, <span class='fl'>0</span>, <span class='fl'>2</span>, ylim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>100</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='img'><img src='FOMC.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -227,7 +231,7 @@ Technology</em> <b>24</b>, 1032-1038</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/HS.solution-1.png b/docs/reference/HS.solution-1.png Binary files differindex ae056d9b..32d04b2d 100644 --- a/docs/reference/HS.solution-1.png +++ b/docs/reference/HS.solution-1.png diff --git a/docs/reference/HS.solution.html b/docs/reference/HS.solution.html index 2c4eebe3..0f5915c3 100644 --- a/docs/reference/HS.solution.html +++ b/docs/reference/HS.solution.html @@ -73,7 +73,7 @@ between them." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ between them." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ between them." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ between them." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Hockey-Stick kinetics</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> <div class="hidden name"><code>HS.solution.Rd</code></div> </div> @@ -146,7 +149,7 @@ between them." /> between them.</p> </div> - <pre class="usage"><span class='fu'>HS.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>tb</span>)</pre> + <pre class="usage"><span class='fu'>HS.solution</span><span class='op'>(</span><span class='va'>t</span>, <span class='va'>parent_0</span>, <span class='va'>k1</span>, <span class='va'>k2</span>, <span class='va'>tb</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -202,7 +205,8 @@ Version 1.1, 18 December 2014 <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>HS.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>2</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, <span class='kw'>ylim</span><span class='kw'>=</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>,<span class='fl'>100</span>))</div><div class='img'><img src='HS.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>HS.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>2</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span><span class='op'>)</span>, <span class='fl'>0</span>, <span class='fl'>2</span>, ylim<span class='op'>=</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>,<span class='fl'>100</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='img'><img src='HS.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -219,7 +223,7 @@ Version 1.1, 18 December 2014 </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/IORE.solution-1.png b/docs/reference/IORE.solution-1.png Binary files differindex 00e28460..42643a58 100644 --- a/docs/reference/IORE.solution-1.png +++ b/docs/reference/IORE.solution-1.png diff --git a/docs/reference/IORE.solution.html b/docs/reference/IORE.solution.html index 9c8df9b3..be326cff 100644 --- a/docs/reference/IORE.solution.html +++ b/docs/reference/IORE.solution.html @@ -73,7 +73,7 @@ a concentration dependent rate constant." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ a concentration dependent rate constant." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ a concentration dependent rate constant." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ a concentration dependent rate constant." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Indeterminate order rate equation kinetics</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> <div class="hidden name"><code>IORE.solution.Rd</code></div> </div> @@ -146,7 +149,7 @@ a concentration dependent rate constant." /> a concentration dependent rate constant.</p> </div> - <pre class="usage"><span class='fu'>IORE.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k__iore</span>, <span class='no'>N</span>)</pre> + <pre class="usage"><span class='fu'>IORE.solution</span><span class='op'>(</span><span class='va'>t</span>, <span class='va'>parent_0</span>, <span class='va'>k__iore</span>, <span class='va'>N</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -195,21 +198,24 @@ for Evaluating and Calculating Degradation Kinetics in Environmental Media</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>IORE.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.2</span>, <span class='fl'>1.3</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>100</span>))</div><div class='img'><img src='IORE.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># \dontrun{</span> - <span class='no'>fit.fomc</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='no'>fit.iore</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"IORE"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='no'>fit.iore.deS</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"IORE"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - - <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(<span class='no'>fit.fomc</span>$<span class='no'>par</span>, <span class='no'>fit.iore</span>$<span class='no'>par</span>, <span class='no'>fit.iore.deS</span>$<span class='no'>par</span>, - <span class='kw'>row.names</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"model par"</span>, <span class='fl'>1</span>:<span class='fl'>4</span>)))</div><div class='output co'>#> fit.fomc.par fit.iore.par fit.iore.deS.par + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>IORE.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.2</span>, <span class='fl'>1.3</span><span class='op'>)</span>, <span class='fl'>0</span>, <span class='fl'>2</span>, ylim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>100</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='img'><img src='IORE.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># \dontrun{</span> + <span class='va'>fit.fomc</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='va'>fit.iore</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"IORE"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='va'>fit.iore.deS</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"IORE"</span>, <span class='va'>FOCUS_2006_C</span>, solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + + <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span><span class='op'>(</span><span class='va'>fit.fomc</span><span class='op'>$</span><span class='va'>par</span>, <span class='va'>fit.iore</span><span class='op'>$</span><span class='va'>par</span>, <span class='va'>fit.iore.deS</span><span class='op'>$</span><span class='va'>par</span>, + row.names <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span><span class='op'>(</span><span class='st'>"model par"</span>, <span class='fl'>1</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> fit.fomc.par fit.iore.par fit.iore.deS.par #> model par 1 85.87489063 85.874890 85.874890 #> model par 2 0.05192238 -4.826631 -4.826631 #> model par 3 0.65096665 1.949403 1.949403 -#> model par 4 1.85744396 1.857444 1.857444</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/cbind.html'>rbind</a></span>(<span class='kw'>fomc</span> <span class='kw'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.fomc</span>)$<span class='no'>distimes</span>, <span class='kw'>iore</span> <span class='kw'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.iore</span>)$<span class='no'>distimes</span>, - <span class='kw'>iore.deS</span> <span class='kw'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.iore</span>)$<span class='no'>distimes</span>))</div><div class='output co'>#> DT50 DT90 DT50back +#> model par 4 1.85744396 1.857444 1.857444</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/cbind.html'>rbind</a></span><span class='op'>(</span>fomc <span class='op'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>fit.fomc</span><span class='op'>)</span><span class='op'>$</span><span class='va'>distimes</span>, iore <span class='op'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>fit.iore</span><span class='op'>)</span><span class='op'>$</span><span class='va'>distimes</span>, + iore.deS <span class='op'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>fit.iore</span><span class='op'>)</span><span class='op'>$</span><span class='va'>distimes</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> DT50 DT90 DT50back #> fomc 1.785233 15.1479 4.559973 #> iore 1.785233 15.1479 4.559973 -#> iore.deS 1.785233 15.1479 4.559973</div><div class='input'> # } +#> iore.deS 1.785233 15.1479 4.559973</div><div class='input'> <span class='co'># }</span> </div></pre> </div> @@ -227,7 +233,7 @@ for Evaluating and Calculating Degradation Kinetics in Environmental Media</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png Binary files differnew file mode 100644 index 00000000..17a35806 --- /dev/null +++ b/docs/reference/Rplot001.png diff --git a/docs/reference/Rplot002.png b/docs/reference/Rplot002.png Binary files differnew file mode 100644 index 00000000..aec326c7 --- /dev/null +++ b/docs/reference/Rplot002.png diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png Binary files differnew file mode 100644 index 00000000..fe53157f --- /dev/null +++ b/docs/reference/Rplot003.png diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png Binary files differnew file mode 100644 index 00000000..e3ebe97b --- /dev/null +++ b/docs/reference/Rplot004.png diff --git a/docs/reference/Rplot005.png b/docs/reference/Rplot005.png Binary files differnew file mode 100644 index 00000000..962cfd2d --- /dev/null +++ b/docs/reference/Rplot005.png diff --git a/docs/reference/Rplot006.png b/docs/reference/Rplot006.png Binary files differnew file mode 100644 index 00000000..dbd9a00b --- /dev/null +++ b/docs/reference/Rplot006.png diff --git a/docs/reference/Rplot007.png b/docs/reference/Rplot007.png Binary files differnew file mode 100644 index 00000000..fcca232c --- /dev/null +++ b/docs/reference/Rplot007.png diff --git a/docs/reference/SFO.solution-1.png b/docs/reference/SFO.solution-1.png Binary files differindex b0b854bb..56d27ef6 100644 --- a/docs/reference/SFO.solution-1.png +++ b/docs/reference/SFO.solution-1.png diff --git a/docs/reference/SFO.solution.html b/docs/reference/SFO.solution.html index 05332377..9f6fd80b 100644 --- a/docs/reference/SFO.solution.html +++ b/docs/reference/SFO.solution.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -109,6 +109,9 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -117,7 +120,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -136,7 +139,7 @@ <div class="col-md-9 contents"> <div class="page-header"> <h1>Single First-Order kinetics</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> <div class="hidden name"><code>SFO.solution.Rd</code></div> </div> @@ -144,7 +147,7 @@ <p>Function describing exponential decline from a defined starting value.</p> </div> - <pre class="usage"><span class='fu'>SFO.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k</span>)</pre> + <pre class="usage"><span class='fu'>SFO.solution</span><span class='op'>(</span><span class='va'>t</span>, <span class='va'>parent_0</span>, <span class='va'>k</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -190,7 +193,8 @@ Version 1.1, 18 December 2014 <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>SFO.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>3</span>), <span class='fl'>0</span>, <span class='fl'>2</span>)</div><div class='img'><img src='SFO.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>SFO.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>3</span><span class='op'>)</span>, <span class='fl'>0</span>, <span class='fl'>2</span><span class='op'>)</span> +</div><div class='img'><img src='SFO.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -207,7 +211,7 @@ Version 1.1, 18 December 2014 </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/SFORB.solution-1.png b/docs/reference/SFORB.solution-1.png Binary files differindex cd58caec..4eeb0d41 100644 --- a/docs/reference/SFORB.solution-1.png +++ b/docs/reference/SFORB.solution-1.png diff --git a/docs/reference/SFORB.solution.html b/docs/reference/SFORB.solution.html index e4c84edd..d6a3ea91 100644 --- a/docs/reference/SFORB.solution.html +++ b/docs/reference/SFORB.solution.html @@ -76,7 +76,7 @@ and no substance in the bound fraction." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -113,6 +113,9 @@ and no substance in the bound fraction." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -121,7 +124,7 @@ and no substance in the bound fraction." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -140,7 +143,7 @@ and no substance in the bound fraction." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Single First-Order Reversible Binding kinetics</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> <div class="hidden name"><code>SFORB.solution.Rd</code></div> </div> @@ -152,7 +155,7 @@ fraction. The initial condition is a defined amount in the free fraction and no substance in the bound fraction.</p> </div> - <pre class="usage"><span class='fu'>SFORB.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k_12</span>, <span class='no'>k_21</span>, <span class='no'>k_1output</span>)</pre> + <pre class="usage"><span class='fu'>SFORB.solution</span><span class='op'>(</span><span class='va'>t</span>, <span class='va'>parent_0</span>, <span class='va'>k_12</span>, <span class='va'>k_21</span>, <span class='va'>k_1output</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -208,7 +211,8 @@ Version 1.1, 18 December 2014 <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>SFORB.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.5</span>, <span class='fl'>2</span>, <span class='fl'>3</span>), <span class='fl'>0</span>, <span class='fl'>2</span>)</div><div class='img'><img src='SFORB.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>SFORB.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.5</span>, <span class='fl'>2</span>, <span class='fl'>3</span><span class='op'>)</span>, <span class='fl'>0</span>, <span class='fl'>2</span><span class='op'>)</span> +</div><div class='img'><img src='SFORB.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -225,7 +229,7 @@ Version 1.1, 18 December 2014 </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/add_err-1.png b/docs/reference/add_err-1.png Binary files differindex 88806d7b..f5686754 100644 --- a/docs/reference/add_err-1.png +++ b/docs/reference/add_err-1.png diff --git a/docs/reference/add_err-2.png b/docs/reference/add_err-2.png Binary files differindex 6a806c2d..ac220c9e 100644 --- a/docs/reference/add_err-2.png +++ b/docs/reference/add_err-2.png diff --git a/docs/reference/add_err-3.png b/docs/reference/add_err-3.png Binary files differindex 1919a566..40465b71 100644 --- a/docs/reference/add_err-3.png +++ b/docs/reference/add_err-3.png diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html index 7c420146..8adc1fa6 100644 --- a/docs/reference/add_err.html +++ b/docs/reference/add_err.html @@ -74,7 +74,7 @@ may depend on the predicted value and is specified as a standard deviation." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -111,6 +111,9 @@ may depend on the predicted value and is specified as a standard deviation." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -119,7 +122,7 @@ may depend on the predicted value and is specified as a standard deviation." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -138,7 +141,7 @@ may depend on the predicted value and is specified as a standard deviation." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Add normally distributed errors to simulated kinetic degradation data</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/add_err.R'><code>R/add_err.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/add_err.R'><code>R/add_err.R</code></a></small> <div class="hidden name"><code>add_err.Rd</code></div> </div> @@ -148,16 +151,16 @@ degradation model using <code><a href='mkinpredict.html'>mkinpredict</a></code>. may depend on the predicted value and is specified as a standard deviation.</p> </div> - <pre class="usage"><span class='fu'>add_err</span>( - <span class='no'>prediction</span>, - <span class='no'>sdfunc</span>, - <span class='kw'>secondary</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>), - <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1000</span>, - <span class='kw'>LOD</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, - <span class='kw'>reps</span> <span class='kw'>=</span> <span class='fl'>2</span>, - <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>1</span>, - <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>NA</span> -)</pre> + <pre class="usage"><span class='fu'>add_err</span><span class='op'>(</span> + <span class='va'>prediction</span>, + <span class='va'>sdfunc</span>, + secondary <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"M1"</span>, <span class='st'>"M2"</span><span class='op'>)</span>, + n <span class='op'>=</span> <span class='fl'>1000</span>, + LOD <span class='op'>=</span> <span class='fl'>0.1</span>, + reps <span class='op'>=</span> <span class='fl'>2</span>, + digits <span class='op'>=</span> <span class='fl'>1</span>, + seed <span class='op'>=</span> <span class='cn'>NA</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -212,46 +215,53 @@ components of the list are datasets compatible with <code><a href='mkinfit.html' the question. XV Symposium on Pesticide Chemistry 2-4 September 2015, Piacenza, Italy https://jrwb.de/posters/piacenza_2015.pdf</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># The kinetic model</span> -<span class='no'>m_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M1"</span>), - <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='va'>m_SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"M1"</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># Generate a prediction for a specific set of parameters</span> -<span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span>) +<span class='va'>sampling_times</span> <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span><span class='op'>)</span> <span class='co'># This is the prediction used for the "Type 2 datasets" on the Piacenza poster</span> <span class='co'># from 2015</span> -<span class='no'>d_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_SFO_SFO</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, - <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Log.html'>log</a></span>(<span class='fl'>2</span>)/<span class='fl'>1000</span>), - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>), - <span class='no'>sampling_times</span>) +<span class='va'>d_SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>m_SFO_SFO</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.1</span>, f_parent_to_M1 <span class='op'>=</span> <span class='fl'>0.5</span>, + k_M1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Log.html'>log</a></span><span class='op'>(</span><span class='fl'>2</span><span class='op'>)</span><span class='op'>/</span><span class='fl'>1000</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, M1 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, + <span class='va'>sampling_times</span><span class='op'>)</span> <span class='co'># Add an error term with a constant (independent of the value) standard deviation</span> <span class='co'># of 10, and generate three datasets</span> -<span class='no'>d_SFO_SFO_err</span> <span class='kw'><-</span> <span class='fu'>add_err</span>(<span class='no'>d_SFO_SFO</span>, <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fl'>10</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456789</span> ) +<span class='va'>d_SFO_SFO_err</span> <span class='op'><-</span> <span class='fu'>add_err</span><span class='op'>(</span><span class='va'>d_SFO_SFO</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fl'>10</span>, n <span class='op'>=</span> <span class='fl'>3</span>, seed <span class='op'>=</span> <span class='fl'>123456789</span> <span class='op'>)</span> <span class='co'># Name the datasets for nicer plotting</span> -<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>d_SFO_SFO_err</span>) <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>1</span>:<span class='fl'>3</span>) +<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>d_SFO_SFO_err</span><span class='op'>)</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span><span class='op'>(</span><span class='st'>"Dataset"</span>, <span class='fl'>1</span><span class='op'>:</span><span class='fl'>3</span><span class='op'>)</span> <span class='co'># Name the model in the list of models (with only one member in this case) for</span> <span class='co'># nicer plotting later on. Be quiet and use only one core not to offend CRAN</span> <span class='co'># checks</span> <span class='co'># \dontrun{</span> -<span class='no'>f_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>m_SFO_SFO</span>), - <span class='no'>d_SFO_SFO_err</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, - <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='va'>f_SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"SFO-SFO"</span> <span class='op'>=</span> <span class='va'>m_SFO_SFO</span><span class='op'>)</span>, + <span class='va'>d_SFO_SFO_err</span>, cores <span class='op'>=</span> <span class='fl'>1</span>, + quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_SFO_SFO</span>)</div><div class='img'><img src='add_err-1.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_SFO_SFO</span><span class='op'>)</span> +</div><div class='img'><img src='add_err-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># We would like to inspect the fit for dataset 3 more closely</span> <span class='co'># Using double brackets makes the returned object an mkinfit object</span> <span class='co'># instead of a list of mkinfit objects, so plot.mkinfit is used</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_SFO_SFO</span><span class='kw'>[[</span><span class='fl'>3</span>]], <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='add_err-2.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_SFO_SFO</span><span class='op'>[[</span><span class='fl'>3</span><span class='op'>]</span><span class='op'>]</span>, show_residuals <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='img'><img src='add_err-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># If we use single brackets, we should give two indices (model and dataset),</span> <span class='co'># and plot.mmkin is used</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_SFO_SFO</span>[<span class='fl'>1</span>, <span class='fl'>3</span>])</div><div class='img'><img src='add_err-3.png' alt='' width='700' height='433' /></div><div class='input'># } +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_SFO_SFO</span><span class='op'>[</span><span class='fl'>1</span>, <span class='fl'>3</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='add_err-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># }</span> </div></pre> </div> @@ -269,7 +279,7 @@ https://jrwb.de/posters/piacenza_2015.pdf</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/confint.mkinfit.html b/docs/reference/confint.mkinfit.html index a9080c39..b9e58e8f 100644 --- a/docs/reference/confint.mkinfit.html +++ b/docs/reference/confint.mkinfit.html @@ -79,7 +79,7 @@ method of Venzon and Moolgavkar (1988)." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -116,6 +116,9 @@ method of Venzon and Moolgavkar (1988)." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -124,7 +127,7 @@ method of Venzon and Moolgavkar (1988)." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -143,7 +146,7 @@ method of Venzon and Moolgavkar (1988)." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Confidence intervals for parameters of mkinfit objects</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/confint.mkinfit.R'><code>R/confint.mkinfit.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/confint.mkinfit.R'><code>R/confint.mkinfit.R</code></a></small> <div class="hidden name"><code>confint.mkinfit.Rd</code></div> </div> @@ -159,19 +162,20 @@ method of Venzon and Moolgavkar (1988).</p> </div> <pre class="usage"><span class='co'># S3 method for mkinfit</span> -<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>( - <span class='no'>object</span>, - <span class='no'>parm</span>, - <span class='kw'>level</span> <span class='kw'>=</span> <span class='fl'>0.95</span>, - <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>1</span> - <span class='no'>level</span>, - <span class='no'>cutoff</span>, - <span class='kw'>method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"quadratic"</span>, <span class='st'>"profile"</span>), - <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>backtransform</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>detectCores</span>()/<span class='fl'>2</span>), - <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='no'>...</span> -)</pre> +<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span> + <span class='va'>object</span>, + <span class='va'>parm</span>, + level <span class='op'>=</span> <span class='fl'>0.95</span>, + alpha <span class='op'>=</span> <span class='fl'>1</span> <span class='op'>-</span> <span class='va'>level</span>, + <span class='va'>cutoff</span>, + method <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"quadratic"</span>, <span class='st'>"profile"</span><span class='op'>)</span>, + transformed <span class='op'>=</span> <span class='cn'>TRUE</span>, + backtransform <span class='op'>=</span> <span class='cn'>TRUE</span>, + cores <span class='op'>=</span> <span class='fu'>parallel</span><span class='fu'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span><span class='op'>(</span><span class='op'>)</span>, + rel_tol <span class='op'>=</span> <span class='fl'>0.01</span>, + quiet <span class='op'>=</span> <span class='cn'>FALSE</span>, + <span class='va'>...</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -224,6 +228,12 @@ their confidence intervals?</p></td> On Windows machines, cores > 1 is currently not supported.</p></td> </tr> <tr> + <th>rel_tol</th> + <td><p>If the method is 'profile', what should be the accuracy +of the lower and upper bounds, relative to the estimate obtained from +the quadratic method?</p></td> + </tr> + <tr> <th>quiet</th> <td><p>Should we suppress the message "Profiling the likelihood"</p></td> </tr> @@ -247,69 +257,79 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, 87–94.</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#> 2.5% 97.5% -#> parent_0 71.8242430 93.1600766 -#> k_parent_sink 0.2109541 0.4440528 -#> sigma 1.9778868 7.3681380</div><div class='input'> + <pre class="examples"><div class='input'><span class='va'>f</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 71.8242430 93.1600766 +#> k_parent 0.2109541 0.4440528 +#> sigma 1.9778868 7.3681380</div><div class='input'> <span class='co'># \dontrun{</span> -<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>)</div><div class='output co'>#> <span class='message'>Profiling the likelihood</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 73.0641834 92.1392181 -#> k_parent_sink 0.2170293 0.4235348 -#> sigma 3.1307772 8.0628314</div><div class='input'> +<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f</span>, method <span class='op'>=</span> <span class='st'>"profile"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Profiling the likelihood</span></div><div class='output co'>#> 2.5% 97.5% +#> parent_0 73.0641834 92.1392181 +#> k_parent 0.2170293 0.4235348 +#> sigma 3.1307772 8.0628314</div><div class='input'> <span class='co'># Set the number of cores for the profiling method for further examples</span> -<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span>(<span class='st'>"NOT_CRAN"</span>), <span class='st'>"true"</span>)) { - <span class='no'>n_cores</span> <span class='kw'><-</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>() - <span class='fl'>1</span> -} <span class='kw'>else</span> { - <span class='no'>n_cores</span> <span class='kw'><-</span> <span class='fl'>1</span> -} -<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span>(<span class='st'>"TRAVIS"</span>) <span class='kw'>!=</span> <span class='st'>""</span>) <span class='no'>n_cores</span> <span class='kw'>=</span> <span class='fl'>1</span> -<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/Sys.info.html'>Sys.info</a></span>()[<span class='st'>"sysname"</span>] <span class='kw'>==</span> <span class='st'>"Windows"</span>) <span class='no'>n_cores</span> <span class='kw'>=</span> <span class='fl'>1</span> - -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>SFO_SFO.ff</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), - <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>f_d_1</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> user system elapsed -#> 3.430 0.000 3.432 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span> +<span class='kw'>if</span> <span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span><span class='op'>(</span><span class='st'>"NOT_CRAN"</span><span class='op'>)</span>, <span class='st'>"true"</span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> + <span class='va'>n_cores</span> <span class='op'><-</span> <span class='fu'>parallel</span><span class='fu'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span><span class='op'>(</span><span class='op'>)</span> <span class='op'>-</span> <span class='fl'>1</span> +<span class='op'>}</span> <span class='kw'>else</span> <span class='op'>{</span> + <span class='va'>n_cores</span> <span class='op'><-</span> <span class='fl'>1</span> +<span class='op'>}</span> +<span class='kw'>if</span> <span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span><span class='op'>(</span><span class='st'>"TRAVIS"</span><span class='op'>)</span> <span class='op'>!=</span> <span class='st'>""</span><span class='op'>)</span> <span class='va'>n_cores</span> <span class='op'>=</span> <span class='fl'>1</span> +<span class='kw'>if</span> <span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/Sys.info.html'>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='va'>n_cores</span> <span class='op'>=</span> <span class='fl'>1</span> + +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.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 class='op'>)</span> +<span class='va'>SFO_SFO.ff</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, + use_of_ff <span class='op'>=</span> <span class='st'>"max"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +<span class='va'>f_d_1</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>FOCUS_2006_D</span>, <span class='va'>value</span> <span class='op'>!=</span> <span class='fl'>0</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span><span class='op'>(</span><span class='va'>ci_profile</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"profile"</span>, cores <span class='op'>=</span> <span class='fl'>1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> user system elapsed +#> 3.770 1.035 3.460 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span> <span class='co'># If we additionally exclude parent_0 (the confidence of which is often of</span> <span class='co'># minor interest), we get a nice performance improvement from about 50</span> <span class='co'># seconds to about 12 seconds if we use at least four cores</span> -<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile_no_parent_0</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"k_parent_sink"</span>, <span class='st'>"k_parent_m1"</span>, <span class='st'>"k_m1_sink"</span>, <span class='st'>"sigma"</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>))</div><div class='output co'>#> <span class='message'>Profiling the likelihood</span></div><div class='output co'>#> <span class='warning'>Warning: scheduled cores 1, 2, 3 encountered errors in user code, all values of the jobs will be affected</span></div><div class='output co'>#> <span class='error'>Error in dimnames(x) <- dn: length of 'dimnames' [2] not equal to array extent</span></div><div class='output co'>#> <span class='message'>Timing stopped at: 0.012 0.042 0.211</span></div><div class='input'><span class='no'>ci_profile</span></div><div class='output co'>#> 2.5% 97.5% +<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span><span class='op'>(</span><span class='va'>ci_profile_no_parent_0</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"profile"</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"k_parent_sink"</span>, <span class='st'>"k_parent_m1"</span>, <span class='st'>"k_m1_sink"</span>, <span class='st'>"sigma"</span><span class='op'>)</span>, cores <span class='op'>=</span> <span class='va'>n_cores</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Profiling the likelihood</span></div><div class='output co'>#> <span class='warning'>Warning: scheduled cores 3, 2, 1 encountered errors in user code, all values of the jobs will be affected</span></div><div class='output co'>#> <span class='error'>Error in dimnames(x) <- dn: length of 'dimnames' [2] not equal to array extent</span></div><div class='output co'>#> <span class='message'>Timing stopped at: 0.014 0.027 0.196</span></div><div class='input'><span class='va'>ci_profile</span> +</div><div class='output co'>#> 2.5% 97.5% #> parent_0 96.456003640 1.027703e+02 #> k_parent 0.090911032 1.071578e-01 #> k_m1 0.003892605 6.702778e-03 #> f_parent_to_m1 0.471328495 5.611550e-01 -#> sigma 2.535612399 3.985263e+00</div><div class='input'><span class='no'>ci_quadratic_transformed</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>) -<span class='no'>ci_quadratic_transformed</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 96.403839476 1.027931e+02 +#> sigma 2.535612399 3.985263e+00</div><div class='input'><span class='va'>ci_quadratic_transformed</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span> +<span class='va'>ci_quadratic_transformed</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 96.403839460 1.027931e+02 #> k_parent 0.090823790 1.072543e-01 #> k_m1 0.004012216 6.897547e-03 #> f_parent_to_m1 0.469118713 5.595960e-01 -#> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>ci_quadratic_untransformed</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) -<span class='no'>ci_quadratic_untransformed</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 96.403839429 1.027931e+02 +#> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='va'>ci_quadratic_untransformed</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_1</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span>, transformed <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> +<span class='va'>ci_quadratic_untransformed</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 96.403839413 1.027931e+02 #> k_parent 0.090491931 1.069035e-01 #> k_m1 0.003835483 6.685819e-03 -#> f_parent_to_m1 0.469113364 5.598386e-01 +#> f_parent_to_m1 0.469113365 5.598386e-01 #> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='co'># Against the expectation based on Bates and Watts (1988), the confidence</span> <span class='co'># intervals based on the internal parameter transformation are less</span> <span class='co'># congruent with the likelihood based intervals. Note the superiority of the</span> <span class='co'># interval based on the untransformed fit for k_m1_sink</span> -<span class='no'>rel_diffs_transformed</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_transformed</span> - <span class='no'>ci_profile</span>)/<span class='no'>ci_profile</span>) -<span class='no'>rel_diffs_untransformed</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_untransformed</span> - <span class='no'>ci_profile</span>)/<span class='no'>ci_profile</span>) -<span class='no'>rel_diffs_transformed</span> <span class='kw'><</span> <span class='no'>rel_diffs_untransformed</span></div><div class='output co'>#> 2.5% 97.5% +<span class='va'>rel_diffs_transformed</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span><span class='op'>(</span><span class='op'>(</span><span class='va'>ci_quadratic_transformed</span> <span class='op'>-</span> <span class='va'>ci_profile</span><span class='op'>)</span><span class='op'>/</span><span class='va'>ci_profile</span><span class='op'>)</span> +<span class='va'>rel_diffs_untransformed</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span><span class='op'>(</span><span class='op'>(</span><span class='va'>ci_quadratic_untransformed</span> <span class='op'>-</span> <span class='va'>ci_profile</span><span class='op'>)</span><span class='op'>/</span><span class='va'>ci_profile</span><span class='op'>)</span> +<span class='va'>rel_diffs_transformed</span> <span class='op'><</span> <span class='va'>rel_diffs_untransformed</span> +</div><div class='output co'>#> 2.5% 97.5% #> parent_0 TRUE TRUE #> k_parent TRUE TRUE #> k_m1 FALSE FALSE #> f_parent_to_m1 TRUE FALSE -#> sigma FALSE TRUE</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span>(<span class='no'>rel_diffs_transformed</span>, <span class='fl'>3</span>)</div><div class='output co'>#> 2.5% 97.5% +#> sigma FALSE FALSE</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span><span class='op'>(</span><span class='va'>rel_diffs_transformed</span>, <span class='fl'>3</span><span class='op'>)</span> +</div><div class='output co'>#> 2.5% 97.5% #> parent_0 0.000541 0.000222 #> k_parent 0.000960 0.000900 #> k_m1 0.030700 0.029100 #> f_parent_to_m1 0.004690 0.002780 -#> sigma 0.055000 0.032700</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span>(<span class='no'>rel_diffs_untransformed</span>, <span class='fl'>3</span>)</div><div class='output co'>#> 2.5% 97.5% +#> sigma 0.055000 0.032700</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span><span class='op'>(</span><span class='va'>rel_diffs_untransformed</span>, <span class='fl'>3</span><span class='op'>)</span> +</div><div class='output co'>#> 2.5% 97.5% #> parent_0 0.000541 0.000222 #> k_parent 0.004610 0.002370 #> k_m1 0.014700 0.002530 @@ -317,67 +337,76 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, #> sigma 0.055000 0.032700</div><div class='input'> <span class='co'># Investigate a case with formation fractions</span> -<span class='no'>f_d_2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>ci_profile_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>)</div><div class='output co'>#> <span class='message'>Profiling the likelihood</span></div><div class='input'><span class='no'>ci_profile_ff</span></div><div class='output co'>#> 2.5% 97.5% +<span class='va'>f_d_2</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO.ff</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>FOCUS_2006_D</span>, <span class='va'>value</span> <span class='op'>!=</span> <span class='fl'>0</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'><span class='va'>ci_profile_ff</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_2</span>, method <span class='op'>=</span> <span class='st'>"profile"</span>, cores <span class='op'>=</span> <span class='va'>n_cores</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Profiling the likelihood</span></div><div class='input'><span class='va'>ci_profile_ff</span> +</div><div class='output co'>#> 2.5% 97.5% #> parent_0 96.456003640 1.027703e+02 #> k_parent 0.090911032 1.071578e-01 #> k_m1 0.003892605 6.702778e-03 #> f_parent_to_m1 0.471328495 5.611550e-01 -#> sigma 2.535612399 3.985263e+00</div><div class='input'><span class='no'>ci_quadratic_transformed_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>) -<span class='no'>ci_quadratic_transformed_ff</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 96.403839476 1.027931e+02 +#> sigma 2.535612399 3.985263e+00</div><div class='input'><span class='va'>ci_quadratic_transformed_ff</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_2</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span> +<span class='va'>ci_quadratic_transformed_ff</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 96.403839460 1.027931e+02 #> k_parent 0.090823790 1.072543e-01 #> k_m1 0.004012216 6.897547e-03 #> f_parent_to_m1 0.469118713 5.595960e-01 -#> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>ci_quadratic_untransformed_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) -<span class='no'>ci_quadratic_untransformed_ff</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 96.403839429 1.027931e+02 +#> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='va'>ci_quadratic_untransformed_ff</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_d_2</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span>, transformed <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> +<span class='va'>ci_quadratic_untransformed_ff</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 96.403839413 1.027931e+02 #> k_parent 0.090491931 1.069035e-01 #> k_m1 0.003835483 6.685819e-03 -#> f_parent_to_m1 0.469113364 5.598386e-01 -#> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>rel_diffs_transformed_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_transformed_ff</span> - <span class='no'>ci_profile_ff</span>)/<span class='no'>ci_profile_ff</span>) -<span class='no'>rel_diffs_untransformed_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_untransformed_ff</span> - <span class='no'>ci_profile_ff</span>)/<span class='no'>ci_profile_ff</span>) +#> f_parent_to_m1 0.469113365 5.598386e-01 +#> sigma 2.396089689 3.854918e+00</div><div class='input'><span class='va'>rel_diffs_transformed_ff</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span><span class='op'>(</span><span class='op'>(</span><span class='va'>ci_quadratic_transformed_ff</span> <span class='op'>-</span> <span class='va'>ci_profile_ff</span><span class='op'>)</span><span class='op'>/</span><span class='va'>ci_profile_ff</span><span class='op'>)</span> +<span class='va'>rel_diffs_untransformed_ff</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span><span class='op'>(</span><span class='op'>(</span><span class='va'>ci_quadratic_untransformed_ff</span> <span class='op'>-</span> <span class='va'>ci_profile_ff</span><span class='op'>)</span><span class='op'>/</span><span class='va'>ci_profile_ff</span><span class='op'>)</span> <span class='co'># While the confidence interval for the parent rate constant is closer to</span> <span class='co'># the profile based interval when using the internal parameter</span> <span class='co'># transformation, the interval for the metabolite rate constant is 'better</span> <span class='co'># without internal parameter transformation.</span> -<span class='no'>rel_diffs_transformed_ff</span> <span class='kw'><</span> <span class='no'>rel_diffs_untransformed_ff</span></div><div class='output co'>#> 2.5% 97.5% +<span class='va'>rel_diffs_transformed_ff</span> <span class='op'><</span> <span class='va'>rel_diffs_untransformed_ff</span> +</div><div class='output co'>#> 2.5% 97.5% #> parent_0 TRUE TRUE #> k_parent TRUE TRUE #> k_m1 FALSE FALSE #> f_parent_to_m1 TRUE FALSE -#> sigma FALSE TRUE</div><div class='input'><span class='no'>rel_diffs_transformed_ff</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 0.0005408078 0.0002217796 +#> sigma FALSE FALSE</div><div class='input'><span class='va'>rel_diffs_transformed_ff</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 0.0005408080 0.0002217794 #> k_parent 0.0009596417 0.0009003876 -#> k_m1 0.0307277372 0.0290579184 -#> f_parent_to_m1 0.0046884131 0.0027782558 -#> sigma 0.0550252516 0.0327066836</div><div class='input'><span class='no'>rel_diffs_untransformed_ff</span></div><div class='output co'>#> 2.5% 97.5% -#> parent_0 0.0005408083 0.000221780 -#> k_parent 0.0046100096 0.002373023 -#> k_m1 0.0146746467 0.002530101 -#> f_parent_to_m1 0.0046997600 0.002346022 -#> sigma 0.0550252516 0.032706684</div><div class='input'> +#> k_m1 0.0307277370 0.0290579182 +#> f_parent_to_m1 0.0046884130 0.0027782556 +#> sigma 0.0550252516 0.0327066836</div><div class='input'><span class='va'>rel_diffs_untransformed_ff</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 0.0005408085 0.0002217799 +#> k_parent 0.0046100096 0.0023730229 +#> k_m1 0.0146746469 0.0025301011 +#> f_parent_to_m1 0.0046997599 0.0023460223 +#> sigma 0.0550252516 0.0327066836</div><div class='input'> <span class='co'># The profiling for the following fit does not finish in a reasonable time,</span> <span class='co'># therefore we use the quadratic approximation</span> -<span class='no'>m_synth_DFOP_par</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)), - <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), - <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>DFOP_par_c</span> <span class='kw'><-</span> <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span> -<span class='no'>f_tc_2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_DFOP_par</span>, <span class='no'>DFOP_par_c</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, - <span class='kw'>error_model_algorithm</span> <span class='kw'>=</span> <span class='st'>"direct"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> -#> <span class='warning'>iteration limit reached without convergence (10)</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#> 2.5% 97.5% -#> parent_0 95.654015524 105.79279749 -#> k_M1 0.037723773 0.04447598 -#> k_M2 0.008586438 0.01078076 -#> f_parent_to_M1 0.230403596 0.61953014 -#> f_parent_to_M2 0.162909765 0.38019017 -#> k1 0.275434628 0.33331386 -#> k2 0.018602188 0.02249211 -#> g 0.675149759 0.73520889 -#> sigma_low 0.251416929 0.84272023 -#> rsd_high 0.040371818 0.07666540</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='st'>"parent_0"</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#> 2.5% 97.5% -#> parent_0 95.65402 105.7928</div><div class='input'># } +<span class='va'>m_synth_DFOP_par</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"DFOP"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"M1"</span>, <span class='st'>"M2"</span><span class='op'>)</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, + M2 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, + use_of_ff <span class='op'>=</span> <span class='st'>"max"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +<span class='va'>DFOP_par_c</span> <span class='op'><-</span> <span class='va'>synthetic_data_for_UBA_2014</span><span class='op'>[[</span><span class='fl'>12</span><span class='op'>]</span><span class='op'>]</span><span class='op'>$</span><span class='va'>data</span> +<span class='va'>f_tc_2</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>m_synth_DFOP_par</span>, <span class='va'>DFOP_par_c</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span>, + error_model_algorithm <span class='op'>=</span> <span class='st'>"direct"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_tc_2</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 94.59613833 106.19939215 +#> k_M1 0.03760542 0.04490759 +#> k_M2 0.00856874 0.01087675 +#> f_parent_to_M1 0.02146166 0.62023888 +#> f_parent_to_M2 0.01516502 0.37975343 +#> k1 0.27389751 0.33388078 +#> k2 0.01861456 0.02250379 +#> g 0.67194349 0.73583256 +#> sigma_low 0.25128383 0.83992146 +#> rsd_high 0.04041100 0.07662001</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span><span class='op'>(</span><span class='va'>f_tc_2</span>, <span class='st'>"parent_0"</span>, method <span class='op'>=</span> <span class='st'>"quadratic"</span><span class='op'>)</span> +</div><div class='output co'>#> 2.5% 97.5% +#> parent_0 94.59614 106.1994</div><div class='input'><span class='co'># }</span> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -394,7 +423,7 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/create_deg_func.html b/docs/reference/create_deg_func.html index 3bb512cd..6b8f3e83 100644 --- a/docs/reference/create_deg_func.html +++ b/docs/reference/create_deg_func.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -109,6 +109,9 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -117,7 +120,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -136,7 +139,7 @@ <div class="col-md-9 contents"> <div class="page-header"> <h1>Create degradation functions for known analytical solutions</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/create_deg_func.R'><code>R/create_deg_func.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/create_deg_func.R'><code>R/create_deg_func.R</code></a></small> <div class="hidden name"><code>create_deg_func.Rd</code></div> </div> @@ -144,7 +147,7 @@ <p>Create degradation functions for known analytical solutions</p> </div> - <pre class="usage"><span class='fu'>create_deg_func</span>(<span class='no'>spec</span>, <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"min"</span>, <span class='st'>"max"</span>))</pre> + <pre class="usage"><span class='fu'>create_deg_func</span><span class='op'>(</span><span class='va'>spec</span>, use_of_ff <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"min"</span>, <span class='st'>"max"</span><span class='op'>)</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -165,32 +168,36 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>FOCUS_D</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>) <span class='co'># to avoid warnings</span> -<span class='no'>fit_1</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>fit_2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='co'># \dontrun{</span> -<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/library.html'>require</a></span>(<span class='no'>rbenchmark</span>)) - <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span>( - <span class='kw'>analytical</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), - <span class='kw'>deSolve</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), - <span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='output co'>#> <span class='message'>Loading required package: rbenchmark</span></div><div class='output co'>#> test replications elapsed relative user.self sys.self user.child -#> 1 analytical 2 0.407 1.000 0.407 0 0 -#> 2 deSolve 2 0.699 1.717 0.698 0 0 +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='va'>FOCUS_D</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>FOCUS_2006_D</span>, <span class='va'>value</span> <span class='op'>!=</span> <span class='fl'>0</span><span class='op'>)</span> <span class='co'># to avoid warnings</span> +<span class='va'>fit_1</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, solution_type <span class='op'>=</span> <span class='st'>"analytical"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'><span class='va'>fit_2</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'><span class='co'># \dontrun{</span> +<span class='kw'>if</span> <span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='va'><a href='http://rbenchmark.googlecode.com'>rbenchmark</a></span><span class='op'>)</span><span class='op'>)</span> + <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span><span class='op'>(</span> + analytical <span class='op'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, solution_type <span class='op'>=</span> <span class='st'>"analytical"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>, + deSolve <span class='op'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>, + replications <span class='op'>=</span> <span class='fl'>2</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Loading required package: rbenchmark</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='output co'>#> test replications elapsed relative user.self sys.self user.child +#> 1 analytical 2 0.416 1.000 0.416 0 0 +#> 2 deSolve 2 0.715 1.719 0.715 0 0 #> sys.child #> 1 0 -#> 2 0</div><div class='input'> <span class='no'>DFOP_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span>( - <span class='kw'>analytical</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>DFOP_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), - <span class='kw'>deSolve</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>DFOP_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), - <span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='output co'>#> test replications elapsed relative user.self sys.self user.child -#> 1 analytical 2 0.887 1.000 0.886 0 0 -#> 2 deSolve 2 1.639 1.848 1.638 0 0 +#> 2 0</div><div class='input'> <span class='va'>DFOP_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"DFOP"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span><span class='op'>(</span> + analytical <span class='op'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>DFOP_SFO</span>, <span class='va'>FOCUS_D</span>, solution_type <span class='op'>=</span> <span class='st'>"analytical"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>, + deSolve <span class='op'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>DFOP_SFO</span>, <span class='va'>FOCUS_D</span>, solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>, + replications <span class='op'>=</span> <span class='fl'>2</span><span class='op'>)</span> +</div><div class='output co'>#> test replications elapsed relative user.self sys.self user.child +#> 1 analytical 2 0.912 1.00 0.912 0.001 0 +#> 2 deSolve 2 1.724 1.89 1.723 0.000 0 #> sys.child #> 1 0 -#> 2 0</div><div class='input'># } +#> 2 0</div><div class='input'><span class='co'># }</span> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -207,7 +214,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/endpoints.html b/docs/reference/endpoints.html index d9c43f84..376a263e 100644 --- a/docs/reference/endpoints.html +++ b/docs/reference/endpoints.html @@ -78,7 +78,7 @@ advantage that the SFORB model can also be used for metabolites." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -115,6 +115,9 @@ advantage that the SFORB model can also be used for metabolites." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -123,7 +126,7 @@ advantage that the SFORB model can also be used for metabolites." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -143,7 +146,7 @@ advantage that the SFORB model can also be used for metabolites." /> <div class="page-header"> <h1>Function to calculate endpoints for further use from kinetic models fitted with mkinfit</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/endpoints.R'><code>R/endpoints.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/endpoints.R'><code>R/endpoints.R</code></a></small> <div class="hidden name"><code>endpoints.Rd</code></div> </div> @@ -155,7 +158,7 @@ are equivalent to the rate constants of the DFOP model, but with the advantage that the SFORB model can also be used for metabolites.</p> </div> - <pre class="usage"><span class='fu'>endpoints</span>(<span class='no'>fit</span>)</pre> + <pre class="usage"><span class='fu'>endpoints</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -176,27 +179,37 @@ of these SFORB models, equivalent to DFOP rate constants</p> <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2> <p>The function is used internally by <code><a href='summary.mkinfit.html'>summary.mkinfit</a></code>.</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='fu'>endpoints</span>(<span class='no'>fit</span>)</div><div class='output co'>#> $distimes + <span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='fu'>endpoints</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='output co'>#> $distimes #> DT50 DT90 DT50back #> parent 1.785233 15.1479 4.559973 #> </div><div class='input'> <span class='co'># \dontrun{</span> - <span class='no'>fit_2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFORB"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='fu'>endpoints</span>(<span class='no'>fit_2</span>)</div><div class='output co'>#> $ff -#> parent_free_sink -#> 1 + <span class='va'>fit_2</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"DFOP"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='fu'>endpoints</span><span class='op'>(</span><span class='va'>fit_2</span><span class='op'>)</span> +</div><div class='output co'>#> $distimes +#> DT50 DT90 DT50back DT50_k1 DT50_k2 +#> parent 1.886925 21.25106 6.397207 1.508293 38.83438 +#> </div><div class='input'> <span class='va'>fit_3</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"SFORB"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='fu'>endpoints</span><span class='op'>(</span><span class='va'>fit_3</span><span class='op'>)</span> +</div><div class='output co'>#> $ff +#> parent_free +#> 1 #> #> $SFORB #> parent_b1 parent_b2 #> 0.4595574 0.0178488 #> #> $distimes -#> DT50 DT90 DT50_parent_b1 DT50_parent_b2 -#> parent 1.886925 21.25106 1.508293 38.83438 -#> </div><div class='input'> # } +#> DT50 DT90 DT50back DT50_parent_b1 DT50_parent_b2 +#> parent 1.886925 21.25106 6.397208 1.508293 38.83438 +#> </div><div class='input'> <span class='co'># }</span> </div></pre> </div> @@ -214,7 +227,7 @@ of these SFORB models, equivalent to DFOP rate constants</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/get_deg_func.html b/docs/reference/get_deg_func.html index 812b25d7..a8e289a6 100644 --- a/docs/reference/get_deg_func.html +++ b/docs/reference/get_deg_func.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -109,6 +109,9 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -117,7 +120,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -136,7 +139,7 @@ <div class="col-md-9 contents"> <div class="page-header"> <h1>Retrieve a degradation function from the mmkin namespace</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nlme.mmkin.R'><code>R/nlme.mmkin.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/nlme.mmkin.R'><code>R/nlme.mmkin.R</code></a></small> <div class="hidden name"><code>get_deg_func.Rd</code></div> </div> @@ -144,7 +147,7 @@ <p>Retrieve a degradation function from the mmkin namespace</p> </div> - <pre class="usage"><span class='fu'>get_deg_func</span>()</pre> + <pre class="usage"><span class='fu'>get_deg_func</span><span class='op'>(</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> @@ -167,7 +170,7 @@ nlme.mmkin</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html index 30be0a73..485fcaf0 100644 --- a/docs/reference/ilr.html +++ b/docs/reference/ilr.html @@ -73,7 +73,7 @@ transformations." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ transformations." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ transformations." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ transformations." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Function to perform isometric log-ratio transformation</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/ilr.R'><code>R/ilr.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/ilr.R'><code>R/ilr.R</code></a></small> <div class="hidden name"><code>ilr.Rd</code></div> </div> @@ -146,9 +149,9 @@ transformations." /> transformations.</p> </div> - <pre class="usage"><span class='fu'>ilr</span>(<span class='no'>x</span>) + <pre class="usage"><span class='fu'>ilr</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> -<span class='fu'>invilr</span>(<span class='no'>x</span>)</pre> +<span class='fu'>invilr</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -173,19 +176,33 @@ Compositional Data Using Robust Methods. Math Geosci 40 233-248</p> <div class='dont-index'><p>Another implementation can be found in R package <code>robCompositions</code>.</p></div> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>René Lehmann and Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># Order matters</span> -<span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.1</span>, <span class='fl'>1</span>, <span class='fl'>10</span>))</div><div class='output co'>#> [1] -1.628174 -2.820079</div><div class='input'><span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>10</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>))</div><div class='output co'>#> [1] 1.628174 2.820079</div><div class='input'><span class='co'># Equal entries give ilr transformations with zeros as elements</span> -<span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>3</span>, <span class='fl'>3</span>))</div><div class='output co'>#> [1] 0 0</div><div class='input'><span class='co'># Almost equal entries give small numbers</span> -<span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.3</span>, <span class='fl'>0.4</span>, <span class='fl'>0.3</span>))</div><div class='output co'>#> [1] -0.2034219 0.1174457</div><div class='input'><span class='co'># Only the ratio between the numbers counts, not their sum</span> -<span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#> [1] 0.70 0.29 0.01</div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fl'>2.1</span> * <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#> [1] 0.70 0.29 0.01</div><div class='input'><span class='co'># Inverse transformation of larger numbers gives unequal elements</span> -<span class='fu'>invilr</span>(-<span class='fl'>10</span>)</div><div class='output co'>#> [1] 7.213536e-07 9.999993e-01</div><div class='input'><span class='fu'>invilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(-<span class='fl'>10</span>, <span class='fl'>0</span>))</div><div class='output co'>#> [1] 7.207415e-07 9.991507e-01 8.486044e-04</div><div class='input'><span class='co'># The sum of the elements of the inverse ilr is 1</span> -<span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span>(<span class='fu'>invilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(-<span class='fl'>10</span>, <span class='fl'>0</span>)))</div><div class='output co'>#> [1] 1</div><div class='input'><span class='co'># This is why we do not need all elements of the inverse transformation to go back:</span> -<span class='no'>a</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.1</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span>) -<span class='no'>b</span> <span class='kw'><-</span> <span class='fu'>invilr</span>(<span class='no'>a</span>) -<span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>b</span>) <span class='co'># Four elements</span></div><div class='output co'>#> [1] 4</div><div class='input'><span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='fl'>1</span> - <span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>]))) <span class='co'># Gives c(0.1, 0.3, 0.5)</span></div><div class='output co'>#> [1] 0.1 0.3 0.5</div><div class='input'> +<span class='fu'>ilr</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.1</span>, <span class='fl'>1</span>, <span class='fl'>10</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> [1] -1.628174 -2.820079</div><div class='input'><span class='fu'>ilr</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>10</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> [1] 1.628174 2.820079</div><div class='input'><span class='co'># Equal entries give ilr transformations with zeros as elements</span> +<span class='fu'>ilr</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>3</span>, <span class='fl'>3</span>, <span class='fl'>3</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> [1] 0 0</div><div class='input'><span class='co'># Almost equal entries give small numbers</span> +<span class='fu'>ilr</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.3</span>, <span class='fl'>0.4</span>, <span class='fl'>0.3</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> [1] -0.2034219 0.1174457</div><div class='input'><span class='co'># Only the ratio between the numbers counts, not their sum</span> +<span class='fu'>invilr</span><span class='op'>(</span><span class='fu'>ilr</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> [1] 0.70 0.29 0.01</div><div class='input'><span class='fu'>invilr</span><span class='op'>(</span><span class='fu'>ilr</span><span class='op'>(</span><span class='fl'>2.1</span> <span class='op'>*</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> [1] 0.70 0.29 0.01</div><div class='input'><span class='co'># Inverse transformation of larger numbers gives unequal elements</span> +<span class='fu'>invilr</span><span class='op'>(</span><span class='op'>-</span><span class='fl'>10</span><span class='op'>)</span> +</div><div class='output co'>#> [1] 7.213536e-07 9.999993e-01</div><div class='input'><span class='fu'>invilr</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='op'>-</span><span class='fl'>10</span>, <span class='fl'>0</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> [1] 7.207415e-07 9.991507e-01 8.486044e-04</div><div class='input'><span class='co'># The sum of the elements of the inverse ilr is 1</span> +<span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span><span class='op'>(</span><span class='fu'>invilr</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='op'>-</span><span class='fl'>10</span>, <span class='fl'>0</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> [1] 1</div><div class='input'><span class='co'># This is why we do not need all elements of the inverse transformation to go back:</span> +<span class='va'>a</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.1</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span><span class='op'>)</span> +<span class='va'>b</span> <span class='op'><-</span> <span class='fu'>invilr</span><span class='op'>(</span><span class='va'>a</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span><span class='op'>(</span><span class='va'>b</span><span class='op'>)</span> <span class='co'># Four elements</span> +</div><div class='output co'>#> [1] 4</div><div class='input'><span class='fu'>ilr</span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='va'>b</span><span class='op'>[</span><span class='fl'>1</span><span class='op'>:</span><span class='fl'>3</span><span class='op'>]</span>, <span class='fl'>1</span> <span class='op'>-</span> <span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span><span class='op'>(</span><span class='va'>b</span><span class='op'>[</span><span class='fl'>1</span><span class='op'>:</span><span class='fl'>3</span><span class='op'>]</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span> <span class='co'># Gives c(0.1, 0.3, 0.5)</span> +</div><div class='output co'>#> [1] 0.1 0.3 0.5</div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -202,7 +219,7 @@ Compositional Data Using Robust Methods. Math Geosci 40 233-248</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/index.html b/docs/reference/index.html index 961352e0..e0d34e8f 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -108,6 +108,9 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -116,7 +119,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -675,7 +678,7 @@ kinetic models fitted with mkinfit</p></td> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/logLik.mkinfit.html b/docs/reference/logLik.mkinfit.html index 22561d8a..2b87c95f 100644 --- a/docs/reference/logLik.mkinfit.html +++ b/docs/reference/logLik.mkinfit.html @@ -76,7 +76,7 @@ the error model." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -113,6 +113,9 @@ the error model." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -121,7 +124,7 @@ the error model." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -140,7 +143,7 @@ the error model." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Calculated the log-likelihood of a fitted mkinfit object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/logLik.mkinfit.R'><code>R/logLik.mkinfit.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/logLik.mkinfit.R'><code>R/logLik.mkinfit.R</code></a></small> <div class="hidden name"><code>logLik.mkinfit.Rd</code></div> </div> @@ -153,7 +156,7 @@ the error model.</p> </div> <pre class="usage"><span class='co'># S3 method for mkinfit</span> -<span class='fu'><a href='https://rdrr.io/r/stats/logLik.html'>logLik</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/stats/logLik.html'>logLik</a></span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -182,18 +185,26 @@ and the fitted error model parameters.</p> <div class='dont-index'><p>Compare the AIC of columns of <code><a href='mmkin.html'>mmkin</a></code> objects using <code><a href='AIC.mmkin.html'>AIC.mmkin</a></code>.</p></div> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># \dontrun{</span> - <span class='no'>sfo_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>) - )</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='no'>d_t</span> <span class='kw'><-</span> <span class='no'>FOCUS_2006_D</span> - <span class='no'>f_nw</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># no weighting (weights are unity)</span></div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='no'>f_obs</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='no'>f_tc</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f_nw</span>, <span class='no'>f_obs</span>, <span class='no'>f_tc</span>)</div><div class='output co'>#> df AIC + <span class='va'>sfo_sfo</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span> + <span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='va'>d_t</span> <span class='op'><-</span> <span class='va'>FOCUS_2006_D</span> + <span class='va'>f_nw</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>sfo_sfo</span>, <span class='va'>d_t</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> <span class='co'># no weighting (weights are unity)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'> <span class='va'>f_obs</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>sfo_sfo</span>, <span class='va'>d_t</span>, error_model <span class='op'>=</span> <span class='st'>"obs"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='va'>f_tc</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>sfo_sfo</span>, <span class='va'>d_t</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f_nw</span>, <span class='va'>f_obs</span>, <span class='va'>f_tc</span><span class='op'>)</span> +</div><div class='output co'>#> df AIC #> f_nw 5 204.4486 #> f_obs 6 205.8727 -#> f_tc 6 141.9656</div><div class='input'> # } +#> f_tc 6 141.9656</div><div class='input'> <span class='co'># }</span> </div></pre> </div> @@ -211,7 +222,7 @@ and the fitted error model parameters.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/logistic.solution-1.png b/docs/reference/logistic.solution-1.png Binary files differindex fd11d0c0..84d8e722 100644 --- a/docs/reference/logistic.solution-1.png +++ b/docs/reference/logistic.solution-1.png diff --git a/docs/reference/logistic.solution-2.png b/docs/reference/logistic.solution-2.png Binary files differindex 78a31f93..764996df 100644 --- a/docs/reference/logistic.solution-2.png +++ b/docs/reference/logistic.solution-2.png diff --git a/docs/reference/logistic.solution.html b/docs/reference/logistic.solution.html index 87dc78a9..97c98a4a 100644 --- a/docs/reference/logistic.solution.html +++ b/docs/reference/logistic.solution.html @@ -73,7 +73,7 @@ an increasing rate constant, supposedly caused by microbial growth" /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ an increasing rate constant, supposedly caused by microbial growth" /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ an increasing rate constant, supposedly caused by microbial growth" /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ an increasing rate constant, supposedly caused by microbial growth" /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Logistic kinetics</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small> <div class="hidden name"><code>logistic.solution.Rd</code></div> </div> @@ -146,7 +149,7 @@ an increasing rate constant, supposedly caused by microbial growth" /> an increasing rate constant, supposedly caused by microbial growth</p> </div> - <pre class="usage"><span class='fu'>logistic.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>kmax</span>, <span class='no'>k0</span>, <span class='no'>r</span>)</pre> + <pre class="usage"><span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>t</span>, <span class='va'>parent_0</span>, <span class='va'>kmax</span>, <span class='va'>k0</span>, <span class='va'>r</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -205,42 +208,51 @@ Version 1.1, 18 December 2014 <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># Reproduce the plot on page 57 of FOCUS (2014)</span> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.2</span>), - <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>100</span>), - <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>, <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Residue"</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.4</span>), - <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.8</span>), - <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>3</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.001</span>, <span class='fl'>0.2</span>), - <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>4</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>4</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.08</span>, <span class='fl'>0.2</span>), - <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>5</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/legend.html'>legend</a></span>(<span class='st'>"topright"</span>, <span class='kw'>inset</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, - <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='st'>"k0 = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.001</span>, <span class='fl'>0.08</span>), - <span class='st'>", r = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.2</span>, <span class='fl'>0.4</span>, <span class='fl'>0.8</span>, <span class='fl'>0.2</span>, <span class='fl'>0.2</span>)), - <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fl'>5</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fl'>5</span>)</div><div class='img'><img src='logistic.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.2</span><span class='op'>)</span>, + from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, ylim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>100</span><span class='op'>)</span>, + xlab <span class='op'>=</span> <span class='st'>"Time"</span>, ylab <span class='op'>=</span> <span class='st'>"Residue"</span><span class='op'>)</span> +</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.4</span><span class='op'>)</span>, + from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, add <span class='op'>=</span> <span class='cn'>TRUE</span>, lty <span class='op'>=</span> <span class='fl'>2</span>, col <span class='op'>=</span> <span class='fl'>2</span><span class='op'>)</span> +</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.8</span><span class='op'>)</span>, + from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, add <span class='op'>=</span> <span class='cn'>TRUE</span>, lty <span class='op'>=</span> <span class='fl'>3</span>, col <span class='op'>=</span> <span class='fl'>3</span><span class='op'>)</span> +</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.001</span>, <span class='fl'>0.2</span><span class='op'>)</span>, + from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, add <span class='op'>=</span> <span class='cn'>TRUE</span>, lty <span class='op'>=</span> <span class='fl'>4</span>, col <span class='op'>=</span> <span class='fl'>4</span><span class='op'>)</span> +</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'>logistic.solution</span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.08</span>, <span class='fl'>0.2</span><span class='op'>)</span>, + from <span class='op'>=</span> <span class='fl'>0</span>, to <span class='op'>=</span> <span class='fl'>100</span>, add <span class='op'>=</span> <span class='cn'>TRUE</span>, lty <span class='op'>=</span> <span class='fl'>5</span>, col <span class='op'>=</span> <span class='fl'>5</span><span class='op'>)</span> +</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/legend.html'>legend</a></span><span class='op'>(</span><span class='st'>"topright"</span>, inset <span class='op'>=</span> <span class='fl'>0.05</span>, + legend <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span><span class='op'>(</span><span class='st'>"k0 = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.001</span>, <span class='fl'>0.08</span><span class='op'>)</span>, + <span class='st'>", r = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.2</span>, <span class='fl'>0.4</span>, <span class='fl'>0.8</span>, <span class='fl'>0.2</span>, <span class='fl'>0.2</span><span class='op'>)</span><span class='op'>)</span>, + lty <span class='op'>=</span> <span class='fl'>1</span><span class='op'>:</span><span class='fl'>5</span>, col <span class='op'>=</span> <span class='fl'>1</span><span class='op'>:</span><span class='fl'>5</span><span class='op'>)</span> +</div><div class='img'><img src='logistic.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># Fit with synthetic data</span> - <span class='no'>logistic</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"logistic"</span>)) - - <span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span>) - <span class='no'>parms_logistic</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>kmax</span> <span class='kw'>=</span> <span class='fl'>0.08</span>, <span class='kw'>k0</span> <span class='kw'>=</span> <span class='fl'>0.0001</span>, <span class='kw'>r</span> <span class='kw'>=</span> <span class='fl'>0.2</span>) - <span class='no'>d_logistic</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>logistic</span>, - <span class='no'>parms_logistic</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>), - <span class='no'>sampling_times</span>) - <span class='no'>d_2_1</span> <span class='kw'><-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_logistic</span>, - <span class='kw'>sdfunc</span> <span class='kw'>=</span> <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='sigma_twocomp.html'>sigma_twocomp</a></span>(<span class='no'>x</span>, <span class='fl'>0.5</span>, <span class='fl'>0.07</span>), - <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>reps</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>LOD</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456</span>)<span class='kw'>[[</span><span class='fl'>1</span>]] - - <span class='no'>m</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"logistic"</span>, <span class='no'>d_2_1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>m</span>)</div><div class='img'><img src='logistic.solution-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>m</span>)$<span class='no'>bpar</span></div><div class='output co'>#> Estimate se_notrans t value Pr(>t) Lower -#> parent_0 1.057896e+02 1.9023449649 55.610120 3.768361e-16 1.016451e+02 -#> kmax 6.398190e-02 0.0143201029 4.467978 3.841828e-04 3.929235e-02 -#> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846685e-08 -#> r 2.263946e-01 0.1718110773 1.317695 1.061044e-01 4.335843e-02 + <span class='va'>logistic</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"logistic"</span><span class='op'>)</span><span class='op'>)</span> + + <span class='va'>sampling_times</span> <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span><span class='op'>)</span> + <span class='va'>parms_logistic</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>kmax <span class='op'>=</span> <span class='fl'>0.08</span>, k0 <span class='op'>=</span> <span class='fl'>0.0001</span>, r <span class='op'>=</span> <span class='fl'>0.2</span><span class='op'>)</span> + <span class='va'>d_logistic</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>logistic</span>, + <span class='va'>parms_logistic</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, + <span class='va'>sampling_times</span><span class='op'>)</span> + <span class='va'>d_2_1</span> <span class='op'><-</span> <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>d_logistic</span>, + sdfunc <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'><a href='sigma_twocomp.html'>sigma_twocomp</a></span><span class='op'>(</span><span class='va'>x</span>, <span class='fl'>0.5</span>, <span class='fl'>0.07</span><span class='op'>)</span>, + n <span class='op'>=</span> <span class='fl'>1</span>, reps <span class='op'>=</span> <span class='fl'>2</span>, digits <span class='op'>=</span> <span class='fl'>5</span>, LOD <span class='op'>=</span> <span class='fl'>0.1</span>, seed <span class='op'>=</span> <span class='fl'>123456</span><span class='op'>)</span><span class='op'>[[</span><span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span> + + <span class='va'>m</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"logistic"</span>, <span class='va'>d_2_1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span> +</div><div class='img'><img src='logistic.solution-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span><span class='op'>$</span><span class='va'>bpar</span> +</div><div class='output co'>#> Estimate se_notrans t value Pr(>t) Lower +#> parent_0 1.057896e+02 1.9023449703 55.610119 3.768361e-16 1.016451e+02 +#> kmax 6.398190e-02 0.0143201031 4.467978 3.841829e-04 3.929235e-02 +#> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846688e-08 +#> r 2.263946e-01 0.1718110715 1.317695 1.061044e-01 4.335843e-02 #> sigma 5.332935e+00 0.9145907310 5.830952 4.036926e-05 3.340213e+00 #> Upper #> parent_0 109.9341588 #> kmax 0.1041853 -#> k0 0.4448750 -#> r 1.1821121 -#> sigma 7.3256566</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>m</span>)$<span class='no'>distimes</span></div><div class='output co'>#> DT50 DT90 DT50_k0 DT50_kmax -#> parent 36.86533 62.41511 4297.854 10.83349</div><div class='input'> +#> k0 0.4448749 +#> r 1.1821120 +#> sigma 7.3256566</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>m</span><span class='op'>)</span><span class='op'>$</span><span class='va'>distimes</span> +</div><div class='output co'>#> DT50 DT90 DT50_k0 DT50_kmax +#> parent 36.86533 62.41511 4297.853 10.83349</div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -257,7 +269,7 @@ Version 1.1, 18 December 2014 </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/max_twa_parent.html b/docs/reference/max_twa_parent.html index ada54cba..8e584375 100644 --- a/docs/reference/max_twa_parent.html +++ b/docs/reference/max_twa_parent.html @@ -78,7 +78,7 @@ soil section of the FOCUS guidance." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -115,6 +115,9 @@ soil section of the FOCUS guidance." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -123,7 +126,7 @@ soil section of the FOCUS guidance." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -143,7 +146,7 @@ soil section of the FOCUS guidance." /> <div class="page-header"> <h1>Function to calculate maximum time weighted average concentrations from kinetic models fitted with mkinfit</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/max_twa_parent.R'><code>R/max_twa_parent.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/max_twa_parent.R'><code>R/max_twa_parent.R</code></a></small> <div class="hidden name"><code>max_twa_parent.Rd</code></div> </div> @@ -155,15 +158,15 @@ FOMC, DFOP and HS models, using the analytical formulas given in the PEC soil section of the FOCUS guidance.</p> </div> - <pre class="usage"><span class='fu'>max_twa_parent</span>(<span class='no'>fit</span>, <span class='no'>windows</span>) + <pre class="usage"><span class='fu'>max_twa_parent</span><span class='op'>(</span><span class='va'>fit</span>, <span class='va'>windows</span><span class='op'>)</span> -<span class='fu'>max_twa_sfo</span>(<span class='kw'>M0</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>k</span>, <span class='no'>t</span>) +<span class='fu'>max_twa_sfo</span><span class='op'>(</span>M0 <span class='op'>=</span> <span class='fl'>1</span>, <span class='va'>k</span>, <span class='va'>t</span><span class='op'>)</span> -<span class='fu'>max_twa_fomc</span>(<span class='kw'>M0</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>alpha</span>, <span class='no'>beta</span>, <span class='no'>t</span>) +<span class='fu'>max_twa_fomc</span><span class='op'>(</span>M0 <span class='op'>=</span> <span class='fl'>1</span>, <span class='va'>alpha</span>, <span class='va'>beta</span>, <span class='va'>t</span><span class='op'>)</span> -<span class='fu'>max_twa_dfop</span>(<span class='kw'>M0</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>g</span>, <span class='no'>t</span>) +<span class='fu'>max_twa_dfop</span><span class='op'>(</span>M0 <span class='op'>=</span> <span class='fl'>1</span>, <span class='va'>k1</span>, <span class='va'>k2</span>, <span class='va'>g</span>, <span class='va'>t</span><span class='op'>)</span> -<span class='fu'>max_twa_hs</span>(<span class='kw'>M0</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>tb</span>, <span class='no'>t</span>)</pre> +<span class='fu'>max_twa_hs</span><span class='op'>(</span>M0 <span class='op'>=</span> <span class='fl'>1</span>, <span class='va'>k1</span>, <span class='va'>k2</span>, <span class='va'>tb</span>, <span class='va'>t</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -230,11 +233,15 @@ and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, <a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='fu'>max_twa_parent</span>(<span class='no'>fit</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>7</span>, <span class='fl'>21</span>))</div><div class='output co'>#> 7 21 + <span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='fu'>max_twa_parent</span><span class='op'>(</span><span class='va'>fit</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>7</span>, <span class='fl'>21</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> 7 21 #> 34.71343 18.22124 </div><div class='input'> </div></pre> </div> @@ -252,7 +259,7 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index b2402e04..b8adde34 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -74,7 +74,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -111,6 +111,9 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -119,7 +122,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -148,12 +151,12 @@ extracts.</p> </div> - <pre class="usage"><span class='no'>mccall81_245T</span></pre> + <pre class="usage"><span class='va'>mccall81_245T</span></pre> <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2> - <p>A dataframe containing the following variables.</p><dl'> + <p>A dataframe containing the following variables.</p><dl> <dt><code>name</code></dt><dd><p>the name of the compound observed. Note that T245 is used as an acronym for 2,4,5-T. T245 is a legitimate object name in R, which is necessary for specifying models using @@ -171,27 +174,31 @@ <a href='http://dx.doi.org/10.1021/jf00103a026'>http://dx.doi.org/10.1021/jf00103a026</a></p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'> <span class='no'>SFO_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>T245</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"phenol"</span>), - <span class='kw'>phenol</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"anisole"</span>), - <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># \dontrun{</span> - <span class='no'>fit.1</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.1</span>)$<span class='no'>bpar</span></div><div class='output co'>#> Estimate se_notrans t value Pr(>t) -#> T245_0 1.038550e+02 2.184707509 47.537272 4.472189e-18 + <pre class="examples"><div class='input'> <span class='va'>SFO_SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>T245 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"phenol"</span><span class='op'>)</span>, + phenol <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"anisole"</span><span class='op'>)</span>, + anisole <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># \dontrun{</span> + <span class='va'>fit.1</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>mccall81_245T</span>, <span class='va'>soil</span> <span class='op'>==</span> <span class='st'>"Commerce"</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>fit.1</span><span class='op'>)</span><span class='op'>$</span><span class='va'>bpar</span> +</div><div class='output co'>#> Estimate se_notrans t value Pr(>t) +#> T245_0 1.038550e+02 2.184707514 47.537272 4.472189e-18 #> k_T245 4.337042e-02 0.001898397 22.845818 2.276912e-13 -#> k_phenol 4.050581e-01 0.298699410 1.356073 9.756993e-02 +#> k_phenol 4.050581e-01 0.298699428 1.356073 9.756994e-02 #> k_anisole 6.678742e-03 0.000802144 8.326114 2.623179e-07 -#> f_T245_to_phenol 6.227599e-01 0.398534147 1.562626 6.949418e-02 -#> f_phenol_to_anisole 1.000000e+00 0.671844135 1.488440 7.867793e-02 -#> sigma 2.514628e+00 0.490755933 5.123989 6.233163e-05 +#> f_T245_to_phenol 6.227599e-01 0.398534167 1.562626 6.949418e-02 +#> f_phenol_to_anisole 1.000000e+00 0.671844168 1.488440 7.867794e-02 +#> sigma 2.514628e+00 0.490755943 5.123989 6.233164e-05 #> Lower Upper -#> T245_0 99.246061427 1.084640e+02 +#> T245_0 99.246061371 1.084640e+02 #> k_T245 0.039631621 4.746194e-02 #> k_phenol 0.218013878 7.525762e-01 #> k_anisole 0.005370739 8.305299e-03 #> f_T245_to_phenol 0.547559082 6.924813e-01 #> f_phenol_to_anisole 0.000000000 1.000000e+00 -#> sigma 1.706607296 3.322649e+00</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.1</span>)</div><div class='output co'>#> $ff +#> sigma 1.706607296 3.322649e+00</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>fit.1</span><span class='op'>)</span> +</div><div class='output co'>#> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink -#> 6.227599e-01 3.772401e-01 1.000000e+00 1.005127e-10 +#> 6.227599e-01 3.772401e-01 1.000000e+00 1.748047e-10 #> #> $distimes #> DT50 DT90 @@ -199,18 +206,22 @@ #> phenol 1.711229 5.68458 #> anisole 103.784092 344.76329 #> </div><div class='input'> <span class='co'># k_phenol_sink is really small, therefore fix it to zero</span> - <span class='no'>fit.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), - <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_phenol_sink</span> <span class='kw'>=</span> <span class='fl'>0</span>), - <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='st'>"k_phenol_sink"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Initial parameter(s) k_phenol_sink not used in the model</span></div><div class='output co'>#> <span class='error'>Error in data.frame(value = c(state.ini.fixed, parms.fixed)): row names contain missing values</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.2</span>)$<span class='no'>bpar</span></div><div class='output co'>#> <span class='error'>Error in summary(fit.2): object 'fit.2' not found</span></div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.1</span>)</div><div class='output co'>#> $ff + <span class='va'>fit.2</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>mccall81_245T</span>, <span class='va'>soil</span> <span class='op'>==</span> <span class='st'>"Commerce"</span><span class='op'>)</span>, + parms.ini <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_phenol_sink <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, + fixed_parms <span class='op'>=</span> <span class='st'>"k_phenol_sink"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Initial parameter(s) k_phenol_sink not used in the model</span></div><div class='output co'>#> <span class='error'>Error in data.frame(value = c(state.ini.fixed, parms.fixed)): row names contain missing values</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>fit.2</span><span class='op'>)</span><span class='op'>$</span><span class='va'>bpar</span> +</div><div class='output co'>#> <span class='error'>Error in summary(fit.2): object 'fit.2' not found</span></div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>fit.1</span><span class='op'>)</span> +</div><div class='output co'>#> $ff #> T245_phenol T245_sink phenol_anisole phenol_sink -#> 6.227599e-01 3.772401e-01 1.000000e+00 1.005127e-10 +#> 6.227599e-01 3.772401e-01 1.000000e+00 1.748047e-10 #> #> $distimes #> DT50 DT90 #> T245 15.982025 53.09114 #> phenol 1.711229 5.68458 #> anisole 103.784092 344.76329 -#> </div><div class='input'> <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fit.2</span>)</div><div class='output co'>#> <span class='error'>Error in identical(fit$err_mod, "const"): object 'fit.2' not found</span></div><div class='input'> # } +#> </div><div class='input'> <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span><span class='op'>(</span><span class='va'>fit.2</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='error'>Error in identical(fit$err_mod, "const"): object 'fit.2' not found</span></div><div class='input'> <span class='co'># }</span> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -227,7 +238,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mkinds.html b/docs/reference/mkinds.html index 2e52a95d..1fa1bca5 100644 --- a/docs/reference/mkinds.html +++ b/docs/reference/mkinds.html @@ -75,7 +75,7 @@ provided by this package come as mkinds objects nevertheless." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -112,6 +112,9 @@ provided by this package come as mkinds objects nevertheless." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -120,7 +123,7 @@ provided by this package come as mkinds objects nevertheless." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -139,7 +142,7 @@ provided by this package come as mkinds objects nevertheless." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>A dataset class for mkin</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinds.R'><code>R/mkinds.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinds.R'><code>R/mkinds.R</code></a></small> <div class="hidden name"><code>mkinds.Rd</code></div> </div> @@ -157,7 +160,7 @@ provided by this package come as mkinds objects nevertheless.</p> <div class='dont-index'><p>The S3 printing method <code><a href='print.mkinds.html'>print.mkinds</a></code></p></div> <h2 class="hasAnchor" id="public-fields"><a class="anchor" href="#public-fields"></a>Public fields</h2> - <p><div class="r6-fields"></p><dl'> + <p><div class="r6-fields"></p><dl> <dt><code>title</code></dt><dd><p>A full title for the dataset</p></dd> <dt><code>sampling_times</code></dt><dd><p>The sampling times</p></dd> @@ -177,19 +180,19 @@ and value in order to be compatible with mkinfit</p></dd> <h2 class="hasAnchor" id="methods"><a class="anchor" href="#methods"></a>Methods</h2> -<h3>Public methods</h3> +<h3 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Public methods</h3> <ul> <li><p><a href='#method-new'><code>mkinds$new()</code></a></p></li> <li><p><a href='#method-clone'><code>mkinds$clone()</code></a></p></li> </ul> <p><hr> -<a id="method-new"></a></p><h3>Method <code>new()</code></h3> -<p>Create a new mkinds object</p><h3>Usage</h3> -<p><div class="r"></p><pre><span class='no'>mkinds</span>$<span class='fu'>new</span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>""</span>, <span class='no'>data</span>, <span class='kw'>time_unit</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>unit</span> <span class='kw'>=</span> <span class='fl'>NA</span>)</pre><p></div></p> +<a id="method-new"></a></p><h3 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Method <code>new()</code></h3> +<p>Create a new mkinds object</p><h4 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Usage</h4> +<p><div class="r"></p><pre><span class='va'>mkinds</span><span class='op'>$</span><span class='fu'>new</span><span class='op'>(</span>title <span class='op'>=</span> <span class='st'>""</span>, <span class='va'>data</span>, time_unit <span class='op'>=</span> <span class='cn'>NA</span>, unit <span class='op'>=</span> <span class='cn'>NA</span><span class='op'>)</span></pre><p></div></p> -<h3>Arguments</h3> -<p><div class="arguments"></p><dl'> +<h4 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Arguments</h4> +<p><div class="arguments"></p><dl> <dt><code>title</code></dt><dd><p>The dataset title</p></dd> <dt><code>data</code></dt><dd><p>The data</p></dd> @@ -200,12 +203,12 @@ and value in order to be compatible with mkinfit</p></dd> </dl><p></div></p> <p><hr> -<a id="method-clone"></a></p><h3>Method <code>clone()</code></h3> -<p>The objects of this class are cloneable with this method.</p><h3>Usage</h3> -<p><div class="r"></p><pre><span class='no'>mkinds</span>$<span class='fu'>clone</span>(<span class='kw'>deep</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre><p></div></p> +<a id="method-clone"></a></p><h3 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Method <code>clone()</code></h3> +<p>The objects of this class are cloneable with this method.</p><h4 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Usage</h4> +<p><div class="r"></p><pre><span class='va'>mkinds</span><span class='op'>$</span><span class='fu'>clone</span><span class='op'>(</span>deep <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span></pre><p></div></p> -<h3>Arguments</h3> -<p><div class="arguments"></p><dl'> +<h4 class='hasAnchor' id='arguments'><a class='anchor' href='#arguments'></a>Arguments</h4> +<p><div class="arguments"></p><dl> <dt><code>deep</code></dt><dd><p>Whether to make a deep clone.</p></dd> </dl><p></div></p> @@ -214,8 +217,9 @@ and value in order to be compatible with mkinfit</p></dd> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> -<span class='no'>mds</span> <span class='kw'><-</span> <span class='no'>mkinds</span>$<span class='fu'>new</span>(<span class='st'>"FOCUS A"</span>, <span class='no'>FOCUS_2006_A</span>) -<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>mds</span>)</div><div class='output co'>#> <mkinds> with $title: FOCUS A +<span class='va'>mds</span> <span class='op'><-</span> <span class='va'>mkinds</span><span class='op'>$</span><span class='fu'>new</span><span class='op'>(</span><span class='st'>"FOCUS A"</span>, <span class='va'>FOCUS_2006_A</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>mds</span><span class='op'>)</span> +</div><div class='output co'>#> <mkinds> with $title: FOCUS A #> Observed compounds $observed: parent #> Sampling times $sampling_times: 0, 3, 7, 14, 30, 62, 90, 118 #> With a maximum of 1 replicates</div><div class='input'> @@ -235,7 +239,7 @@ and value in order to be compatible with mkinfit</p></dd> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mkinerrplot-1.png b/docs/reference/mkinerrplot-1.png Binary files differindex c5d3495f..8b3240de 100644 --- a/docs/reference/mkinerrplot-1.png +++ b/docs/reference/mkinerrplot-1.png diff --git a/docs/reference/mkinerrplot.html b/docs/reference/mkinerrplot.html index c2be5abf..dfbd88be 100644 --- a/docs/reference/mkinerrplot.html +++ b/docs/reference/mkinerrplot.html @@ -76,7 +76,7 @@ using the argument show_errplot = TRUE." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -113,6 +113,9 @@ using the argument show_errplot = TRUE." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -121,7 +124,7 @@ using the argument show_errplot = TRUE." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -140,7 +143,7 @@ using the argument show_errplot = TRUE." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Function to plot squared residuals and the error model for an mkin object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinerrplot.R'><code>R/mkinerrplot.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinerrplot.R'><code>R/mkinerrplot.R</code></a></small> <div class="hidden name"><code>mkinerrplot.Rd</code></div> </div> @@ -152,20 +155,20 @@ and this error model plot can be obtained with <code><a href='plot.mkinfit.html' using the argument <code>show_errplot = TRUE</code>.</p> </div> - <pre class="usage"><span class='fu'>mkinerrplot</span>( - <span class='no'>object</span>, - <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>object</span>$<span class='no'>mkinmod</span>$<span class='no'>map</span>), - <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1.1</span> * <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span>(<span class='no'>object</span>$<span class='no'>data</span>$<span class='no'>predicted</span>)), - <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Predicted"</span>, - <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Squared residual"</span>, - <span class='kw'>maxy</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='st'>"topright"</span>, - <span class='kw'>col_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>pch_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>frame</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='no'>...</span> -)</pre> + <pre class="usage"><span class='fu'>mkinerrplot</span><span class='op'>(</span> + <span class='va'>object</span>, + obs_vars <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>object</span><span class='op'>$</span><span class='va'>mkinmod</span><span class='op'>$</span><span class='va'>map</span><span class='op'>)</span>, + xlim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>1.1</span> <span class='op'>*</span> <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span><span class='op'>(</span><span class='va'>object</span><span class='op'>$</span><span class='va'>data</span><span class='op'>$</span><span class='va'>predicted</span><span class='op'>)</span><span class='op'>)</span>, + xlab <span class='op'>=</span> <span class='st'>"Predicted"</span>, + ylab <span class='op'>=</span> <span class='st'>"Squared residual"</span>, + maxy <span class='op'>=</span> <span class='st'>"auto"</span>, + legend <span class='op'>=</span> <span class='cn'>TRUE</span>, + lpos <span class='op'>=</span> <span class='st'>"topright"</span>, + col_obs <span class='op'>=</span> <span class='st'>"auto"</span>, + pch_obs <span class='op'>=</span> <span class='st'>"auto"</span>, + frame <span class='op'>=</span> <span class='cn'>TRUE</span>, + <span class='va'>...</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -220,7 +223,7 @@ be passed on to <code><a href='https://rdrr.io/r/graphics/legend.html'>legend</a </tr> <tr> <th>...</th> - <td><p>further arguments passed to <code><a href='https://rdrr.io/r/base/plot.html'>plot</a></code>.</p></td> + <td><p>further arguments passed to <code><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></code>.</p></td> </tr> </table> @@ -232,11 +235,17 @@ effect, namely to produce a plot.</p> <div class='dont-index'><p><code><a href='mkinplot.html'>mkinplot</a></code>, for a way to plot the data and the fitted lines of the mkinfit object.</p></div> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># \dontrun{</span> -<span class='no'>model</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinerrplot</span>(<span class='no'>fit</span>)</div><div class='img'><img src='mkinerrplot-1.png' alt='' width='700' height='433' /></div><div class='input'># } +<span class='va'>model</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>model</span>, <span class='va'>FOCUS_2006_D</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinerrplot</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='mkinerrplot-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># }</span> </div></pre> </div> @@ -254,7 +263,7 @@ lines of the mkinfit object.</p></div> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index c38c5cca..872b9ab5 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -41,9 +41,11 @@ <meta property="og:title" content="Fit a kinetic model to data with one or more state variables — mkinfit" /> <meta property="og:description" content="This function maximises the likelihood of the observed data using the Port -algorithm nlminb, and the specified initial or fixed +algorithm stats::nlminb(), and the specified initial or fixed parameters and starting values. In each step of the optimisation, the -kinetic model is solved using the function mkinpredict. The +kinetic model is solved using the function mkinpredict(), except +if an analytical solution is implemented, in which case the model is solved +using the degradation function in the mkinmod object. The parameters of the selected error model are fitted simultaneously with the degradation model parameters, as both of them are arguments of the likelihood function." /> @@ -78,7 +80,7 @@ likelihood function." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -115,6 +117,9 @@ likelihood function." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -123,7 +128,7 @@ likelihood function." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -142,53 +147,55 @@ likelihood function." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Fit a kinetic model to data with one or more state variables</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinfit.R'><code>R/mkinfit.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinfit.R'><code>R/mkinfit.R</code></a></small> <div class="hidden name"><code>mkinfit.Rd</code></div> </div> <div class="ref-description"> <p>This function maximises the likelihood of the observed data using the Port -algorithm <code><a href='https://rdrr.io/r/stats/nlminb.html'>nlminb</a></code>, and the specified initial or fixed +algorithm <code><a href='https://rdrr.io/r/stats/nlminb.html'>stats::nlminb()</a></code>, and the specified initial or fixed parameters and starting values. In each step of the optimisation, the -kinetic model is solved using the function <code><a href='mkinpredict.html'>mkinpredict</a></code>. The +kinetic model is solved using the function <code><a href='mkinpredict.html'>mkinpredict()</a></code>, except +if an analytical solution is implemented, in which case the model is solved +using the degradation function in the <a href='mkinmod.html'>mkinmod</a> object. The parameters of the selected error model are fitted simultaneously with the degradation model parameters, as both of them are arguments of the likelihood function.</p> </div> - <pre class="usage"><span class='fu'>mkinfit</span>( - <span class='no'>mkinmod</span>, - <span class='no'>observed</span>, - <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>state.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>err.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, - <span class='kw'>fixed_initials</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>mkinmod</span>$<span class='no'>diffs</span>)[-<span class='fl'>1</span>], - <span class='kw'>from_max_mean</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"auto"</span>, <span class='st'>"analytical"</span>, <span class='st'>"eigen"</span>, <span class='st'>"deSolve"</span>), - <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>, - <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>eval.max</span> <span class='kw'>=</span> <span class='fl'>300</span>, <span class='kw'>iter.max</span> <span class='kw'>=</span> <span class='fl'>200</span>), - <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>, - <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>, - <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"const"</span>, <span class='st'>"obs"</span>, <span class='st'>"tc"</span>), - <span class='kw'>error_model_algorithm</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"auto"</span>, <span class='st'>"d_3"</span>, <span class='st'>"direct"</span>, <span class='st'>"twostep"</span>, <span class='st'>"threestep"</span>, - <span class='st'>"fourstep"</span>, <span class='st'>"IRLS"</span>, <span class='st'>"OLS"</span>), - <span class='kw'>reweight.tol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>, - <span class='kw'>reweight.max.iter</span> <span class='kw'>=</span> <span class='fl'>10</span>, - <span class='kw'>trace_parms</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='no'>...</span> -)</pre> + <pre class="usage"><span class='fu'>mkinfit</span><span class='op'>(</span> + <span class='va'>mkinmod</span>, + <span class='va'>observed</span>, + parms.ini <span class='op'>=</span> <span class='st'>"auto"</span>, + state.ini <span class='op'>=</span> <span class='st'>"auto"</span>, + err.ini <span class='op'>=</span> <span class='st'>"auto"</span>, + fixed_parms <span class='op'>=</span> <span class='cn'>NULL</span>, + fixed_initials <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>mkinmod</span><span class='op'>$</span><span class='va'>diffs</span><span class='op'>)</span><span class='op'>[</span><span class='op'>-</span><span class='fl'>1</span><span class='op'>]</span>, + from_max_mean <span class='op'>=</span> <span class='cn'>FALSE</span>, + solution_type <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"auto"</span>, <span class='st'>"analytical"</span>, <span class='st'>"eigen"</span>, <span class='st'>"deSolve"</span><span class='op'>)</span>, + method.ode <span class='op'>=</span> <span class='st'>"lsoda"</span>, + use_compiled <span class='op'>=</span> <span class='st'>"auto"</span>, + control <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>eval.max <span class='op'>=</span> <span class='fl'>300</span>, iter.max <span class='op'>=</span> <span class='fl'>200</span><span class='op'>)</span>, + transform_rates <span class='op'>=</span> <span class='cn'>TRUE</span>, + transform_fractions <span class='op'>=</span> <span class='cn'>TRUE</span>, + quiet <span class='op'>=</span> <span class='cn'>FALSE</span>, + atol <span class='op'>=</span> <span class='fl'>1e-08</span>, + rtol <span class='op'>=</span> <span class='fl'>1e-10</span>, + error_model <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"const"</span>, <span class='st'>"obs"</span>, <span class='st'>"tc"</span><span class='op'>)</span>, + error_model_algorithm <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"auto"</span>, <span class='st'>"d_3"</span>, <span class='st'>"direct"</span>, <span class='st'>"twostep"</span>, <span class='st'>"threestep"</span>, + <span class='st'>"fourstep"</span>, <span class='st'>"IRLS"</span>, <span class='st'>"OLS"</span><span class='op'>)</span>, + reweight.tol <span class='op'>=</span> <span class='fl'>1e-08</span>, + reweight.max.iter <span class='op'>=</span> <span class='fl'>10</span>, + trace_parms <span class='op'>=</span> <span class='cn'>FALSE</span>, + <span class='va'>...</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> <colgroup><col class="name" /><col class="desc" /></colgroup> <tr> <th>mkinmod</th> - <td><p>A list of class <code><a href='mkinmod.html'>mkinmod</a></code>, containing the kinetic + <td><p>A list of class <a href='mkinmod.html'>mkinmod</a>, containing the kinetic model to be fitted to the data, or one of the shorthand names ("SFO", "FOMC", "DFOP", "HS", "SFORB", "IORE"). If a shorthand name is given, a parent only degradation model is generated for the variable with the @@ -224,7 +231,7 @@ given below.</p></td> <td><p>A named vector of initial values for the state variables of the model. In case the observed variables are represented by more than one model variable, the names will differ from the names of the observed -variables (see <code>map</code> component of <code><a href='mkinmod.html'>mkinmod</a></code>). The default +variables (see <code>map</code> component of <a href='mkinmod.html'>mkinmod</a>). The default is to set the initial value of the first model variable to the mean of the time zero values for the variable with the maximum observed value, and all others to 0. If this variable has no time zero observations, its initial @@ -263,30 +270,28 @@ observed mean value is the new time zero.</p></td> <td><p>If set to "eigen", the solution of the system of differential equations is based on the spectral decomposition of the coefficient matrix in cases that this is possible. If set to "deSolve", a -numerical ode solver from package <code>deSolve</code> is used. If set to -"analytical", an analytical solution of the model is used. This is only -implemented for simple degradation experiments with only one state -variable, i.e. with no metabolites. The default is "auto", which uses -"analytical" if possible, otherwise "deSolve" if a compiler is present, -and "eigen" if no compiler is present and the model can be expressed using -eigenvalues and eigenvectors. This argument is passed on to the helper -function <code><a href='mkinpredict.html'>mkinpredict</a></code>.</p></td> +numerical <a href='https://rdrr.io/pkg/deSolve/man/ode.html'>ode solver from package deSolve</a> is used. If +set to "analytical", an analytical solution of the model is used. This is +only implemented for relatively simple degradation models. The default is +"auto", which uses "analytical" if possible, otherwise "deSolve" if a +compiler is present, and "eigen" if no compiler is present and the model +can be expressed using eigenvalues and eigenvectors.</p></td> </tr> <tr> <th>method.ode</th> - <td><p>The solution method passed via <code><a href='mkinpredict.html'>mkinpredict</a></code> -to <code>ode</code> in case the solution type is "deSolve". The default + <td><p>The solution method passed via <code><a href='mkinpredict.html'>mkinpredict()</a></code> +to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code> in case the solution type is "deSolve". The default "lsoda" is performant, but sometimes fails to converge.</p></td> </tr> <tr> <th>use_compiled</th> <td><p>If set to <code>FALSE</code>, no compiled version of the -<code><a href='mkinmod.html'>mkinmod</a></code> model is used in the calls to -<code><a href='mkinpredict.html'>mkinpredict</a></code> even if a compiled version is present.</p></td> +<a href='mkinmod.html'>mkinmod</a> model is used in the calls to <code><a href='mkinpredict.html'>mkinpredict()</a></code> even if a compiled +version is present.</p></td> </tr> <tr> <th>control</th> - <td><p>A list of control arguments passed to <code><a href='https://rdrr.io/r/stats/nlminb.html'>nlminb</a></code>.</p></td> + <td><p>A list of control arguments passed to <code><a href='https://rdrr.io/r/stats/nlminb.html'>stats::nlminb()</a></code>.</p></td> </tr> <tr> <th>transform_rates</th> @@ -306,7 +311,7 @@ fitting for better compliance with the assumption of normal distribution of the estimator. The default (TRUE) is to do transformations. If TRUE, the g parameter of the DFOP and HS models are also transformed, as they can also be seen as compositional data. The transformation used for these -transformations is the <code><a href='ilr.html'>ilr</a></code> transformation.</p></td> +transformations is the <code><a href='ilr.html'>ilr()</a></code> transformation.</p></td> </tr> <tr> <th>quiet</th> @@ -315,13 +320,14 @@ log-likelihood after each improvement?</p></td> </tr> <tr> <th>atol</th> - <td><p>Absolute error tolerance, passed to <code>ode</code>. Default -is 1e-8, lower than in <code>lsoda</code>.</p></td> + <td><p>Absolute error tolerance, passed to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>. Default +is 1e-8, which is lower than the default in the <code><a href='https://rdrr.io/pkg/deSolve/man/lsoda.html'>deSolve::lsoda()</a></code> +function which is used per default.</p></td> </tr> <tr> <th>rtol</th> - <td><p>Absolute error tolerance, passed to <code>ode</code>. Default -is 1e-10, much lower than in <code>lsoda</code>.</p></td> + <td><p>Absolute error tolerance, passed to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>. Default +is 1e-10, much lower than in <code><a href='https://rdrr.io/pkg/deSolve/man/lsoda.html'>deSolve::lsoda()</a></code>.</p></td> </tr> <tr> <th>error_model</th> @@ -342,11 +348,9 @@ normal distribution as assumed by this method.</p></td> the error model. If the error model is "const", unweighted nonlinear least squares fitting ("OLS") is selected. If the error model is "obs", or "tc", the "d_3" algorithm is selected.</p> -<p>The algorithm "d_3" will directly minimize the negative log-likelihood and</p><ul> -<li><p>independently - also use the three step algorithm described below. The -fit with the higher likelihood is returned.</p></li> -</ul> - +<p>The algorithm "d_3" will directly minimize the negative log-likelihood +and independently also use the three step algorithm described below. +The fit with the higher likelihood is returned.</p> <p>The algorithm "direct" will directly minimize the negative log-likelihood.</p> <p>The algorithm "twostep" will minimize the negative log-likelihood after an initial unweighted least squares optimisation step.</p> @@ -381,14 +385,13 @@ the error model parameters in IRLS fits.</p></td> <tr> <th>...</th> <td><p>Further arguments that will be passed on to -<code>deSolve</code>.</p></td> +<code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>.</p></td> </tr> </table> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - <p>A list with "mkinfit" in the class attribute. A summary can be -obtained by <code><a href='summary.mkinfit.html'>summary.mkinfit</a></code>.</p> + <p>A list with "mkinfit" in the class attribute.</p> <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> <p>Per default, parameters in the kinetic models are internally transformed in @@ -409,28 +412,31 @@ Degradation Data. <em>Environments</em> 6(12) 124 <a href='https://doi.org/10.3390/environments6120124'>doi:10.3390/environments6120124</a>.</p> <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> - <div class='dont-index'><p>Plotting methods <code><a href='plot.mkinfit.html'>plot.mkinfit</a></code> and -<code><a href='mkinparplot.html'>mkinparplot</a></code>.</p> + <div class='dont-index'><p><a href='summary.mkinfit.html'>summary.mkinfit</a>, <a href='plot.mkinfit.html'>plot.mkinfit</a>, <a href='parms.html'>parms</a> and <a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a>.</p> <p>Comparisons of models fitted to the same data can be made using <code><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></code> by virtue of the method <code><a href='logLik.mkinfit.html'>logLik.mkinfit</a></code>.</p> <p>Fitting of several models to several datasets in a single call to <code><a href='mmkin.html'>mmkin</a></code>.</p></div> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># Use shorthand notation for parent only degradation</span> -<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 -#> R version used for fitting: 4.0.0 -#> Date of fit: Wed May 27 07:03:45 2020 -#> Date of summary: Wed May 27 07:03:45 2020 +<span class='va'>fit</span> <span class='op'><-</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='output co'>#> mkin version used for fitting: 0.9.50.3 +#> R version used for fitting: 4.0.3 +#> Date of fit: Thu Oct 15 12:40:10 2020 +#> Date of summary: Thu Oct 15 12:40:10 2020 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 222 model solutions performed in 0.043 s +#> Fitted using 222 model solutions performed in 0.045 s #> #> Error model: Constant variance #> @@ -465,10 +471,10 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> #> Parameter correlation: #> parent_0 log_alpha log_beta sigma -#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.770e-08 -#> log_alpha -1.565e-01 1.000e+00 9.564e-01 9.974e-08 -#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.468e-08 -#> sigma 4.770e-08 9.974e-08 8.468e-08 1.000e+00 +#> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.758e-08 +#> log_alpha -1.565e-01 1.000e+00 9.564e-01 1.007e-07 +#> log_beta -3.142e-01 9.564e-01 1.000e+00 8.568e-08 +#> sigma 4.758e-08 1.007e-07 8.568e-08 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -501,426 +507,129 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> 91 parent 3.9 1.441 2.4590 #> 119 parent 0.6 1.092 -0.4919</div><div class='input'> <span class='co'># One parent compound, one metabolite, both single first order.</span> +<span class='co'># We remove zero values from FOCUS dataset D in order to avoid warnings</span> +<span class='va'>FOCUS_D</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>FOCUS_2006_D</span>, <span class='va'>value</span> <span class='op'>!=</span> <span class='fl'>0</span><span class='op'>)</span> <span class='co'># Use mkinsub for convenience in model formulation. Pathway to sink included per default.</span> -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> -<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)))</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> user system elapsed -#> 0.400 0.004 0.404 </div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 k_parent k_m1 f_parent_to_m1 sigma -#> 99.598481046 0.098697740 0.005260651 0.514475962 3.125503875 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff -#> parent_m1 parent_sink -#> 0.514476 0.485524 -#> -#> $distimes -#> DT50 DT90 -#> parent 7.022929 23.32966 -#> m1 131.760724 437.69965 -#> </div><div class='input'><span class='co'># \dontrun{</span> -<span class='co'># deSolve is slower when no C compiler (gcc) was available during model generation</span> -<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fit.deSolve</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)))</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='message'>Ordinary least squares optimisation</span></div><div class='output co'>#> Sum of squared residuals at call 1: 15156.12 -#> Sum of squared residuals at call 2: 15156.12 -#> Sum of squared residuals at call 6: 8243.645 -#> Sum of squared residuals at call 12: 6290.712 -#> Sum of squared residuals at call 13: 6290.683 -#> Sum of squared residuals at call 15: 6290.452 -#> Sum of squared residuals at call 18: 1700.749 -#> Sum of squared residuals at call 20: 1700.611 -#> Sum of squared residuals at call 24: 1190.923 -#> Sum of squared residuals at call 26: 1190.922 -#> Sum of squared residuals at call 29: 1017.417 -#> Sum of squared residuals at call 31: 1017.417 -#> Sum of squared residuals at call 33: 1017.416 -#> Sum of squared residuals at call 34: 644.0472 -#> Sum of squared residuals at call 36: 644.047 -#> Sum of squared residuals at call 38: 644.047 -#> Sum of squared residuals at call 39: 590.5025 -#> Sum of squared residuals at call 41: 590.5022 -#> Sum of squared residuals at call 43: 590.5016 -#> Sum of squared residuals at call 44: 543.2196 -#> Sum of squared residuals at call 45: 543.2193 -#> Sum of squared residuals at call 46: 543.2192 -#> Sum of squared residuals at call 50: 391.348 -#> Sum of squared residuals at call 51: 391.3479 -#> Sum of squared residuals at call 56: 386.479 -#> Sum of squared residuals at call 58: 386.479 -#> Sum of squared residuals at call 60: 386.4779 -#> Sum of squared residuals at call 61: 384.0686 -#> Sum of squared residuals at call 63: 384.0686 -#> Sum of squared residuals at call 66: 382.7813 -#> Sum of squared residuals at call 68: 382.7813 -#> Sum of squared residuals at call 70: 382.7813 -#> Sum of squared residuals at call 71: 378.9273 -#> Sum of squared residuals at call 73: 378.9273 -#> Sum of squared residuals at call 75: 378.9272 -#> Sum of squared residuals at call 76: 377.4847 -#> Sum of squared residuals at call 78: 377.4846 -#> Sum of squared residuals at call 81: 375.9738 -#> Sum of squared residuals at call 83: 375.9738 -#> Sum of squared residuals at call 86: 375.3387 -#> Sum of squared residuals at call 88: 375.3387 -#> Sum of squared residuals at call 91: 374.5774 -#> Sum of squared residuals at call 93: 374.5774 -#> Sum of squared residuals at call 95: 374.5774 -#> Sum of squared residuals at call 96: 373.5438 -#> Sum of squared residuals at call 100: 373.5438 -#> Sum of squared residuals at call 102: 373.265 -#> Sum of squared residuals at call 104: 373.265 -#> Sum of squared residuals at call 107: 372.6825 -#> Sum of squared residuals at call 111: 372.6825 -#> Sum of squared residuals at call 114: 372.6356 -#> Sum of squared residuals at call 116: 372.6356 -#> Sum of squared residuals at call 119: 372.6199 -#> Sum of squared residuals at call 121: 372.6199 -#> Sum of squared residuals at call 123: 372.6199 -#> Sum of squared residuals at call 124: 372.5881 -#> Sum of squared residuals at call 126: 372.5881 -#> Sum of squared residuals at call 129: 372.5418 -#> Sum of squared residuals at call 130: 372.4866 -#> Sum of squared residuals at call 131: 372.2242 -#> Sum of squared residuals at call 132: 371.5237 -#> Sum of squared residuals at call 134: 371.5237 -#> Sum of squared residuals at call 137: 371.292 -#> Sum of squared residuals at call 139: 371.292 -#> Sum of squared residuals at call 143: 371.2256 -#> Sum of squared residuals at call 144: 371.2256 -#> Sum of squared residuals at call 146: 371.2256 -#> Sum of squared residuals at call 149: 371.2194 -#> Sum of squared residuals at call 150: 371.2147 -#> Sum of squared residuals at call 153: 371.2147 -#> Sum of squared residuals at call 155: 371.2137 -#> Sum of squared residuals at call 156: 371.2137 -#> Sum of squared residuals at call 157: 371.2137 -#> Sum of squared residuals at call 160: 371.2134 -#> Sum of squared residuals at call 164: 371.2134 -#> Sum of squared residuals at call 165: 371.2134 -#> Sum of squared residuals at call 167: 371.2134 -#> Negative log-likelihood at call 177: 97.22429</div><div class='output co'>#> <span class='message'>Optimisation successfully terminated.</span></div><div class='output co'>#> user system elapsed -#> 0.360 0.000 0.361 </div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> parent_0 k_parent k_m1 f_parent_to_m1 sigma -#> 99.598480300 0.098697739 0.005260651 0.514475968 3.125503874 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> $ff +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='co'># Fit the model quietly to the FOCUS example dataset D using defaults</span> +<span class='va'>fit</span> <span class='op'><-</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'><span class='co'># Since mkin 0.9.50.3, we get a warning about non-normality of residuals,</span> +<span class='co'># so we try an alternative error model</span> +<span class='va'>fit.tc</span> <span class='op'><-</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span> +<span class='co'># This avoids the warning, and the likelihood ratio test confirms it is preferable</span> +<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span><span class='op'>(</span><span class='va'>fit.tc</span>, <span class='va'>fit</span><span class='op'>)</span> +</div><div class='output co'>#> Likelihood ratio test +#> +#> Model 1: SFO_SFO with error model tc and fixed parameter(s) m1_0 +#> Model 2: SFO_SFO with error model const and fixed parameter(s) m1_0 +#> #Df LogLik Df Chisq Pr(>Chisq) +#> 1 6 -64.983 +#> 2 5 -97.224 -1 64.483 9.737e-16 *** +#> --- +#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'><span class='co'># We can also allow for different variances of parent and metabolite as error model</span> +<span class='va'>fit.obs</span> <span class='op'><-</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"obs"</span><span class='op'>)</span> +<span class='co'># This also avoids the warning about non-normality, but the two-component error model</span> +<span class='co'># has significantly higher likelihood</span> +<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span><span class='op'>(</span><span class='va'>fit.obs</span>, <span class='va'>fit.tc</span><span class='op'>)</span> +</div><div class='output co'>#> Likelihood ratio test +#> +#> Model 1: SFO_SFO with error model tc and fixed parameter(s) m1_0 +#> Model 2: SFO_SFO with error model obs and fixed parameter(s) m1_0 +#> #Df LogLik Df Chisq Pr(>Chisq) +#> 1 6 -64.983 +#> 2 6 -96.936 0 63.907 < 2.2e-16 *** +#> --- +#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span><span class='op'>(</span><span class='va'>fit.tc</span><span class='op'>)</span> +</div><div class='output co'>#> parent_0 k_parent k_m1 f_parent_to_m1 sigma_low +#> 1.007343e+02 1.005562e-01 5.166712e-03 5.083933e-01 3.049891e-03 +#> rsd_high +#> 7.928117e-02 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>fit.tc</span><span class='op'>)</span> +</div><div class='output co'>#> $ff #> parent_m1 parent_sink -#> 0.514476 0.485524 +#> 0.5083933 0.4916067 #> #> $distimes -#> DT50 DT90 -#> parent 7.022929 23.32966 -#> m1 131.760721 437.69964 -#> </div><div class='input'><span class='co'># }</span> - -<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, FOMC</span> +#> DT50 DT90 +#> parent 6.89313 22.89848 +#> m1 134.15635 445.65776 +#> </div><div class='input'> +<span class='co'># We can show a quick (only one replication) benchmark for this case, as we</span> +<span class='co'># have several alternative solution methods for the model. We skip</span> +<span class='co'># uncompiled deSolve, as it is so slow. More benchmarks are found in the</span> +<span class='co'># benchmark vignette</span> <span class='co'># \dontrun{</span> -<span class='no'>FOMC_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> -<span class='no'>fit.FOMC_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>FOMC_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='co'># Use starting parameters from parent only FOMC fit</span> -<span class='no'>fit.FOMC</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>fit.FOMC_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>FOMC_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='no'>fit.FOMC</span>$<span class='no'>bparms.ode</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> -<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, SFORB</span> -<span class='no'>SFORB_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFORB"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> -<span class='no'>fit.SFORB_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='no'>fit.SFORB_SFO.deSolve</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, - <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='co'># Use starting parameters from parent only SFORB fit (not really needed in this case)</span> -<span class='no'>fit.SFORB</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='st'>"SFORB"</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>fit.SFORB_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='no'>fit.SFORB</span>$<span class='no'>bparms.ode</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Initial parameter(s) k_parent_free_sink not used in the model</span></div><div class='input'><span class='co'># }</span> - +<span class='kw'>if</span><span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='va'><a href='http://rbenchmark.googlecode.com'>rbenchmark</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> + <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span><span class='op'>(</span>replications <span class='op'>=</span> <span class='fl'>1</span>, order <span class='op'>=</span> <span class='st'>"relative"</span>, columns <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"test"</span>, <span class='st'>"relative"</span>, <span class='st'>"elapsed"</span><span class='op'>)</span>, + deSolve_compiled <span class='op'>=</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span>, + solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, use_compiled <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>, + eigen <span class='op'>=</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span>, + solution_type <span class='op'>=</span> <span class='st'>"eigen"</span><span class='op'>)</span>, + analytical <span class='op'>=</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span>, + solution_type <span class='op'>=</span> <span class='st'>"analytical"</span><span class='op'>)</span><span class='op'>)</span> +<span class='op'>}</span> +</div><div class='output co'>#> test relative elapsed +#> 3 analytical 1.000 0.752 +#> 1 deSolve_compiled 2.294 1.725 +#> 2 eigen 2.727 2.051</div><div class='input'><span class='co'># }</span> + +<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, FOMC-SFO</span> <span class='co'># \dontrun{</span> -<span class='co'># Weighted fits, including IRLS (error_model = "obs")</span> -<span class='no'>SFO_SFO.ff</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>f.noweight</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 -#> R version used for fitting: 4.0.0 -#> Date of fit: Wed May 27 07:03:50 2020 -#> Date of summary: Wed May 27 07:03:50 2020 -#> -#> Equations: -#> d_parent/dt = - k_parent * parent -#> d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1 -#> -#> Model predictions using solution type analytical -#> -#> Fitted using 421 model solutions performed in 0.129 s -#> -#> Error model: Constant variance -#> -#> Error model algorithm: OLS -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent 0.1000 deparm -#> k_m1 0.1001 deparm -#> f_parent_to_m1 0.5000 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 100.750000 -Inf Inf -#> log_k_parent -2.302585 -Inf Inf -#> log_k_m1 -2.301586 -Inf Inf -#> f_parent_ilr_1 0.000000 -Inf Inf -#> -#> Fixed parameter values: -#> value type -#> m1_0 0 state -#> -#> Results: -#> -#> AIC BIC logLik -#> 204.4486 212.6365 -97.22429 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.60000 1.57000 96.40000 102.8000 -#> log_k_parent -2.31600 0.04087 -2.39900 -2.2330 -#> log_k_m1 -5.24800 0.13320 -5.51800 -4.9770 -#> f_parent_ilr_1 0.04096 0.06312 -0.08746 0.1694 -#> sigma 3.12600 0.35850 2.39600 3.8550 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma -#> parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -3.190e-07 -#> log_k_parent 5.174e-01 1.000e+00 -3.263e-01 -5.426e-01 3.168e-07 -#> log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.406e-07 -#> f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 -1.587e-10 -#> sigma -3.190e-07 3.168e-07 -1.406e-07 -1.587e-10 1.000e+00 -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.600000 63.430 2.298e-36 96.400000 1.028e+02 -#> k_parent 0.098700 24.470 4.955e-23 0.090820 1.073e-01 -#> k_m1 0.005261 7.510 6.165e-09 0.004012 6.898e-03 -#> f_parent_to_m1 0.514500 23.070 3.104e-22 0.469100 5.596e-01 -#> sigma 3.126000 8.718 2.235e-10 2.396000 3.855e+00 -#> -#> FOCUS Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.398 4 15 -#> parent 6.459 2 7 -#> m1 4.690 2 8 -#> -#> Resulting formation fractions: -#> ff -#> parent_m1 0.5145 -#> parent_sink 0.4855 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 7.023 23.33 -#> m1 131.761 437.70 -#> -#> Data: -#> time variable observed predicted residual -#> 0 parent 99.46 99.59848 -1.385e-01 -#> 0 parent 102.04 99.59848 2.442e+00 -#> 1 parent 93.50 90.23787 3.262e+00 -#> 1 parent 92.50 90.23787 2.262e+00 -#> 3 parent 63.23 74.07319 -1.084e+01 -#> 3 parent 68.99 74.07319 -5.083e+00 -#> 7 parent 52.32 49.91206 2.408e+00 -#> 7 parent 55.13 49.91206 5.218e+00 -#> 14 parent 27.27 25.01257 2.257e+00 -#> 14 parent 26.64 25.01257 1.627e+00 -#> 21 parent 11.50 12.53462 -1.035e+00 -#> 21 parent 11.64 12.53462 -8.946e-01 -#> 35 parent 2.85 3.14787 -2.979e-01 -#> 35 parent 2.91 3.14787 -2.379e-01 -#> 50 parent 0.69 0.71624 -2.624e-02 -#> 50 parent 0.63 0.71624 -8.624e-02 -#> 75 parent 0.05 0.06074 -1.074e-02 -#> 75 parent 0.06 0.06074 -7.381e-04 -#> 1 m1 4.84 4.80296 3.704e-02 -#> 1 m1 5.64 4.80296 8.370e-01 -#> 3 m1 12.91 13.02400 -1.140e-01 -#> 3 m1 12.96 13.02400 -6.400e-02 -#> 7 m1 22.97 25.04476 -2.075e+00 -#> 7 m1 24.47 25.04476 -5.748e-01 -#> 14 m1 41.69 36.69002 5.000e+00 -#> 14 m1 33.21 36.69002 -3.480e+00 -#> 21 m1 44.37 41.65310 2.717e+00 -#> 21 m1 46.44 41.65310 4.787e+00 -#> 35 m1 41.22 43.31312 -2.093e+00 -#> 35 m1 37.95 43.31312 -5.363e+00 -#> 50 m1 41.19 41.21831 -2.831e-02 -#> 50 m1 40.01 41.21831 -1.208e+00 -#> 75 m1 40.09 36.44703 3.643e+00 -#> 75 m1 33.85 36.44703 -2.597e+00 -#> 100 m1 31.04 31.98163 -9.416e-01 -#> 100 m1 33.13 31.98163 1.148e+00 -#> 120 m1 25.15 28.78984 -3.640e+00 -#> 120 m1 33.31 28.78984 4.520e+00</div><div class='input'><span class='no'>f.obs</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.obs</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 -#> R version used for fitting: 4.0.0 -#> Date of fit: Wed May 27 07:03:50 2020 -#> Date of summary: Wed May 27 07:03:50 2020 -#> -#> Equations: -#> d_parent/dt = - k_parent * parent -#> d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1 -#> -#> Model predictions using solution type analytical -#> -#> Fitted using 978 model solutions performed in 0.407 s -#> -#> Error model: Variance unique to each observed variable -#> -#> Error model algorithm: d_3 -#> Direct fitting and three-step fitting yield approximately the same likelihood -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent 0.1000 deparm -#> k_m1 0.1001 deparm -#> f_parent_to_m1 0.5000 deparm -#> sigma_parent 3.0000 error -#> sigma_m1 3.0000 error -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 100.750000 -Inf Inf -#> log_k_parent -2.302585 -Inf Inf -#> log_k_m1 -2.301586 -Inf Inf -#> f_parent_ilr_1 0.000000 -Inf Inf -#> sigma_parent 3.000000 0 Inf -#> sigma_m1 3.000000 0 Inf -#> -#> Fixed parameter values: -#> value type -#> m1_0 0 state -#> -#> Results: -#> -#> AIC BIC logLik -#> 205.8727 215.6982 -96.93634 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.65000 1.70200 96.19000 103.1000 -#> log_k_parent -2.31300 0.04376 -2.40200 -2.2240 -#> log_k_m1 -5.25000 0.12430 -5.50400 -4.9970 -#> f_parent_ilr_1 0.03861 0.06171 -0.08708 0.1643 -#> sigma_parent 3.40100 0.56820 2.24400 4.5590 -#> sigma_m1 2.85500 0.45240 1.93400 3.7770 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma_parent -#> parent_0 1.00000 0.51078 -0.19133 -0.59997 0.035670 -#> log_k_parent 0.51078 1.00000 -0.37458 -0.59239 0.069833 -#> log_k_m1 -0.19133 -0.37458 1.00000 0.74398 -0.026158 -#> f_parent_ilr_1 -0.59997 -0.59239 0.74398 1.00000 -0.041369 -#> sigma_parent 0.03567 0.06983 -0.02616 -0.04137 1.000000 -#> sigma_m1 -0.03385 -0.06627 0.02482 0.03926 -0.004628 -#> sigma_m1 -#> parent_0 -0.033847 -#> log_k_parent -0.066265 -#> log_k_m1 0.024823 -#> f_parent_ilr_1 0.039256 -#> sigma_parent -0.004628 -#> sigma_m1 1.000000 -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.650000 58.560 2.004e-34 96.190000 1.031e+02 -#> k_parent 0.098970 22.850 1.099e-21 0.090530 1.082e-01 -#> k_m1 0.005245 8.046 1.732e-09 0.004072 6.756e-03 -#> f_parent_to_m1 0.513600 23.560 4.352e-22 0.469300 5.578e-01 -#> sigma_parent 3.401000 5.985 5.662e-07 2.244000 4.559e+00 -#> sigma_m1 2.855000 6.311 2.215e-07 1.934000 3.777e+00 -#> -#> FOCUS Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.398 4 15 -#> parent 6.464 2 7 -#> m1 4.682 2 8 -#> -#> Resulting formation fractions: -#> ff -#> parent_m1 0.5136 -#> parent_sink 0.4864 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 7.003 23.26 -#> m1 132.154 439.01 -#> -#> Data: -#> time variable observed predicted residual -#> 0 parent 99.46 99.65417 -1.942e-01 -#> 0 parent 102.04 99.65417 2.386e+00 -#> 1 parent 93.50 90.26332 3.237e+00 -#> 1 parent 92.50 90.26332 2.237e+00 -#> 3 parent 63.23 74.05306 -1.082e+01 -#> 3 parent 68.99 74.05306 -5.063e+00 -#> 7 parent 52.32 49.84325 2.477e+00 -#> 7 parent 55.13 49.84325 5.287e+00 -#> 14 parent 27.27 24.92971 2.340e+00 -#> 14 parent 26.64 24.92971 1.710e+00 -#> 21 parent 11.50 12.46890 -9.689e-01 -#> 21 parent 11.64 12.46890 -8.289e-01 -#> 35 parent 2.85 3.11925 -2.692e-01 -#> 35 parent 2.91 3.11925 -2.092e-01 -#> 50 parent 0.69 0.70679 -1.679e-02 -#> 50 parent 0.63 0.70679 -7.679e-02 -#> 75 parent 0.05 0.05952 -9.523e-03 -#> 75 parent 0.06 0.05952 4.772e-04 -#> 1 m1 4.84 4.81075 2.925e-02 -#> 1 m1 5.64 4.81075 8.292e-01 -#> 3 m1 12.91 13.04196 -1.320e-01 -#> 3 m1 12.96 13.04196 -8.196e-02 -#> 7 m1 22.97 25.06847 -2.098e+00 -#> 7 m1 24.47 25.06847 -5.985e-01 -#> 14 m1 41.69 36.70308 4.987e+00 -#> 14 m1 33.21 36.70308 -3.493e+00 -#> 21 m1 44.37 41.65115 2.719e+00 -#> 21 m1 46.44 41.65115 4.789e+00 -#> 35 m1 41.22 43.29465 -2.075e+00 -#> 35 m1 37.95 43.29465 -5.345e+00 -#> 50 m1 41.19 41.19948 -9.479e-03 -#> 50 m1 40.01 41.19948 -1.189e+00 -#> 75 m1 40.09 36.44035 3.650e+00 -#> 75 m1 33.85 36.44035 -2.590e+00 -#> 100 m1 31.04 31.98773 -9.477e-01 -#> 100 m1 33.13 31.98773 1.142e+00 -#> 120 m1 25.15 28.80429 -3.654e+00 -#> 120 m1 33.31 28.80429 4.506e+00</div><div class='input'><span class='no'>f.tc</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.tc</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 -#> R version used for fitting: 4.0.0 -#> Date of fit: Wed May 27 07:03:51 2020 -#> Date of summary: Wed May 27 07:03:51 2020 +<span class='va'>FOMC_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='va'>fit.FOMC_SFO</span> <span class='op'><-</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>FOMC_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0499</span></div><div class='input'><span class='co'># Again, we get a warning and try a more sophisticated error model</span> +<span class='va'>fit.FOMC_SFO.tc</span> <span class='op'><-</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>FOMC_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span> +<span class='co'># This model has a higher likelihood, but not significantly so</span> +<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span><span class='op'>(</span><span class='va'>fit.tc</span>, <span class='va'>fit.FOMC_SFO.tc</span><span class='op'>)</span> +</div><div class='output co'>#> Likelihood ratio test +#> +#> Model 1: FOMC_SFO with error model tc and fixed parameter(s) m1_0 +#> Model 2: SFO_SFO with error model tc and fixed parameter(s) m1_0 +#> #Df LogLik Df Chisq Pr(>Chisq) +#> 1 7 -64.829 +#> 2 6 -64.983 -1 0.3075 0.5792</div><div class='input'><span class='co'># Also, the missing standard error for log_beta and the t-tests for alpha</span> +<span class='co'># and beta indicate overparameterisation</span> +<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>fit.FOMC_SFO.tc</span>, data <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: NaNs produced</span></div><div class='output co'>#> <span class='warning'>Warning: NaNs produced</span></div><div class='output co'>#> <span class='warning'>Warning: diag(.) had 0 or NA entries; non-finite result is doubtful</span></div><div class='output co'>#> mkin version used for fitting: 0.9.50.3 +#> R version used for fitting: 4.0.3 +#> Date of fit: Thu Oct 15 12:40:24 2020 +#> Date of summary: Thu Oct 15 12:40:24 2020 #> #> Equations: -#> d_parent/dt = - k_parent * parent -#> d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1 +#> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent +#> d_m1/dt = + f_parent_to_m1 * (alpha/beta) * 1/((time/beta) + 1) * +#> parent - k_m1 * m1 #> -#> Model predictions using solution type analytical +#> Model predictions using solution type deSolve #> -#> Fitted using 2088 model solutions performed in 0.722 s +#> Fitted using 3611 model solutions performed in 2.669 s #> #> Error model: Two-component variance function #> #> Error model algorithm: d_3 -#> Direct fitting and three-step fitting yield approximately the same likelihood +#> Three-step fitting yielded a higher likelihood than direct fitting #> #> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent 0.1000 deparm -#> k_m1 0.1001 deparm -#> f_parent_to_m1 0.5000 deparm -#> sigma_low 0.1000 error -#> rsd_high 0.1000 error +#> value type +#> parent_0 100.75 state +#> alpha 1.00 deparm +#> beta 10.00 deparm +#> k_m1 0.10 deparm +#> f_parent_to_m1 0.50 deparm +#> sigma_low 0.10 error +#> rsd_high 0.10 error #> #> Starting values for the transformed parameters actually optimised: #> value lower upper #> parent_0 100.750000 -Inf Inf -#> log_k_parent -2.302585 -Inf Inf -#> log_k_m1 -2.301586 -Inf Inf +#> log_k_m1 -2.302585 -Inf Inf #> f_parent_ilr_1 0.000000 -Inf Inf +#> log_alpha 0.000000 -Inf Inf +#> log_beta 2.302585 -Inf Inf #> sigma_low 0.100000 0 Inf #> rsd_high 0.100000 0 Inf #> @@ -930,97 +639,70 @@ Degradation Data. <em>Environments</em> 6(12) 124 #> #> Results: #> -#> AIC BIC logLik -#> 141.9656 151.7911 -64.98278 +#> AIC BIC logLik +#> 143.658 155.1211 -64.82902 #> #> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 100.70000 2.621000 95.400000 106.10000 -#> log_k_parent -2.29700 0.008862 -2.315000 -2.27900 -#> log_k_m1 -5.26600 0.091310 -5.452000 -5.08000 -#> f_parent_ilr_1 0.02374 0.055300 -0.088900 0.13640 -#> sigma_low 0.00305 0.004829 -0.006786 0.01289 -#> rsd_high 0.07928 0.009418 0.060100 0.09847 +#> Estimate Std. Error Lower Upper +#> parent_0 101.600000 2.6390000 96.240000 107.000000 +#> log_k_m1 -5.284000 0.0928900 -5.473000 -5.095000 +#> f_parent_ilr_1 0.001008 0.0541900 -0.109500 0.111500 +#> log_alpha 5.522000 0.0077300 5.506000 5.538000 +#> log_beta 7.806000 NaN NaN NaN +#> sigma_low 0.002488 0.0002431 0.001992 0.002984 +#> rsd_high 0.079210 0.0093280 0.060180 0.098230 #> #> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma_low rsd_high -#> parent_0 1.00000 0.67644 -0.10215 -0.76822 0.14294 -0.08783 -#> log_k_parent 0.67644 1.00000 -0.15102 -0.59491 0.34611 -0.08125 -#> log_k_m1 -0.10215 -0.15102 1.00000 0.51808 -0.05236 0.01240 -#> f_parent_ilr_1 -0.76822 -0.59491 0.51808 1.00000 -0.13900 0.03248 -#> sigma_low 0.14294 0.34611 -0.05236 -0.13900 1.00000 -0.16546 -#> rsd_high -0.08783 -0.08125 0.01240 0.03248 -0.16546 1.00000 +#> parent_0 log_k_m1 f_parent_ilr_1 log_alpha log_beta sigma_low +#> parent_0 1.000000 -0.094697 -0.76654 0.70525 NaN 0.016099 +#> log_k_m1 -0.094697 1.000000 0.51404 -0.14347 NaN 0.001576 +#> f_parent_ilr_1 -0.766543 0.514038 1.00000 -0.61368 NaN 0.015465 +#> log_alpha 0.705247 -0.143468 -0.61368 1.00000 NaN 5.871780 +#> log_beta NaN NaN NaN NaN 1 NaN +#> sigma_low 0.016099 0.001576 0.01546 5.87178 NaN 1.000000 +#> rsd_high 0.006566 -0.011662 -0.05353 0.04845 NaN -0.652554 +#> rsd_high +#> parent_0 0.006566 +#> log_k_m1 -0.011662 +#> f_parent_ilr_1 -0.053525 +#> log_alpha 0.048451 +#> log_beta NaN +#> sigma_low -0.652554 +#> rsd_high 1.000000 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. #> t-test (unrealistically) based on the assumption of normal distribution #> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 1.007e+02 38.4300 1.180e-28 95.400000 1.061e+02 -#> k_parent 1.006e-01 112.8000 1.718e-43 0.098760 1.024e-01 -#> k_m1 5.167e-03 10.9500 1.171e-12 0.004290 6.223e-03 -#> f_parent_to_m1 5.084e-01 26.0100 2.146e-23 0.468600 5.481e-01 -#> sigma_low 3.050e-03 0.6314 2.661e-01 -0.006786 1.289e-02 -#> rsd_high 7.928e-02 8.4170 6.418e-10 0.060100 9.847e-02 +#> Estimate t value Pr(>t) Lower Upper +#> parent_0 1.016e+02 32.7800 6.312e-26 9.624e+01 1.070e+02 +#> k_m1 5.072e-03 10.1200 1.216e-11 4.197e-03 6.130e-03 +#> f_parent_to_m1 5.004e-01 20.8300 4.318e-20 4.614e-01 5.394e-01 +#> alpha 2.502e+02 0.5624 2.889e-01 2.463e+02 2.542e+02 +#> beta 2.455e+03 0.5549 2.915e-01 NA NA +#> sigma_low 2.488e-03 0.4843 3.158e-01 1.992e-03 2.984e-03 +#> rsd_high 7.921e-02 8.4300 8.001e-10 6.018e-02 9.823e-02 #> #> FOCUS Chi2 error levels in percent: #> err.min n.optim df -#> All data 6.475 4 15 -#> parent 6.573 2 7 -#> m1 4.671 2 8 +#> All data 6.781 5 14 +#> parent 7.141 3 6 +#> m1 4.640 2 8 #> #> Resulting formation fractions: #> ff -#> parent_m1 0.5084 -#> parent_sink 0.4916 +#> parent_m1 0.5004 +#> parent_sink 0.4996 #> #> Estimated disappearance times: -#> DT50 DT90 -#> parent 6.893 22.9 -#> m1 134.156 445.7 -#> -#> Data: -#> time variable observed predicted residual -#> 0 parent 99.46 100.73434 -1.274340 -#> 0 parent 102.04 100.73434 1.305660 -#> 1 parent 93.50 91.09751 2.402486 -#> 1 parent 92.50 91.09751 1.402486 -#> 3 parent 63.23 74.50141 -11.271410 -#> 3 parent 68.99 74.50141 -5.511410 -#> 7 parent 52.32 49.82880 2.491200 -#> 7 parent 55.13 49.82880 5.301200 -#> 14 parent 27.27 24.64809 2.621908 -#> 14 parent 26.64 24.64809 1.991908 -#> 21 parent 11.50 12.19232 -0.692315 -#> 21 parent 11.64 12.19232 -0.552315 -#> 35 parent 2.85 2.98327 -0.133266 -#> 35 parent 2.91 2.98327 -0.073266 -#> 50 parent 0.69 0.66013 0.029874 -#> 50 parent 0.63 0.66013 -0.030126 -#> 75 parent 0.05 0.05344 -0.003438 -#> 75 parent 0.06 0.05344 0.006562 -#> 1 m1 4.84 4.88645 -0.046451 -#> 1 m1 5.64 4.88645 0.753549 -#> 3 m1 12.91 13.22867 -0.318669 -#> 3 m1 12.96 13.22867 -0.268669 -#> 7 m1 22.97 25.36417 -2.394166 -#> 7 m1 24.47 25.36417 -0.894166 -#> 14 m1 41.69 37.00974 4.680263 -#> 14 m1 33.21 37.00974 -3.799737 -#> 21 m1 44.37 41.90133 2.468669 -#> 21 m1 46.44 41.90133 4.538669 -#> 35 m1 41.22 43.45691 -2.236913 -#> 35 m1 37.95 43.45691 -5.506913 -#> 50 m1 41.19 41.34199 -0.151985 -#> 50 m1 40.01 41.34199 -1.331985 -#> 75 m1 40.09 36.61471 3.475295 -#> 75 m1 33.85 36.61471 -2.764705 -#> 100 m1 31.04 32.20082 -1.160823 -#> 100 m1 33.13 32.20082 0.929177 -#> 120 m1 25.15 29.04130 -3.891304 -#> 120 m1 33.31 29.04130 4.268696</div><div class='input'># } - - +#> DT50 DT90 DT50back +#> parent 6.812 22.7 6.834 +#> m1 136.661 454.0 NA</div><div class='input'> +<span class='co'># We can easily use starting parameters from the parent only fit (only for illustration)</span> +<span class='va'>fit.FOMC</span> <span class='op'>=</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='va'>FOCUS_2006_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span> +<span class='va'>fit.FOMC_SFO</span> <span class='op'><-</span> <span class='fu'>mkinfit</span><span class='op'>(</span><span class='va'>FOMC_SFO</span>, <span class='va'>FOCUS_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, + parms.ini <span class='op'>=</span> <span class='va'>fit.FOMC</span><span class='op'>$</span><span class='va'>bparms.ode</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span> +<span class='co'># }</span> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -1037,7 +719,7 @@ Degradation Data. <em>Environments</em> 6(12) 124 </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index 40cc2ef4..7d6bc77b 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -40,10 +40,9 @@ <meta property="og:title" content="Function to set up a kinetic model with one or more state variables — mkinmod" /> -<meta property="og:description" content="The function usually takes several expressions, each assigning a compound -name to a list, specifying the kinetic model type and reaction or transfer -to other observed compartments. Instead of specifying several expressions, a -list of lists can be given in the speclist argument." /> +<meta property="og:description" content="This function is usually called using a call to mkinsub() for each observed +variable, specifying the corresponding submodel as well as outgoing pathways +(see examples)." /> @@ -75,7 +74,7 @@ list of lists can be given in the speclist argument." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -112,6 +111,9 @@ list of lists can be given in the speclist argument." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -120,7 +122,7 @@ list of lists can be given in the speclist argument." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -139,43 +141,42 @@ list of lists can be given in the speclist argument." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Function to set up a kinetic model with one or more state variables</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinmod.R'><code>R/mkinmod.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinmod.R'><code>R/mkinmod.R</code></a></small> <div class="hidden name"><code>mkinmod.Rd</code></div> </div> <div class="ref-description"> - <p>The function usually takes several expressions, each assigning a compound -name to a list, specifying the kinetic model type and reaction or transfer -to other observed compartments. Instead of specifying several expressions, a -list of lists can be given in the speclist argument.</p> + <p>This function is usually called using a call to <code><a href='mkinsub.html'>mkinsub()</a></code> for each observed +variable, specifying the corresponding submodel as well as outgoing pathways +(see examples).</p> </div> - <pre class="usage"><span class='fu'>mkinmod</span>( - <span class='no'>...</span>, - <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, - <span class='kw'>speclist</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, - <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> -)</pre> + <pre class="usage"><span class='fu'>mkinmod</span><span class='op'>(</span> + <span class='va'>...</span>, + use_of_ff <span class='op'>=</span> <span class='st'>"max"</span>, + speclist <span class='op'>=</span> <span class='cn'>NULL</span>, + quiet <span class='op'>=</span> <span class='cn'>FALSE</span>, + verbose <span class='op'>=</span> <span class='cn'>FALSE</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> <colgroup><col class="name" /><col class="desc" /></colgroup> <tr> <th>...</th> - <td><p>For each observed variable, a list has to be specified as an -argument, containing at least a component <code>type</code>, specifying the type -of kinetics to use for the variable. Currently, single first order -kinetics "SFO", indeterminate order rate equation kinetics "IORE", or -single first order with reversible binding "SFORB" are implemented for all -variables, while "FOMC", "DFOP" and "HS" can additionally be chosen for -the first variable which is assumed to be the source compartment. -Additionally, each component of the list can include a character vector -<code>to</code>, specifying names of variables to which a transfer is to be -assumed in the model. If the argument <code>use_of_ff</code> is set to "min" + <td><p>For each observed variable, a list as obtained by <code><a href='mkinsub.html'>mkinsub()</a></code> +has to be specified as an argument (see examples). Currently, single +first order kinetics "SFO", indeterminate order rate equation kinetics +"IORE", or single first order with reversible binding "SFORB" are +implemented for all variables, while "FOMC", "DFOP", "HS" and "logistic" +can additionally be chosen for the first variable which is assumed to be +the source compartment. +Additionally, <code><a href='mkinsub.html'>mkinsub()</a></code> has an argument <code>to</code>, specifying names of +variables to which a transfer is to be assumed in the model. +If the argument <code>use_of_ff</code> is set to "min" (default) and the model for the compartment is "SFO" or "SFORB", an -additional component of the list can be "sink=FALSE" effectively fixing -the flux to sink to zero.</p></td> +additional <code><a href='mkinsub.html'>mkinsub()</a></code> argument can be <code>sink = FALSE</code>, effectively +fixing the flux to sink to zero.</p></td> </tr> <tr> <th>use_of_ff</th> @@ -197,14 +198,14 @@ argument. Default is NULL.</p></td> </tr> <tr> <th>verbose</th> - <td><p>If <code>TRUE</code>, passed to <code>cfunction</code> if + <td><p>If <code>TRUE</code>, passed to <code><a href='https://rdrr.io/pkg/inline/man/cfunction.html'>inline::cfunction()</a></code> if applicable to give detailed information about the C function being built.</p></td> </tr> </table> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - <p>A list of class <code>mkinmod</code> for use with <code><a href='mkinfit.html'>mkinfit</a></code>, + <p>A list of class <code>mkinmod</code> for use with <code><a href='mkinfit.html'>mkinfit()</a></code>, containing, among others,</p> <dt>diffs</dt><dd><p>A vector of string representations of differential equations, one for each modelling variable.</p></dd> @@ -222,11 +223,18 @@ returned by cfunction.</p></dd> <p>For the definition of model types and their parameters, the equations given in the FOCUS and NAFTA guidance documents are used.</p> +<p>For kinetic models with more than one observed variable, a symbolic solution +of the system of differential equations is included in the resulting +mkinmod object in some cases, speeding up the solution.</p> +<p>If a C compiler is found by <code><a href='https://rdrr.io/pkg/pkgbuild/man/has_compiler.html'>pkgbuild::has_compiler()</a></code> and there +is more than one observed variable in the specification, C code is generated +for evaluating the differential equations, compiled using +<code><a href='https://rdrr.io/pkg/inline/man/cfunction.html'>inline::cfunction()</a></code> and added to the resulting mkinmod object.</p> <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2> <p>The IORE submodel is not well tested for metabolites. When using this -model for metabolites, you may want to read the second note in the help -page to <code><a href='mkinfit.html'>mkinfit</a></code>.</p> +model for metabolites, you may want to read the note in the help +page to <a href='mkinfit.html'>mkinfit</a>.</p> <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> <p>FOCUS (2006) “Guidance Document on Estimating Persistence @@ -236,27 +244,31 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, <a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> <p>NAFTA Technical Working Group on Pesticides (not dated) Guidance for Evaluating and Calculating Degradation Kinetics in Environmental Media</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># Specify the SFO model (this is not needed any more, as we can now mkinfit("SFO", ...)</span> -<span class='no'>SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)) +<span class='va'>SFO</span> <span class='op'><-</span> <span class='fu'>mkinmod</span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> <span class='co'># One parent compound, one metabolite, both single first order</span> -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'>mkinmod</span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># \dontrun{</span> <span class='co'># The above model used to be specified like this, before the advent of mkinsub()</span> -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'>mkinmod</span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># Show details of creating the C function</span> -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file5d7f45129ff2.c 2> file5d7f45129ff2.c.err.txt -#> Program source: +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'>mkinmod</span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, verbose <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> Program source: #> 1: #include <R.h> #> 2: #> 3: @@ -276,17 +288,39 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media</p> #> 17: f[0] = - k_parent * y[0]; #> 18: f[1] = + f_parent_to_m1 * k_parent * y[0] - k_m1 * y[1]; #> 19: }</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='co'># The symbolic solution which is available in this case is not</span> +<span class='co'># made for human reading but for speed of computation</span> +<span class='va'>SFO_SFO</span><span class='op'>$</span><span class='va'>deg_func</span> +</div><div class='output co'>#> function (observed, odeini, odeparms) +#> { +#> predicted <- numeric(0) +#> with(as.list(odeparms), { +#> t <- observed[observed$name == "parent", "time"] +#> predicted <<- c(predicted, SFO.solution(t, odeini["parent"], +#> k_parent)) +#> t <- observed[observed$name == "m1", "time"] +#> predicted <<- c(predicted, (((k_m1 - k_parent) * odeini["m1"] - +#> f_parent_to_m1 * k_parent * odeini["parent"]) * exp(-k_m1 * +#> t) + f_parent_to_m1 * k_parent * odeini["parent"] * +#> exp(-k_parent * t))/(k_m1 - k_parent)) +#> }) +#> return(predicted) +#> } +#> <environment: 0x55555b726d88></div><div class='input'> <span class='co'># If we have several parallel metabolites</span> <span class='co'># (compare tests/testthat/test_synthetic_data_for_UBA_2014.R)</span> -<span class='no'>m_synth_DFOP_par</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)), - <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), - <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - -<span class='no'>fit_DFOP_par_c</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_DFOP_par</span>, - <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span>, - <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='co'># }</span></div></pre> +<span class='va'>m_synth_DFOP_par</span> <span class='op'><-</span> <span class='fu'>mkinmod</span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"DFOP"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"M1"</span>, <span class='st'>"M2"</span><span class='op'>)</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, + M2 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, + use_of_ff <span class='op'>=</span> <span class='st'>"max"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + +<span class='va'>fit_DFOP_par_c</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>m_synth_DFOP_par</span>, + <span class='va'>synthetic_data_for_UBA_2014</span><span class='op'>[[</span><span class='fl'>12</span><span class='op'>]</span><span class='op'>]</span><span class='op'>$</span><span class='va'>data</span>, + quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.000174</span></div><div class='input'><span class='co'># }</span> + +</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <nav id="toc" data-toggle="toc" class="sticky-top"> @@ -302,7 +336,7 @@ Evaluating and Calculating Degradation Kinetics in Environmental Media</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mkinparplot-1.png b/docs/reference/mkinparplot-1.png Binary files differindex 31800c09..a78bf313 100644 --- a/docs/reference/mkinparplot-1.png +++ b/docs/reference/mkinparplot-1.png diff --git a/docs/reference/mkinparplot.html b/docs/reference/mkinparplot.html index 4ff4970e..3aa98dbf 100644 --- a/docs/reference/mkinparplot.html +++ b/docs/reference/mkinparplot.html @@ -73,7 +73,7 @@ mkinfit." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ mkinfit." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ mkinfit." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ mkinfit." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Function to plot the confidence intervals obtained using mkinfit</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinparplot.R'><code>R/mkinparplot.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinparplot.R'><code>R/mkinparplot.R</code></a></small> <div class="hidden name"><code>mkinparplot.Rd</code></div> </div> @@ -146,7 +149,7 @@ mkinfit." /> <code><a href='mkinfit.html'>mkinfit</a></code>.</p> </div> - <pre class="usage"><span class='fu'>mkinparplot</span>(<span class='no'>object</span>)</pre> + <pre class="usage"><span class='fu'>mkinparplot</span><span class='op'>(</span><span class='va'>object</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -161,14 +164,20 @@ mkinfit." /> <p>Nothing is returned by this function, as it is called for its side effect, namely to produce a plot.</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># \dontrun{</span> -<span class='no'>model</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>T245</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"phenol"</span>), <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>), - <span class='kw'>phenol</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"anisole"</span>)), - <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinparplot</span>(<span class='no'>fit</span>)</div><div class='img'><img src='mkinparplot-1.png' alt='' width='700' height='433' /></div><div class='input'># } +<span class='va'>model</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + T245 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"phenol"</span><span class='op'>)</span>, sink <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>, + phenol <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"anisole"</span><span class='op'>)</span><span class='op'>)</span>, + anisole <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>model</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>mccall81_245T</span>, <span class='va'>soil</span> <span class='op'>==</span> <span class='st'>"Commerce"</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinparplot</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='mkinparplot-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># }</span> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -185,7 +194,7 @@ effect, namely to produce a plot.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index e16de283..17f38938 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -74,7 +74,7 @@ kinetic parameters and initial values for the state variables." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -111,6 +111,9 @@ kinetic parameters and initial values for the state variables." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -119,7 +122,7 @@ kinetic parameters and initial values for the state variables." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -138,7 +141,7 @@ kinetic parameters and initial values for the state variables." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Produce predictions from a kinetic model using specific parameters</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinpredict.R'><code>R/mkinpredict.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinpredict.R'><code>R/mkinpredict.R</code></a></small> <div class="hidden name"><code>mkinpredict.Rd</code></div> </div> @@ -148,49 +151,49 @@ kinetic model as specified by <code><a href='mkinmod.html'>mkinmod</a></code>, u kinetic parameters and initial values for the state variables.</p> </div> - <pre class="usage"><span class='fu'>mkinpredict</span>( - <span class='no'>x</span>, - <span class='no'>odeparms</span>, - <span class='no'>odeini</span>, - <span class='kw'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, - <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>, - <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>, - <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>, - <span class='kw'>map_output</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='no'>...</span> -) + <pre class="usage"><span class='fu'>mkinpredict</span><span class='op'>(</span> + <span class='va'>x</span>, + <span class='va'>odeparms</span>, + <span class='va'>odeini</span>, + outtimes <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>120</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, + use_compiled <span class='op'>=</span> <span class='st'>"auto"</span>, + method.ode <span class='op'>=</span> <span class='st'>"lsoda"</span>, + atol <span class='op'>=</span> <span class='fl'>1e-08</span>, + rtol <span class='op'>=</span> <span class='fl'>1e-10</span>, + map_output <span class='op'>=</span> <span class='cn'>TRUE</span>, + <span class='va'>...</span> +<span class='op'>)</span> <span class='co'># S3 method for mkinmod</span> -<span class='fu'>mkinpredict</span>( - <span class='no'>x</span>, - <span class='kw'>odeparms</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='kw'>odeini</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>), - <span class='kw'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, - <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>, - <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>, - <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>, - <span class='kw'>map_output</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='no'>...</span> -) +<span class='fu'>mkinpredict</span><span class='op'>(</span> + <span class='va'>x</span>, + odeparms <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent_sink <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + odeini <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, + outtimes <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>120</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, + use_compiled <span class='op'>=</span> <span class='st'>"auto"</span>, + method.ode <span class='op'>=</span> <span class='st'>"lsoda"</span>, + atol <span class='op'>=</span> <span class='fl'>1e-08</span>, + rtol <span class='op'>=</span> <span class='fl'>1e-10</span>, + map_output <span class='op'>=</span> <span class='cn'>TRUE</span>, + <span class='va'>...</span> +<span class='op'>)</span> <span class='co'># S3 method for mkinfit</span> -<span class='fu'>mkinpredict</span>( - <span class='no'>x</span>, - <span class='kw'>odeparms</span> <span class='kw'>=</span> <span class='no'>x</span>$<span class='no'>bparms.ode</span>, - <span class='kw'>odeini</span> <span class='kw'>=</span> <span class='no'>x</span>$<span class='no'>bparms.state</span>, - <span class='kw'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, - <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>, - <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>, - <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>, - <span class='kw'>map_output</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='no'>...</span> -)</pre> +<span class='fu'>mkinpredict</span><span class='op'>(</span> + <span class='va'>x</span>, + odeparms <span class='op'>=</span> <span class='va'>x</span><span class='op'>$</span><span class='va'>bparms.ode</span>, + odeini <span class='op'>=</span> <span class='va'>x</span><span class='op'>$</span><span class='va'>bparms.state</span>, + outtimes <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>120</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, + use_compiled <span class='op'>=</span> <span class='st'>"auto"</span>, + method.ode <span class='op'>=</span> <span class='st'>"lsoda"</span>, + atol <span class='op'>=</span> <span class='fl'>1e-08</span>, + rtol <span class='op'>=</span> <span class='fl'>1e-10</span>, + map_output <span class='op'>=</span> <span class='cn'>TRUE</span>, + <span class='va'>...</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -264,13 +267,17 @@ solver is used.</p></td> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> <p>A matrix with the numeric solution in wide format</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> -<span class='no'>SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)) +<span class='va'>SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> <span class='co'># Compare solution types</span> -<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)</div><div class='output co'>#> time degradinol +<span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>, + solution_type <span class='op'>=</span> <span class='st'>"analytical"</span><span class='op'>)</span> +</div><div class='output co'>#> time degradinol #> 0 0 100.0000000 #> 1 1 74.0818221 #> 2 2 54.8811636 @@ -291,8 +298,9 @@ solver is used.</p></td> #> 17 17 0.6096747 #> 18 18 0.4516581 #> 19 19 0.3345965 -#> 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)</div><div class='output co'>#> time degradinol +#> 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>, + solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span><span class='op'>)</span> +</div><div class='output co'>#> time degradinol #> 0 0 100.0000000 #> 1 1 74.0818221 #> 2 2 54.8811636 @@ -313,8 +321,9 @@ solver is used.</p></td> #> 17 17 0.6096747 #> 18 18 0.4516581 #> 19 19 0.3345965 -#> 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> time degradinol +#> 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>, + solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, use_compiled <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> +</div><div class='output co'>#> time degradinol #> 0 0 100.0000000 #> 1 1 74.0818221 #> 2 2 54.8811636 @@ -335,8 +344,9 @@ solver is used.</p></td> #> 17 17 0.6096747 #> 18 18 0.4516581 #> 19 19 0.3345965 -#> 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)</div><div class='output co'>#> time degradinol +#> 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>, + solution_type <span class='op'>=</span> <span class='st'>"eigen"</span><span class='op'>)</span> +</div><div class='output co'>#> time degradinol #> 0 0 100.0000000 #> 1 1 74.0818221 #> 2 2 54.8811636 @@ -359,59 +369,68 @@ solver is used.</p></td> #> 19 19 0.3345965 #> 20 20 0.2478752</div><div class='input'> <span class='co'># Compare integration methods to analytical solution</span> -<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#> time degradinol -#> 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, - <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#> time degradinol -#> 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, - <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"ode45"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#> time degradinol -#> 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>, - <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"rk4"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#> time degradinol +<span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>, + solution_type <span class='op'>=</span> <span class='st'>"analytical"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>21</span>,<span class='op'>]</span> +</div><div class='output co'>#> time degradinol +#> 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>, + method <span class='op'>=</span> <span class='st'>"lsoda"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>21</span>,<span class='op'>]</span> +</div><div class='output co'>#> time degradinol +#> 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>, + method <span class='op'>=</span> <span class='st'>"ode45"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>21</span>,<span class='op'>]</span> +</div><div class='output co'>#> time degradinol +#> 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>, + method <span class='op'>=</span> <span class='st'>"rk4"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>21</span>,<span class='op'>]</span> +</div><div class='output co'>#> time degradinol #> 20.0000000 0.2480043 </div><div class='input'><span class='co'># rk4 is not as precise here</span> <span class='co'># The number of output times used to make a lot of difference until the</span> <span class='co'># default for atol was adjusted</span> -<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), - <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>))[<span class='fl'>201</span>,]</div><div class='output co'>#> time degradinol -#> 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), - <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.01</span>))[<span class='fl'>2001</span>,]</div><div class='output co'>#> time degradinol +<span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>20</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span> +</div><div class='output co'>#> time degradinol +#> 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>20</span>, by <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>2001</span>,<span class='op'>]</span> +</div><div class='output co'>#> time degradinol #> 20.0000000 0.2478752 </div><div class='input'> <span class='co'># Comparison of the performance of solution types</span> -<span class='no'>SFO_SFO</span> <span class='kw'>=</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='kw'>if</span>(<span class='fu'><a href='https://rdrr.io/r/base/library.html'>require</a></span>(<span class='no'>rbenchmark</span>)) { - <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span>(<span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>order</span> <span class='kw'>=</span> <span class='st'>"relative"</span>, <span class='kw'>columns</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"test"</span>, <span class='st'>"relative"</span>, <span class='st'>"elapsed"</span>), - <span class='kw'>eigen</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)[<span class='fl'>201</span>,], - <span class='kw'>deSolve_compiled</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)[<span class='fl'>201</span>,], - <span class='kw'>deSolve</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)[<span class='fl'>201</span>,], - <span class='kw'>analytical</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)[<span class='fl'>201</span>,]) -}</div><div class='output co'>#> test relative elapsed -#> 2 deSolve_compiled 1.00 0.004 -#> 4 analytical 1.00 0.004 -#> 1 eigen 4.75 0.019 -#> 3 deSolve 54.75 0.219</div><div class='input'> +<span class='va'>SFO_SFO</span> <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='kw'>if</span><span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='va'><a href='http://rbenchmark.googlecode.com'>rbenchmark</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span> + <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span><span class='op'>(</span>replications <span class='op'>=</span> <span class='fl'>10</span>, order <span class='op'>=</span> <span class='st'>"relative"</span>, columns <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"test"</span>, <span class='st'>"relative"</span>, <span class='st'>"elapsed"</span><span class='op'>)</span>, + eigen <span class='op'>=</span> <span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.15</span>, f_parent_to_m1 <span class='op'>=</span> <span class='fl'>0.5</span>, k_m1 <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, m1 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>20</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + solution_type <span class='op'>=</span> <span class='st'>"eigen"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span>, + deSolve_compiled <span class='op'>=</span> <span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.15</span>, f_parent_to_m1 <span class='op'>=</span> <span class='fl'>0.5</span>, k_m1 <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, m1 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>20</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span>, + deSolve <span class='op'>=</span> <span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.15</span>, f_parent_to_m1 <span class='op'>=</span> <span class='fl'>0.5</span>, k_m1 <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, m1 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>20</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>, use_compiled <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span>, + analytical <span class='op'>=</span> <span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO_SFO</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.15</span>, f_parent_to_m1 <span class='op'>=</span> <span class='fl'>0.5</span>, k_m1 <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, m1 <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>20</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + solution_type <span class='op'>=</span> <span class='st'>"analytical"</span>, use_compiled <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span><span class='op'>)</span> +<span class='op'>}</span> +</div><div class='output co'>#> test relative elapsed +#> 4 analytical 1.0 0.005 +#> 2 deSolve_compiled 1.2 0.006 +#> 1 eigen 4.0 0.020 +#> 3 deSolve 45.6 0.228</div><div class='input'> <span class='co'># \dontrun{</span> <span class='co'># Predict from a fitted model</span> - <span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>) - <span class='fu'><a href='https://rdrr.io/r/utils/head.html'>head</a></span>(<span class='fu'>mkinpredict</span>(<span class='no'>f</span>))</div><div class='output co'>#> time parent m1 + <span class='va'>f</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='va'>f</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span><span class='op'>)</span> + <span class='fu'><a href='https://rdrr.io/r/utils/head.html'>head</a></span><span class='op'>(</span><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>f</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> time parent m1 #> 0 0.0 82.49216 0.000000 #> 0.1 0.1 80.00562 1.236198 #> 0.2 0.2 77.59404 2.422818 #> 0.3 0.3 75.25514 3.561476 #> 0.4 0.4 72.98675 4.653740 -#> 0.5 0.5 70.78673 5.701130</div><div class='input'># } +#> 0.5 0.5 70.78673 5.701130</div><div class='input'><span class='co'># }</span> </div></pre> </div> @@ -429,7 +448,7 @@ solver is used.</p></td> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mkinresplot-1.png b/docs/reference/mkinresplot-1.png Binary files differindex bb9657b4..8114b6cd 100644 --- a/docs/reference/mkinresplot-1.png +++ b/docs/reference/mkinresplot-1.png diff --git a/docs/reference/mkinresplot.html b/docs/reference/mkinresplot.html index 82afe2e2..d917860a 100644 --- a/docs/reference/mkinresplot.html +++ b/docs/reference/mkinresplot.html @@ -75,7 +75,7 @@ argument show_residuals = TRUE." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -112,6 +112,9 @@ argument show_residuals = TRUE." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -120,7 +123,7 @@ argument show_residuals = TRUE." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -139,7 +142,7 @@ argument show_residuals = TRUE." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Function to plot residuals stored in an mkin object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinresplot.R'><code>R/mkinresplot.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinresplot.R'><code>R/mkinresplot.R</code></a></small> <div class="hidden name"><code>mkinresplot.Rd</code></div> </div> @@ -150,21 +153,21 @@ the residuals can be obtained using <code><a href='plot.mkinfit.html'>plot.mkinf argument <code>show_residuals = TRUE</code>.</p> </div> - <pre class="usage"><span class='fu'>mkinresplot</span>( - <span class='no'>object</span>, - <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>object</span>$<span class='no'>mkinmod</span>$<span class='no'>map</span>), - <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1.1</span> * <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span>(<span class='no'>object</span>$<span class='no'>data</span>$<span class='no'>time</span>)), - <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>, - <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='no'>standardized</span>, <span class='st'>"Standardized residual"</span>, <span class='st'>"Residual"</span>), - <span class='kw'>maxabs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='st'>"topright"</span>, - <span class='kw'>col_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>pch_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>frame</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='no'>...</span> -)</pre> + <pre class="usage"><span class='fu'>mkinresplot</span><span class='op'>(</span> + <span class='va'>object</span>, + obs_vars <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>object</span><span class='op'>$</span><span class='va'>mkinmod</span><span class='op'>$</span><span class='va'>map</span><span class='op'>)</span>, + xlim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>1.1</span> <span class='op'>*</span> <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span><span class='op'>(</span><span class='va'>object</span><span class='op'>$</span><span class='va'>data</span><span class='op'>$</span><span class='va'>time</span><span class='op'>)</span><span class='op'>)</span>, + standardized <span class='op'>=</span> <span class='cn'>FALSE</span>, + xlab <span class='op'>=</span> <span class='st'>"Time"</span>, + ylab <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span><span class='op'>(</span><span class='va'>standardized</span>, <span class='st'>"Standardized residual"</span>, <span class='st'>"Residual"</span><span class='op'>)</span>, + maxabs <span class='op'>=</span> <span class='st'>"auto"</span>, + legend <span class='op'>=</span> <span class='cn'>TRUE</span>, + lpos <span class='op'>=</span> <span class='st'>"topright"</span>, + col_obs <span class='op'>=</span> <span class='st'>"auto"</span>, + pch_obs <span class='op'>=</span> <span class='st'>"auto"</span>, + frame <span class='op'>=</span> <span class='cn'>TRUE</span>, + <span class='va'>...</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -224,7 +227,7 @@ be passed on to <code><a href='https://rdrr.io/r/graphics/legend.html'>legend</a </tr> <tr> <th>...</th> - <td><p>further arguments passed to <code><a href='https://rdrr.io/r/base/plot.html'>plot</a></code>.</p></td> + <td><p>further arguments passed to <code><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></code>.</p></td> </tr> </table> @@ -237,10 +240,16 @@ effect, namely to produce a plot.</p> <div class='dont-index'><p><code><a href='mkinplot.html'>mkinplot</a></code>, for a way to plot the data and the fitted lines of the mkinfit object, and <code><a href='plot.mkinfit.html'>plot_res</a></code> for a function combining the plot of the fit and the residual plot.</p></div> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> -<span class='no'>model</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinresplot</span>(<span class='no'>fit</span>, <span class='st'>"m1"</span>)</div><div class='img'><img src='mkinresplot-1.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='va'>model</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>model</span>, <span class='va'>FOCUS_2006_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'><span class='fu'>mkinresplot</span><span class='op'>(</span><span class='va'>fit</span>, <span class='st'>"m1"</span><span class='op'>)</span> +</div><div class='img'><img src='mkinresplot-1.png' alt='' width='700' height='433' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -257,7 +266,7 @@ combining the plot of the fit and the residual plot.</p></div> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mkinsub.html b/docs/reference/mkinsub.html index ac1220e0..77ee41f8 100644 --- a/docs/reference/mkinsub.html +++ b/docs/reference/mkinsub.html @@ -73,7 +73,7 @@ mkinmod." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ mkinmod." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ mkinmod." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ mkinmod." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Function to set up a kinetic submodel for one state variable</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinsub.R'><code>R/mkinsub.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinsub.R'><code>R/mkinsub.R</code></a></small> <div class="hidden name"><code>mkinsub.Rd</code></div> </div> @@ -146,7 +149,7 @@ mkinmod." /> <code><a href='mkinmod.html'>mkinmod</a></code>.</p> </div> - <pre class="usage"><span class='fu'>mkinsub</span>(<span class='no'>submodel</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='fl'>NA</span>)</pre> + <pre class="usage"><span class='fu'>mkinsub</span><span class='op'>(</span><span class='va'>submodel</span>, to <span class='op'>=</span> <span class='cn'>NULL</span>, sink <span class='op'>=</span> <span class='cn'>TRUE</span>, full_name <span class='op'>=</span> <span class='cn'>NA</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -178,22 +181,28 @@ results on other operating systems or system configurations.</p></td> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> <p>A list for use with <code><a href='mkinmod.html'>mkinmod</a></code>.</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># One parent compound, one metabolite, both single first order.</span> -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># The same model using mkinsub</span> -<span class='no'>SFO_SFO.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='va'>SFO_SFO.2</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'>mkinsub</span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'>mkinsub</span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># \dontrun{</span> <span class='co'># Now supplying full names</span> - <span class='no'>SFO_SFO.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( - <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='st'>"Test compound"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> # } + <span class='va'>SFO_SFO.2</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span> + parent <span class='op'>=</span> <span class='fu'>mkinsub</span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, full_name <span class='op'>=</span> <span class='st'>"Test compound"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'>mkinsub</span><span class='op'>(</span><span class='st'>"SFO"</span>, full_name <span class='op'>=</span> <span class='st'>"Metabolite M1"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># }</span> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -210,7 +219,7 @@ results on other operating systems or system configurations.</p></td> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/mmkin-1.png b/docs/reference/mmkin-1.png Binary files differindex 135d5446..c8f79dcb 100644 --- a/docs/reference/mmkin-1.png +++ b/docs/reference/mmkin-1.png diff --git a/docs/reference/mmkin-2.png b/docs/reference/mmkin-2.png Binary files differindex 40109afc..5dd60e1c 100644 --- a/docs/reference/mmkin-2.png +++ b/docs/reference/mmkin-2.png diff --git a/docs/reference/mmkin-3.png b/docs/reference/mmkin-3.png Binary files differindex e80448ab..9351ca24 100644 --- a/docs/reference/mmkin-3.png +++ b/docs/reference/mmkin-3.png diff --git a/docs/reference/mmkin-4.png b/docs/reference/mmkin-4.png Binary files differindex 02976ced..69bd6e50 100644 --- a/docs/reference/mmkin-4.png +++ b/docs/reference/mmkin-4.png diff --git a/docs/reference/mmkin-5.png b/docs/reference/mmkin-5.png Binary files differindex 4c771bc9..c1c05eea 100644 --- a/docs/reference/mmkin-5.png +++ b/docs/reference/mmkin-5.png diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index 67837ea3..7a01313f 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -75,7 +75,7 @@ datasets specified in its first two arguments." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -112,6 +112,9 @@ datasets specified in its first two arguments." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -120,7 +123,7 @@ datasets specified in its first two arguments." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -140,7 +143,7 @@ datasets specified in its first two arguments." /> <div class="page-header"> <h1>Fit one or more kinetic models with one or more state variables to one or more datasets</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mmkin.R'><code>R/mmkin.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mmkin.R'><code>R/mmkin.R</code></a></small> <div class="hidden name"><code>mmkin.Rd</code></div> </div> @@ -149,13 +152,13 @@ more datasets</h1> datasets specified in its first two arguments.</p> </div> - <pre class="usage"><span class='fu'>mmkin</span>( - <span class='kw'>models</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), - <span class='no'>datasets</span>, - <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>detectCores</span>()/<span class='fl'>2</span>), - <span class='kw'>cluster</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, - <span class='no'>...</span> -)</pre> + <pre class="usage"><span class='fu'>mmkin</span><span class='op'>(</span> + models <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span><span class='op'>)</span>, + <span class='va'>datasets</span>, + cores <span class='op'>=</span> <span class='fu'>detectCores</span><span class='op'>(</span><span class='op'>)</span>, + cluster <span class='op'>=</span> <span class='cn'>NULL</span>, + <span class='va'>...</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -176,7 +179,8 @@ data for <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td> <td><p>The number of cores to be used for multicore processing. This is only used when the <code>cluster</code> argument is <code>NULL</code>. On Windows machines, cores > 1 is not supported, you need to use the <code>cluster</code> -argument to use multiple logical processors.</p></td> +argument to use multiple logical processors. Per default, all cores +detected by <code><a href='https://rdrr.io/r/parallel/detectCores.html'>parallel::detectCores()</a></code> are used.</p></td> </tr> <tr> <th>cluster</th> @@ -192,49 +196,64 @@ for parallel execution.</p></td> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> <p>A two-dimensional <code><a href='https://rdrr.io/r/base/array.html'>array</a></code> of <code><a href='mkinfit.html'>mkinfit</a></code> -objects that can be indexed using the model names for the first index (row index) -and the dataset names for the second index (column index).</p> +objects and/or try-errors that can be indexed using the model names for the +first index (row index) and the dataset names for the second index (column +index).</p> <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> - <div class='dont-index'><p><code><a href='Extract.mmkin.html'>[.mmkin</a></code> for subsetting, <code><a href='plot.mmkin.html'>plot.mmkin</a></code> for + <div class='dont-index'><p><code><a href='[.mmkin.html'>[.mmkin</a></code> for subsetting, <code><a href='plot.mmkin.html'>plot.mmkin</a></code> for plotting.</p></div> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># \dontrun{</span> -<span class='no'>m_synth_SFO_lin</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M1"</span>), - <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M2"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> -<span class='no'>m_synth_FOMC_lin</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"M1"</span>), - <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M2"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> -<span class='no'>models</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>SFO_lin</span> <span class='kw'>=</span> <span class='no'>m_synth_SFO_lin</span>, <span class='kw'>FOMC_lin</span> <span class='kw'>=</span> <span class='no'>m_synth_FOMC_lin</span>) -<span class='no'>datasets</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>synthetic_data_for_UBA_2014</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='kw'>function</span>(<span class='no'>x</span>) <span class='no'>x</span>$<span class='no'>data</span>) -<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>datasets</span>) <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>1</span>:<span class='fl'>3</span>) - -<span class='no'>time_default</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fits.0</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) -<span class='no'>time_1</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fits.4</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> -#> <span class='warning'>false convergence (8)</span></div><div class='input'> -<span class='no'>time_default</span></div><div class='output co'>#> user system elapsed -#> 4.471 0.405 1.961 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#> user system elapsed -#> 5.883 0.000 5.887 </div><div class='input'> -<span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span>]])</div><div class='output co'>#> $ff +<span class='va'>m_synth_SFO_lin</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"M1"</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"M2"</span><span class='op'>)</span>, + M2 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='va'>m_synth_FOMC_lin</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='st'>"M1"</span><span class='op'>)</span>, + M1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"M2"</span><span class='op'>)</span>, + M2 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> +<span class='va'>models</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>SFO_lin <span class='op'>=</span> <span class='va'>m_synth_SFO_lin</span>, FOMC_lin <span class='op'>=</span> <span class='va'>m_synth_FOMC_lin</span><span class='op'>)</span> +<span class='va'>datasets</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>synthetic_data_for_UBA_2014</span><span class='op'>[</span><span class='fl'>1</span><span class='op'>:</span><span class='fl'>3</span><span class='op'>]</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='va'>x</span><span class='op'>$</span><span class='va'>data</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>datasets</span><span class='op'>)</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span><span class='op'>(</span><span class='st'>"Dataset"</span>, <span class='fl'>1</span><span class='op'>:</span><span class='fl'>3</span><span class='op'>)</span> + +<span class='va'>time_default</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span><span class='op'>(</span><span class='va'>fits.0</span> <span class='op'><-</span> <span class='fu'>mmkin</span><span class='op'>(</span><span class='va'>models</span>, <span class='va'>datasets</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span> +<span class='va'>time_1</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span><span class='op'>(</span><span class='va'>fits.4</span> <span class='op'><-</span> <span class='fu'>mmkin</span><span class='op'>(</span><span class='va'>models</span>, <span class='va'>datasets</span>, cores <span class='op'>=</span> <span class='fl'>1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> +#> <span class='warning'>false convergence (8)</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0117</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0174</span></div><div class='input'> +<span class='va'>time_default</span> +</div><div class='output co'>#> user system elapsed +#> 4.828 0.413 1.467 </div><div class='input'><span class='va'>time_1</span> +</div><div class='output co'>#> user system elapsed +#> 5.228 0.000 5.231 </div><div class='input'> +<span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>fits.0</span><span class='op'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span><span class='op'>]</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> $ff #> parent_M1 parent_sink M1_M2 M1_sink -#> 0.7340479 0.2659521 0.7505687 0.2494313 +#> 0.7340478 0.2659522 0.7505691 0.2494309 #> #> $distimes #> DT50 DT90 #> parent 0.8777688 2.915885 -#> M1 2.3257457 7.725960 -#> M2 33.7200848 112.015697 +#> M1 2.3257466 7.725963 +#> M2 33.7200800 112.015681 #> </div><div class='input'> <span class='co'># plot.mkinfit handles rows or columns of mmkin result objects</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, ])</div><div class='img'><img src='mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, ], <span class='kw'>obs_var</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>))</div><div class='img'><img src='mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[, <span class='fl'>1</span>])</div><div class='img'><img src='mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># Use double brackets to extract a single mkinfit object, which will be plotted</span> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits.0</span><span class='op'>[</span><span class='fl'>1</span>, <span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits.0</span><span class='op'>[</span><span class='fl'>1</span>, <span class='op'>]</span>, obs_var <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"M1"</span>, <span class='st'>"M2"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='img'><img src='mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits.0</span><span class='op'>[</span>, <span class='fl'>1</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># Use double brackets to extract a single mkinfit object, which will be plotted</span> <span class='co'># by plot.mkinfit and can be plotted using plot_sep</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='fl'>1</span>, <span class='fl'>1</span>]], <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='fl'>1</span>, <span class='fl'>1</span>]]) +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits.0</span><span class='op'>[[</span><span class='fl'>1</span>, <span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span>, sep_obs <span class='op'>=</span> <span class='cn'>TRUE</span>, show_residuals <span class='op'>=</span> <span class='cn'>TRUE</span>, show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='img'><img src='mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span><span class='op'>(</span><span class='va'>fits.0</span><span class='op'>[[</span><span class='fl'>1</span>, <span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># Plotting with mmkin (single brackets, extracting an mmkin object) does not</span> <span class='co'># allow to plot the observed variables separately</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, <span class='fl'>1</span>])</div><div class='img'><img src='mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'># } +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits.0</span><span class='op'>[</span><span class='fl'>1</span>, <span class='fl'>1</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># }</span> </div></pre> </div> @@ -252,7 +271,7 @@ plotting.</p></div> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/nafta-1.png b/docs/reference/nafta-1.png Binary files differindex 9025f2bb..4593158c 100644 --- a/docs/reference/nafta-1.png +++ b/docs/reference/nafta-1.png diff --git a/docs/reference/nafta.html b/docs/reference/nafta.html index 34cce546..9630e230 100644 --- a/docs/reference/nafta.html +++ b/docs/reference/nafta.html @@ -76,7 +76,7 @@ order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -113,6 +113,9 @@ order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -121,7 +124,7 @@ order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -140,7 +143,7 @@ order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Evaluate parent kinetics using the NAFTA guidance</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nafta.R'><code>R/nafta.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/nafta.R'><code>R/nafta.R</code></a></small> <div class="hidden name"><code>nafta.Rd</code></div> </div> @@ -152,10 +155,10 @@ and plotting.</p> order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP.</p> </div> - <pre class="usage"><span class='fu'>nafta</span>(<span class='no'>ds</span>, <span class='kw'>title</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>) + <pre class="usage"><span class='fu'>nafta</span><span class='op'>(</span><span class='va'>ds</span>, title <span class='op'>=</span> <span class='cn'>NA</span>, quiet <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span> <span class='co'># S3 method for nafta</span> -<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>x</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, digits <span class='op'>=</span> <span class='fl'>3</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -208,10 +211,15 @@ Degradation <code><a href='mmkin.html'>mmkin</a></code> object containing the fits of the three models. The list element named "title" contains the title of the dataset used. The list element "data" contains the dataset used in the fits.</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='no'>nafta_evaluation</span> <span class='kw'><-</span> <span class='fu'>nafta</span>(<span class='no'>NAFTA_SOP_Appendix_D</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)</div><div class='output co'>#> <span class='message'>The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</span></div><div class='output co'>#> <span class='message'>The representative half-life of the IORE model is longer than the one corresponding</span></div><div class='output co'>#> <span class='message'>to the terminal degradation rate found with the DFOP model.</span></div><div class='output co'>#> <span class='message'>The representative half-life obtained from the DFOP model may be used</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>nafta_evaluation</span>)</div><div class='output co'>#> Sums of squares: + <span class='va'>nafta_evaluation</span> <span class='op'><-</span> <span class='fu'>nafta</span><span class='op'>(</span><span class='va'>NAFTA_SOP_Appendix_D</span>, cores <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.00192</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.00258</span></div><div class='output co'>#> <span class='message'>The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</span></div><div class='output co'>#> <span class='message'>The representative half-life of the IORE model is longer than the one corresponding</span></div><div class='output co'>#> <span class='message'>to the terminal degradation rate found with the DFOP model.</span></div><div class='output co'>#> <span class='message'>The representative half-life obtained from the DFOP model may be used</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>nafta_evaluation</span><span class='op'>)</span> +</div><div class='output co'>#> Sums of squares: #> SFO IORE DFOP #> 1378.6832 615.7730 517.8836 #> @@ -220,17 +228,17 @@ list element "data" contains the dataset used in the fits.</p> #> #> Parameters: #> $SFO -#> Estimate Pr(>t) Lower Upper -#> parent_0 83.7558 1.80e-14 77.18268 90.3288 -#> k_parent_sink 0.0017 7.43e-05 0.00112 0.0026 -#> sigma 8.7518 1.22e-05 5.64278 11.8608 +#> Estimate Pr(>t) Lower Upper +#> parent_0 83.7558 1.80e-14 77.18268 90.3288 +#> k_parent 0.0017 7.43e-05 0.00112 0.0026 +#> sigma 8.7518 1.22e-05 5.64278 11.8608 #> #> $IORE -#> Estimate Pr(>t) Lower Upper -#> parent_0 9.69e+01 NA 8.88e+01 1.05e+02 -#> k__iore_parent_sink 8.40e-14 NA 1.79e-18 3.94e-09 -#> N_parent 6.68e+00 NA 4.19e+00 9.17e+00 -#> sigma 5.85e+00 NA 3.76e+00 7.94e+00 +#> Estimate Pr(>t) Lower Upper +#> parent_0 9.69e+01 NA 8.88e+01 1.05e+02 +#> k__iore_parent 8.40e-14 NA 1.79e-18 3.94e-09 +#> N_parent 6.68e+00 NA 4.19e+00 9.17e+00 +#> sigma 5.85e+00 NA 3.76e+00 7.94e+00 #> #> $DFOP #> Estimate Pr(>t) Lower Upper @@ -248,7 +256,8 @@ list element "data" contains the dataset used in the fits.</p> #> DFOP 429 2380 841 #> #> Representative half-life: -#> [1] 841.41</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>nafta_evaluation</span>)</div><div class='img'><img src='nafta-1.png' alt='' width='700' height='433' /></div><div class='input'> +#> [1] 841.41</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>nafta_evaluation</span><span class='op'>)</span> +</div><div class='img'><img src='nafta-1.png' alt='' width='700' height='433' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -265,7 +274,7 @@ list element "data" contains the dataset used in the fits.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/nlme-1.png b/docs/reference/nlme-1.png Binary files differindex bc04dea8..193722c7 100644 --- a/docs/reference/nlme-1.png +++ b/docs/reference/nlme-1.png diff --git a/docs/reference/nlme.html b/docs/reference/nlme.html index 85929929..4e61a08b 100644 --- a/docs/reference/nlme.html +++ b/docs/reference/nlme.html @@ -43,7 +43,7 @@ <meta property="og:description" content="These functions facilitate setting up a nonlinear mixed effects model for an mmkin row object. An mmkin row object is essentially a list of mkinfit objects that have been obtained by fitting the same model to a list of -datasets." /> +datasets. They are used internally by the nlme.mmkin() method." /> @@ -75,7 +75,7 @@ datasets." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -112,6 +112,9 @@ datasets." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -120,7 +123,7 @@ datasets." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -139,7 +142,7 @@ datasets." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Helper functions to create nlme models from mmkin row objects</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nlme.R'><code>R/nlme.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/nlme.R'><code>R/nlme.R</code></a></small> <div class="hidden name"><code>nlme.Rd</code></div> </div> @@ -147,14 +150,14 @@ datasets." /> <p>These functions facilitate setting up a nonlinear mixed effects model for an mmkin row object. An mmkin row object is essentially a list of mkinfit objects that have been obtained by fitting the same model to a list of -datasets.</p> +datasets. They are used internally by the <code><a href='nlme.mmkin.html'>nlme.mmkin()</a></code> method.</p> </div> - <pre class="usage"><span class='fu'>nlme_function</span>(<span class='no'>object</span>) + <pre class="usage"><span class='fu'>nlme_function</span><span class='op'>(</span><span class='va'>object</span><span class='op'>)</span> -<span class='fu'>mean_degparms</span>(<span class='no'>object</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) +<span class='fu'>mean_degparms</span><span class='op'>(</span><span class='va'>object</span>, random <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> -<span class='fu'>nlme_data</span>(<span class='no'>object</span>)</pre> +<span class='fu'>nlme_data</span><span class='op'>(</span><span class='va'>object</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -175,50 +178,51 @@ datasets.</p> <p>If random is FALSE (default), a named vector containing mean values of the fitted degradation model parameters. If random is TRUE, a list with fixed and random effects, in the format required by the start argument of -nlme for the case of a single grouping variable ds?</p> +nlme for the case of a single grouping variable ds.</p> <p>A <code><a href='https://rdrr.io/pkg/nlme/man/groupedData.html'>groupedData</a></code> object</p> <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> <div class='dont-index'><p><code><a href='nlme.mmkin.html'>nlme.mmkin</a></code></p></div> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span>) -<span class='no'>m_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)) -<span class='no'>d_SFO_1</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_SFO</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.1</span>), - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>98</span>), <span class='no'>sampling_times</span>) -<span class='no'>d_SFO_1_long</span> <span class='kw'><-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span>(<span class='no'>d_SFO_1</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>) -<span class='no'>d_SFO_2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_SFO</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.05</span>), - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>102</span>), <span class='no'>sampling_times</span>) -<span class='no'>d_SFO_2_long</span> <span class='kw'><-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span>(<span class='no'>d_SFO_2</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>) -<span class='no'>d_SFO_3</span> <span class='kw'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_SFO</span>, - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.02</span>), - <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>103</span>), <span class='no'>sampling_times</span>) -<span class='no'>d_SFO_3_long</span> <span class='kw'><-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span>(<span class='no'>d_SFO_3</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>) - -<span class='no'>d1</span> <span class='kw'><-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_SFO_1</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>3</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>) -<span class='no'>d2</span> <span class='kw'><-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_SFO_2</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>2</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>) -<span class='no'>d3</span> <span class='kw'><-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_SFO_3</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>4</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>) -<span class='no'>ds</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>d1</span> <span class='kw'>=</span> <span class='no'>d1</span>, <span class='kw'>d2</span> <span class='kw'>=</span> <span class='no'>d2</span>, <span class='kw'>d3</span> <span class='kw'>=</span> <span class='no'>d3</span>) - -<span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='st'>"SFO"</span>, <span class='no'>ds</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>mean_dp</span> <span class='kw'><-</span> <span class='fu'>mean_degparms</span>(<span class='no'>f</span>) -<span class='no'>grouped_data</span> <span class='kw'><-</span> <span class='fu'>nlme_data</span>(<span class='no'>f</span>) -<span class='no'>nlme_f</span> <span class='kw'><-</span> <span class='fu'>nlme_function</span>(<span class='no'>f</span>) + <pre class="examples"><div class='input'><span class='va'>sampling_times</span> <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span><span class='op'>)</span> +<span class='va'>m_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span> +<span class='va'>d_SFO_1</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>m_SFO</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>98</span><span class='op'>)</span>, <span class='va'>sampling_times</span><span class='op'>)</span> +<span class='va'>d_SFO_1_long</span> <span class='op'><-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span><span class='op'>(</span><span class='va'>d_SFO_1</span>, time <span class='op'>=</span> <span class='st'>"time"</span><span class='op'>)</span> +<span class='va'>d_SFO_2</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>m_SFO</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.05</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>102</span><span class='op'>)</span>, <span class='va'>sampling_times</span><span class='op'>)</span> +<span class='va'>d_SFO_2_long</span> <span class='op'><-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span><span class='op'>(</span><span class='va'>d_SFO_2</span>, time <span class='op'>=</span> <span class='st'>"time"</span><span class='op'>)</span> +<span class='va'>d_SFO_3</span> <span class='op'><-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span><span class='op'>(</span><span class='va'>m_SFO</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.02</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>103</span><span class='op'>)</span>, <span class='va'>sampling_times</span><span class='op'>)</span> +<span class='va'>d_SFO_3_long</span> <span class='op'><-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span><span class='op'>(</span><span class='va'>d_SFO_3</span>, time <span class='op'>=</span> <span class='st'>"time"</span><span class='op'>)</span> + +<span class='va'>d1</span> <span class='op'><-</span> <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>d_SFO_1</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span><span class='op'>)</span> <span class='fl'>3</span>, n <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span> +<span class='va'>d2</span> <span class='op'><-</span> <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>d_SFO_2</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span><span class='op'>)</span> <span class='fl'>2</span>, n <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span> +<span class='va'>d3</span> <span class='op'><-</span> <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>d_SFO_3</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span><span class='op'>)</span> <span class='fl'>4</span>, n <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span> +<span class='va'>ds</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>d1 <span class='op'>=</span> <span class='va'>d1</span>, d2 <span class='op'>=</span> <span class='va'>d2</span>, d3 <span class='op'>=</span> <span class='va'>d3</span><span class='op'>)</span> + +<span class='va'>f</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='va'>ds</span>, cores <span class='op'>=</span> <span class='fl'>1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +<span class='va'>mean_dp</span> <span class='op'><-</span> <span class='fu'>mean_degparms</span><span class='op'>(</span><span class='va'>f</span><span class='op'>)</span> +<span class='va'>grouped_data</span> <span class='op'><-</span> <span class='fu'>nlme_data</span><span class='op'>(</span><span class='va'>f</span><span class='op'>)</span> +<span class='va'>nlme_f</span> <span class='op'><-</span> <span class='fu'>nlme_function</span><span class='op'>(</span><span class='va'>f</span><span class='op'>)</span> <span class='co'># These assignments are necessary for these objects to be</span> <span class='co'># visible to nlme and augPred when evaluation is done by</span> <span class='co'># pkgdown to generated the html docs.</span> -<span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='st'>"nlme_f"</span>, <span class='no'>nlme_f</span>, <span class='fu'><a href='https://rdrr.io/r/base/environment.html'>globalenv</a></span>()) -<span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='st'>"grouped_data"</span>, <span class='no'>grouped_data</span>, <span class='fu'><a href='https://rdrr.io/r/base/environment.html'>globalenv</a></span>()) - -<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>nlme</span>) -<span class='no'>m_nlme</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>value</span> ~ <span class='fu'>nlme_f</span>(<span class='no'>name</span>, <span class='no'>time</span>, <span class='no'>parent_0</span>, <span class='no'>log_k_parent_sink</span>), - <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>grouped_data</span>, - <span class='kw'>fixed</span> <span class='kw'>=</span> <span class='no'>parent_0</span> + <span class='no'>log_k_parent_sink</span> ~ <span class='fl'>1</span>, - <span class='kw'>random</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/pdDiag.html'>pdDiag</a></span>(<span class='no'>parent_0</span> + <span class='no'>log_k_parent_sink</span> ~ <span class='fl'>1</span>), - <span class='kw'>start</span> <span class='kw'>=</span> <span class='no'>mean_dp</span>) -<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>m_nlme</span>)</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood +<span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span><span class='op'>(</span><span class='st'>"nlme_f"</span>, <span class='va'>nlme_f</span>, <span class='fu'><a href='https://rdrr.io/r/base/environment.html'>globalenv</a></span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span><span class='op'>(</span><span class='st'>"grouped_data"</span>, <span class='va'>grouped_data</span>, <span class='fu'><a href='https://rdrr.io/r/base/environment.html'>globalenv</a></span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span> + +<span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://svn.r-project.org/R-packages/trunk/nlme'>nlme</a></span><span class='op'>)</span> +<span class='va'>m_nlme</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>value</span> <span class='op'>~</span> <span class='fu'>nlme_f</span><span class='op'>(</span><span class='va'>name</span>, <span class='va'>time</span>, <span class='va'>parent_0</span>, <span class='va'>log_k_parent_sink</span><span class='op'>)</span>, + data <span class='op'>=</span> <span class='va'>grouped_data</span>, + fixed <span class='op'>=</span> <span class='va'>parent_0</span> <span class='op'>+</span> <span class='va'>log_k_parent_sink</span> <span class='op'>~</span> <span class='fl'>1</span>, + random <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/pdDiag.html'>pdDiag</a></span><span class='op'>(</span><span class='va'>parent_0</span> <span class='op'>+</span> <span class='va'>log_k_parent_sink</span> <span class='op'>~</span> <span class='fl'>1</span><span class='op'>)</span>, + start <span class='op'>=</span> <span class='va'>mean_dp</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>m_nlme</span><span class='op'>)</span> +</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood #> Model: value ~ nlme_f(name, time, parent_0, log_k_parent_sink) #> Data: grouped_data #> AIC BIC logLik @@ -228,24 +232,25 @@ nlme for the case of a single grouping variable ds?</p> #> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1) #> Level: ds #> Structure: Diagonal -#> parent_0 log_k_parent_sink Residual -#> StdDev: 0.004139378 0.6800778 2.489396 +#> parent_0 log_k_parent_sink Residual +#> StdDev: 0.0006768135 0.6800777 2.489397 #> #> Fixed effects: parent_0 + log_k_parent_sink ~ 1 #> Value Std.Error DF t-value p-value -#> parent_0 101.74884 0.6456057 44 157.60213 0 -#> log_k_parent_sink -3.05575 0.4015812 44 -7.60929 0 +#> parent_0 101.74884 0.6456014 44 157.60321 0 +#> log_k_parent_sink -3.05575 0.4015811 44 -7.60929 0 #> Correlation: #> prnt_0 #> log_k_parent_sink 0.026 #> #> Standardized Within-Group Residuals: -#> Min Q1 Med Q3 Max -#> -2.13168782 -0.68780415 0.08282907 0.85913228 2.95298904 +#> Min Q1 Med Q3 Max +#> -2.1317488 -0.6878121 0.0828385 0.8592270 2.9529864 #> #> Number of Observations: 48 -#> Number of Groups: 3 </div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='fu'><a href='https://rdrr.io/pkg/nlme/man/augPred.html'>augPred</a></span>(<span class='no'>m_nlme</span>, <span class='kw'>level</span> <span class='kw'>=</span> <span class='fl'>0</span>:<span class='fl'>1</span>), <span class='kw'>layout</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>1</span>))</div><div class='img'><img src='nlme-1.png' alt='' width='700' height='433' /></div><div class='input'># augPred does not seem to work on fits with more than one state -# variable +#> Number of Groups: 3 </div><div class='input'><span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/pkg/nlme/man/augPred.html'>augPred</a></span><span class='op'>(</span><span class='va'>m_nlme</span>, level <span class='op'>=</span> <span class='fl'>0</span><span class='op'>:</span><span class='fl'>1</span><span class='op'>)</span>, layout <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>3</span>, <span class='fl'>1</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='img'><img src='nlme-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># augPred does not seem to work on fits with more than one state</span> +<span class='co'># variable</span> </div></pre> </div> @@ -263,7 +268,7 @@ nlme for the case of a single grouping variable ds?</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/nlme.mmkin-1.png b/docs/reference/nlme.mmkin-1.png Binary files differindex 67f279da..564f7e2b 100644 --- a/docs/reference/nlme.mmkin-1.png +++ b/docs/reference/nlme.mmkin-1.png diff --git a/docs/reference/nlme.mmkin-2.png b/docs/reference/nlme.mmkin-2.png Binary files differindex 16a5d7bd..a9ce4636 100644 --- a/docs/reference/nlme.mmkin-2.png +++ b/docs/reference/nlme.mmkin-2.png diff --git a/docs/reference/nlme.mmkin-3.png b/docs/reference/nlme.mmkin-3.png Binary files differindex 73426834..0b7ce0f6 100644 --- a/docs/reference/nlme.mmkin-3.png +++ b/docs/reference/nlme.mmkin-3.png diff --git a/docs/reference/nlme.mmkin-4.png b/docs/reference/nlme.mmkin-4.png Binary files differindex 9b46b425..d7c68dd5 100644 --- a/docs/reference/nlme.mmkin-4.png +++ b/docs/reference/nlme.mmkin-4.png diff --git a/docs/reference/nlme.mmkin-5.png b/docs/reference/nlme.mmkin-5.png Binary files differindex 3398dd4a..2c299b08 100644 --- a/docs/reference/nlme.mmkin-5.png +++ b/docs/reference/nlme.mmkin-5.png diff --git a/docs/reference/nlme.mmkin-6.png b/docs/reference/nlme.mmkin-6.png Binary files differindex 7b663991..2bcb9cec 100644 --- a/docs/reference/nlme.mmkin-6.png +++ b/docs/reference/nlme.mmkin-6.png diff --git a/docs/reference/nlme.mmkin-7.png b/docs/reference/nlme.mmkin-7.png Binary files differindex d2c38a63..30e2d351 100644 --- a/docs/reference/nlme.mmkin-7.png +++ b/docs/reference/nlme.mmkin-7.png diff --git a/docs/reference/nlme.mmkin.html b/docs/reference/nlme.mmkin.html index c0fb499d..af3b712c 100644 --- a/docs/reference/nlme.mmkin.html +++ b/docs/reference/nlme.mmkin.html @@ -74,7 +74,7 @@ have been obtained by fitting the same model to a list of datasets." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -111,6 +111,9 @@ have been obtained by fitting the same model to a list of datasets." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -119,7 +122,7 @@ have been obtained by fitting the same model to a list of datasets." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -138,7 +141,7 @@ have been obtained by fitting the same model to a list of datasets." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Create an nlme model for an mmkin row object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nlme.mmkin.R'><code>R/nlme.mmkin.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/nlme.mmkin.R'><code>R/nlme.mmkin.R</code></a></small> <div class="hidden name"><code>nlme.mmkin.Rd</code></div> </div> @@ -149,28 +152,28 @@ have been obtained by fitting the same model to a list of datasets.</p> </div> <pre class="usage"><span class='co'># S3 method for mmkin</span> -<span class='fu'>nlme</span>( - <span class='no'>model</span>, - <span class='kw'>data</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.frame</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.parent</a></span>()), - <span class='no'>fixed</span>, - <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>fixed</span>, - <span class='no'>groups</span>, - <span class='no'>start</span>, - <span class='kw'>correlation</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, - <span class='kw'>weights</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, - <span class='no'>subset</span>, - <span class='kw'>method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"ML"</span>, <span class='st'>"REML"</span>), - <span class='kw'>na.action</span> <span class='kw'>=</span> <span class='no'>na.fail</span>, - <span class='no'>naPattern</span>, - <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(), - <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span> -) +<span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span> + <span class='va'>model</span>, + data <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.frame</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.parent</a></span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span>, + <span class='va'>fixed</span>, + random <span class='op'>=</span> <span class='va'>fixed</span>, + <span class='va'>groups</span>, + <span class='va'>start</span>, + correlation <span class='op'>=</span> <span class='cn'>NULL</span>, + weights <span class='op'>=</span> <span class='cn'>NULL</span>, + <span class='va'>subset</span>, + method <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"ML"</span>, <span class='st'>"REML"</span><span class='op'>)</span>, + na.action <span class='op'>=</span> <span class='va'>na.fail</span>, + <span class='va'>naPattern</span>, + control <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='op'>)</span>, + verbose <span class='op'>=</span> <span class='cn'>FALSE</span> +<span class='op'>)</span> <span class='co'># S3 method for nlme.mmkin</span> -<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='no'>...</span>) +<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>x</span>, <span class='va'>...</span><span class='op'>)</span> <span class='co'># S3 method for nlme.mmkin</span> -<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -181,7 +184,7 @@ have been obtained by fitting the same model to a list of datasets.</p> </tr> <tr> <th>data</th> - <td><p>Should the data be printed?</p></td> + <td><p>Ignored, data are taken from the mmkin model</p></td> </tr> <tr> <th>fixed</th> @@ -254,165 +257,181 @@ parameters taken from the mmkin object are used</p></td> with additional elements</p> <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2> - <div class='dont-index'><p><code><a href='nlme.html'>nlme_function</a></code></p></div> + <div class='dont-index'><p><code><a href='nlme_function.html'>nlme_function</a></code></p></div> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='no'>ds</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>], - <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)], <span class='no'>name</span> <span class='kw'>==</span> <span class='st'>"parent"</span>)) -<span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='st'>"SFO"</span>, <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>) -<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>nlme</span>) -<span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f</span><span class='kw'>[[</span><span class='fl'>1</span>]])</div><div class='output co'>#> $distimes + <pre class="examples"><div class='input'><span class='va'>ds</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>experimental_data_for_UBA_2019</span><span class='op'>[</span><span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>]</span>, + <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>$</span><span class='va'>data</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span><span class='op'>)</span><span class='op'>]</span>, <span class='va'>name</span> <span class='op'>==</span> <span class='st'>"parent"</span><span class='op'>)</span><span class='op'>)</span> +<span class='va'>f</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, cores <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0195</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.011</span></div><div class='input'><span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://svn.r-project.org/R-packages/trunk/nlme'>nlme</a></span><span class='op'>)</span> +<span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[[</span><span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> $distimes #> DT50 DT90 #> parent 11.96183 39.73634 -#> </div><div class='input'><span class='no'>f_nlme</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>) -<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood -#> Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent_sink) +#> </div><div class='input'><span class='va'>f_nlme</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>f_nlme</span><span class='op'>)</span> +</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood +#> Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent) #> Data: "Not shown" #> Log-likelihood: -307.5269 -#> Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1) -#> parent_0 log_k_parent_sink -#> 85.540979 -3.229602 +#> Fixed: list(parent_0 ~ 1, log_k_parent ~ 1) +#> parent_0 log_k_parent +#> 85.541149 -3.229596 #> #> Random effects: -#> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1) +#> Formula: list(parent_0 ~ 1, log_k_parent ~ 1) #> Level: ds #> Structure: Diagonal -#> parent_0 log_k_parent_sink Residual -#> StdDev: 1.308245 1.288586 6.304923 +#> parent_0 log_k_parent Residual +#> StdDev: 1.30857 1.288591 6.304906 #> #> Number of Observations: 90 -#> Number of Groups: 5 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#> $distimes +#> Number of Groups: 5 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>f_nlme</span><span class='op'>)</span> +</div><div class='output co'>#> $distimes #> DT50 DT90 -#> parent 17.51556 58.18543 +#> parent 17.51545 58.18505 #> </div><div class='input'><span class='co'># \dontrun{</span> - <span class='no'>f_nlme_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>, <span class='kw'>start</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent_0</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>log_k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>)) - <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>f_nlme_2</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>parent_0</span> ~ <span class='fl'>1</span>)</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood -#> Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent_sink) + <span class='va'>f_nlme_2</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f</span>, start <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent_0 <span class='op'>=</span> <span class='fl'>100</span>, log_k_parent_sink <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span><span class='op'>)</span> + <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span><span class='op'>(</span><span class='va'>f_nlme_2</span>, random <span class='op'>=</span> <span class='va'>parent_0</span> <span class='op'>~</span> <span class='fl'>1</span><span class='op'>)</span> +</div><div class='output co'>#> Nonlinear mixed-effects model fit by maximum likelihood +#> Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent) #> Data: "Not shown" #> Log-likelihood: -404.3729 -#> Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1) -#> parent_0 log_k_parent_sink -#> 75.933480 -3.555983 +#> Fixed: list(parent_0 ~ 1, log_k_parent ~ 1) +#> parent_0 log_k_parent +#> 75.933480 -3.555983 #> #> Random effects: #> Formula: parent_0 ~ 1 | ds #> parent_0 Residual -#> StdDev: 0.002416802 21.63027 +#> StdDev: 0.002416792 21.63027 #> #> Number of Observations: 90 #> Number of Groups: 5 </div><div class='input'> <span class='co'># Test on some real data</span> - <span class='no'>ds_2</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>], - <span class='kw'>function</span>(<span class='no'>x</span>) <span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)]) - <span class='no'>m_sfo_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>), - <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"min"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='no'>m_sfo_sfo_ff</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>), - <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='no'>m_fomc_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"A1"</span>), - <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='no'>m_dfop_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='st'>"A1"</span>), - <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - - <span class='no'>f_2</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>m_sfo_sfo</span>, - <span class='st'>"SFO-SFO-ff"</span> <span class='kw'>=</span> <span class='no'>m_sfo_sfo_ff</span>, - <span class='st'>"FOMC-SFO"</span> <span class='kw'>=</span> <span class='no'>m_fomc_sfo</span>, - <span class='st'>"DFOP-SFO"</span> <span class='kw'>=</span> <span class='no'>m_dfop_sfo</span>), - <span class='no'>ds_2</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>]) <span class='co'># Separate fits for datasets 3 and 4</span></div><div class='img'><img src='nlme.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'> - <span class='no'>f_nlme_sfo_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO"</span>, ]) + <span class='va'>ds_2</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>experimental_data_for_UBA_2019</span><span class='op'>[</span><span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>]</span>, + <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='va'>x</span><span class='op'>$</span><span class='va'>data</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span><span class='op'>)</span><span class='op'>]</span><span class='op'>)</span> + <span class='va'>m_sfo_sfo</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"A1"</span><span class='op'>)</span>, + A1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"min"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='va'>m_sfo_sfo_ff</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"A1"</span><span class='op'>)</span>, + A1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='va'>m_fomc_sfo</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='st'>"A1"</span><span class='op'>)</span>, + A1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.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 class='op'>)</span> + <span class='va'>m_dfop_sfo</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"DFOP"</span>, <span class='st'>"A1"</span><span class='op'>)</span>, + A1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.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 class='op'>)</span> + + <span class='va'>f_2</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"SFO-SFO"</span> <span class='op'>=</span> <span class='va'>m_sfo_sfo</span>, + <span class='st'>"SFO-SFO-ff"</span> <span class='op'>=</span> <span class='va'>m_sfo_sfo_ff</span>, + <span class='st'>"FOMC-SFO"</span> <span class='op'>=</span> <span class='va'>m_fomc_sfo</span>, + <span class='st'>"DFOP-SFO"</span> <span class='op'>=</span> <span class='va'>m_dfop_sfo</span><span class='op'>)</span>, + <span class='va'>ds_2</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"SFO-SFO"</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># Separate fits for datasets 3 and 4</span> +</div><div class='img'><img src='nlme.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='va'>f_nlme_sfo_sfo</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"SFO-SFO"</span>, <span class='op'>]</span><span class='op'>)</span> <span class='co'># plot(f_nlme_sfo_sfo) # not feasible with pkgdown figures</span> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_sfo_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>) <span class='co'># Global mixed model: Fits for datasets 3 and 4</span></div><div class='img'><img src='nlme.mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme_sfo_sfo</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</span> <span class='co'># Global mixed model: Fits for datasets 3 and 4</span> +</div><div class='img'><img src='nlme.mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># With formation fractions</span> - <span class='no'>f_nlme_sfo_sfo_ff</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO-ff"</span>, ]) - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_sfo_sfo_ff</span>, <span class='fl'>3</span>:<span class='fl'>4</span>) <span class='co'># chi2 different due to different df attribution</span></div><div class='img'><img src='nlme.mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='va'>f_nlme_sfo_sfo_ff</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"SFO-SFO-ff"</span>, <span class='op'>]</span><span class='op'>)</span> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme_sfo_sfo_ff</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</span> <span class='co'># chi2 different due to different df attribution</span> +</div><div class='img'><img src='nlme.mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># For more parameters, we need to increase pnlsMaxIter and the tolerance</span> <span class='co'># to get convergence</span> - <span class='no'>f_nlme_fomc_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, ], - <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>pnlsMaxIter</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>tolerance</span> <span class='kw'>=</span> <span class='fl'>1e-4</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> + <span class='va'>f_nlme_fomc_sfo</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"FOMC-SFO"</span>, <span class='op'>]</span>, + control <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>pnlsMaxIter <span class='op'>=</span> <span class='fl'>100</span>, tolerance <span class='op'>=</span> <span class='fl'>1e-4</span><span class='op'>)</span>, verbose <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> #> **Iteration 1 -#> LME step: Loglik: -394.1603, nlminb iterations: 2 +#> LME step: Loglik: -394.1603, nlminb iterations: 3 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -0.2079863 0.8563823 1.7454253 1.0917707 1.2756955 +#> -0.2079793 0.8563830 1.7454105 1.0917354 1.2756825 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.8814 -#> fixed effects: 94.17379 -5.473189 -0.6970234 -0.202509 2.103883 +#> PNLS step: RSS = 643.8803 +#> fixed effects: 94.17379 -5.473193 -0.6970236 -0.2025091 2.103883 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 0.7959873 0.1447512 +#> 0.7960134 0.1447728 #> #> **Iteration 2 #> LME step: Loglik: -396.3824, nlminb iterations: 7 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -1.712406e-01 -2.278541e-05 1.842120e+00 1.073975e+00 1.322924e+00 +#> -1.712404e-01 -2.432655e-05 1.842120e+00 1.073975e+00 1.322925e+00 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.8025 -#> fixed effects: 94.17385 -5.473491 -0.6970406 -0.2025139 2.103871 +#> PNLS step: RSS = 643.8035 +#> fixed effects: 94.17385 -5.473487 -0.6970404 -0.2025137 2.103871 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): -#> fixed reStruct -#> 5.51758e-05 1.26861e-03 +#> fixed reStruct +#> 5.382757e-05 1.236667e-03 #> #> **Iteration 3 #> LME step: Loglik: -396.3825, nlminb iterations: 7 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -0.1712500923 -0.0001515734 1.8420972550 1.0739796967 1.3229177241 +#> -0.1712499044 -0.0001499831 1.8420971364 1.0739799123 1.3229167796 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.7941 -#> fixed effects: 94.17386 -5.473523 -0.6970424 -0.2025146 2.103869 +#> PNLS step: RSS = 643.7948 +#> fixed effects: 94.17386 -5.473521 -0.6970422 -0.2025144 2.10387 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 5.792621e-06 1.335434e-04 +#> 6.072817e-06 1.400857e-04 #> #> **Iteration 4 #> LME step: Loglik: -396.3825, nlminb iterations: 7 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 -#> -0.1712517206 -0.0001651603 1.8420950864 1.0739800294 1.3229173529 +#> -0.1712529502 -0.0001641277 1.8420957542 1.0739797181 1.3229173076 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 643.7949 -#> fixed effects: 94.17386 -5.473521 -0.6970423 -0.2025145 2.10387 +#> PNLS step: RSS = 643.7936 +#> fixed effects: 94.17386 -5.473526 -0.6970426 -0.2025146 2.103869 #> iterations: 100 #> Convergence crit. (must all become <= tolerance = 0.0001): #> fixed reStruct -#> 4.025781e-07 9.628656e-06 </div><div class='input'> <span class='no'>f_nlme_dfop_sfo</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, ], - <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>pnlsMaxIter</span> <span class='kw'>=</span> <span class='fl'>120</span>, <span class='kw'>tolerance</span> <span class='kw'>=</span> <span class='fl'>5e-4</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> +#> 1.027451e-06 2.275704e-05 </div><div class='input'> <span class='va'>f_nlme_dfop_sfo</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"DFOP-SFO"</span>, <span class='op'>]</span>, + control <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>pnlsMaxIter <span class='op'>=</span> <span class='fl'>120</span>, tolerance <span class='op'>=</span> <span class='fl'>5e-4</span><span class='op'>)</span>, verbose <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> #> **Iteration 1 -#> LME step: Loglik: -404.9583, nlminb iterations: 1 +#> LME step: Loglik: -404.9582, nlminb iterations: 1 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 ds6 -#> -0.4114357 0.9798641 1.6990035 0.7293314 0.3354323 1.7113047 +#> -0.4114355 0.9798697 1.6990037 0.7293315 0.3354323 1.7113046 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 630.3642 -#> fixed effects: 93.82269 -5.455991 -0.6788957 -1.862196 -4.199671 0.0553284 +#> PNLS step: RSS = 630.3644 +#> fixed effects: 93.82269 -5.455991 -0.6788957 -1.862196 -4.199671 0.05532828 #> iterations: 120 #> Convergence crit. (must all become <= tolerance = 0.0005): #> fixed reStruct -#> 0.7879730 0.5822574 +#> 0.7885368 0.5822683 #> #> **Iteration 2 #> LME step: Loglik: -407.7755, nlminb iterations: 11 #> reStruct parameters: #> ds1 ds2 ds3 ds4 ds5 ds6 -#> -0.371224105 0.003056163 1.789939431 0.724671132 0.301602942 1.754200482 +#> -0.371224133 0.003056179 1.789939402 0.724671158 0.301602977 1.754200729 #> Beginning PNLS step: .. completed fit_nlme() step. -#> PNLS step: RSS = 630.364 -#> fixed effects: 93.82269 -5.455991 -0.6788958 -1.862196 -4.199671 0.05532834 +#> PNLS step: RSS = 630.3633 +#> fixed effects: 93.82269 -5.455992 -0.6788958 -1.862196 -4.199671 0.05532831 #> iterations: 120 #> Convergence crit. (must all become <= tolerance = 0.0005): #> fixed reStruct -#> 9.814652e-07 1.059239e-05 </div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_fomc_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-6.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-7.png' alt='' width='700' height='433' /></div><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_fomc_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>)</div><div class='output co'>#> Model df AIC BIC logLik Test L.Ratio p-value -#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9274 -#> f_nlme_fomc_sfo 2 11 818.5151 853.0089 -398.2576 1 vs 2 21.33957 <.0001 -#> f_nlme_sfo_sfo 3 9 1085.1821 1113.4043 -533.5910 2 vs 3 270.66697 <.0001</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>) <span class='co'># if we ignore FOMC</span></div><div class='output co'>#> Model df AIC BIC logLik Test L.Ratio p-value -#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9274 +#> 4.789774e-07 2.200661e-05 </div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"FOMC-SFO"</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='nlme.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme_fomc_sfo</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</span> +</div><div class='img'><img src='nlme.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"DFOP-SFO"</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='nlme.mmkin-6.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme_dfop_sfo</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</span> +</div><div class='img'><img src='nlme.mmkin-7.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span><span class='op'>(</span><span class='va'>f_nlme_dfop_sfo</span>, <span class='va'>f_nlme_fomc_sfo</span>, <span class='va'>f_nlme_sfo_sfo</span><span class='op'>)</span> +</div><div class='output co'>#> Model df AIC BIC logLik Test L.Ratio p-value +#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9273 +#> f_nlme_fomc_sfo 2 11 818.5149 853.0087 -398.2575 1 vs 2 21.33975 <.0001 +#> f_nlme_sfo_sfo 3 9 1085.1821 1113.4043 -533.5910 2 vs 3 270.66716 <.0001</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span><span class='op'>(</span><span class='va'>f_nlme_dfop_sfo</span>, <span class='va'>f_nlme_sfo_sfo</span><span class='op'>)</span> <span class='co'># if we ignore FOMC</span> +</div><div class='output co'>#> Model df AIC BIC logLik Test L.Ratio p-value +#> f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9273 #> f_nlme_sfo_sfo 2 9 1085.1821 1113.4043 -533.5910 1 vs 2 249.3274 <.0001</div><div class='input'> - <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme_sfo_sfo</span>)</div><div class='output co'>#> $ff + <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>f_nlme_sfo_sfo</span><span class='op'>)</span> +</div><div class='output co'>#> $ff #> parent_sink parent_A1 A1_sink #> 0.5912432 0.4087568 1.0000000 #> @@ -420,15 +439,16 @@ with additional elements</p> #> DT50 DT90 #> parent 19.13518 63.5657 #> A1 66.02155 219.3189 -#> </div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme_dfop_sfo</span>)</div><div class='output co'>#> $ff +#> </div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>f_nlme_dfop_sfo</span><span class='op'>)</span> +</div><div class='output co'>#> $ff #> parent_A1 parent_sink #> 0.2768574 0.7231426 #> #> $distimes -#> DT50 DT90 DT50_k1 DT50_k2 -#> parent 11.07091 104.6320 4.462384 46.20825 -#> A1 162.30518 539.1661 NA NA -#> </div><div class='input'># } +#> DT50 DT90 DT50back DT50_k1 DT50_k2 +#> parent 11.07091 104.6320 31.49738 4.462384 46.20825 +#> A1 162.30536 539.1667 NA NA NA +#> </div><div class='input'><span class='co'># }</span> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> @@ -445,7 +465,7 @@ with additional elements</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/parms.html b/docs/reference/parms.html index f62b3898..30dc7770 100644 --- a/docs/reference/parms.html +++ b/docs/reference/parms.html @@ -74,7 +74,7 @@ considering the error structure that was assumed for the fit." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -111,6 +111,9 @@ considering the error structure that was assumed for the fit." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -119,7 +122,7 @@ considering the error structure that was assumed for the fit." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -138,7 +141,7 @@ considering the error structure that was assumed for the fit." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Extract model parameters from mkinfit models</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parms.mkinfit.R'><code>R/parms.mkinfit.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/parms.mkinfit.R'><code>R/parms.mkinfit.R</code></a></small> <div class="hidden name"><code>parms.Rd</code></div> </div> @@ -148,17 +151,21 @@ model parameters, in order to avoid working with a fitted model without considering the error structure that was assumed for the fit.</p> </div> - <pre class="usage"><span class='fu'>parms</span>(<span class='no'>object</span>, <span class='no'>...</span>) + <pre class="usage"><span class='fu'>parms</span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span><span class='op'>)</span> <span class='co'># S3 method for mkinfit</span> -<span class='fu'>parms</span>(<span class='no'>object</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre> +<span class='fu'>parms</span><span class='op'>(</span><span class='va'>object</span>, transformed <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span> + +<span class='co'># S3 method for mmkin</span> +<span class='fu'>parms</span><span class='op'>(</span><span class='va'>object</span>, transformed <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> <colgroup><col class="name" /><col class="desc" /></colgroup> <tr> <th>object</th> - <td><p>A fitted model object</p></td> + <td><p>A fitted model object. Methods are implemented for +<code><a href='mkinfit.html'>mkinfit()</a></code> objects and for <code><a href='mmkin.html'>mmkin()</a></code> objects.</p></td> </tr> <tr> <th>...</th> @@ -173,24 +180,94 @@ as used internally during the optimisation?</p></td> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - <p>A numeric vector of fitted model parameters</p> + <p>For mkinfit objects, a numeric vector of fitted model parameters. +For mmkin row objects, a matrix with the parameters with a +row for each dataset. If the mmkin object has more than one row, a list of +such matrices is returned.</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>)</div><div class='output co'>#> <span class='message'>Ordinary least squares optimisation</span></div><div class='output co'>#> Sum of squared residuals at call 1: 2388.077 -#> Sum of squared residuals at call 3: 2388.077 -#> Sum of squared residuals at call 4: 247.1962 -#> Sum of squared residuals at call 7: 200.6791 -#> Sum of squared residuals at call 10: 197.7231 -#> Sum of squared residuals at call 11: 197.0872 -#> Sum of squared residuals at call 14: 196.535 -#> Sum of squared residuals at call 15: 196.535 -#> Sum of squared residuals at call 16: 196.535 -#> Sum of squared residuals at call 17: 196.5334 -#> Sum of squared residuals at call 20: 196.5334 -#> Sum of squared residuals at call 25: 196.5334 -#> Negative log-likelihood at call 31: 26.64668</div><div class='output co'>#> <span class='message'>Optimisation successfully terminated.</span></div><div class='input'><span class='fu'>parms</span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 k_parent_sink sigma -#> 82.4921598 0.3060633 4.6730124 </div><div class='input'><span class='fu'>parms</span>(<span class='no'>fit</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink sigma -#> 82.492160 -1.183963 4.673012 </div></pre> + <pre class="examples"><div class='input'><span class='co'># mkinfit objects</span> +<span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +<span class='fu'>parms</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='output co'>#> parent_0 k_parent sigma +#> 82.4921598 0.3060633 4.6730124 </div><div class='input'><span class='fu'>parms</span><span class='op'>(</span><span class='va'>fit</span>, transformed <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> parent_0 log_k_parent sigma +#> 82.492160 -1.183963 4.673012 </div><div class='input'> +<span class='co'># mmkin objects</span> +<span class='va'>ds</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>experimental_data_for_UBA_2019</span><span class='op'>[</span><span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>]</span>, + <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>$</span><span class='va'>data</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span><span class='op'>)</span><span class='op'>]</span><span class='op'>)</span><span class='op'>)</span> +<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>ds</span><span class='op'>)</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span><span class='op'>(</span><span class='st'>"Dataset"</span>, <span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>)</span> +<span class='co'># \dontrun{</span> +<span class='va'>fits</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span><span class='op'>)</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, cores <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0195</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.00408</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0492</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.00985</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.00815</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.011</span></div><div class='input'><span class='fu'>parms</span><span class='op'>(</span><span class='va'>fits</span><span class='op'>[</span><span class='st'>"SFO"</span>, <span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 +#> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450 +#> k_parent 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421 +#> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673</div><div class='input'><span class='fu'>parms</span><span class='op'>(</span><span class='va'>fits</span><span class='op'>[</span>, <span class='fl'>2</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> $SFO +#> Dataset 7 +#> parent_0 82.666781678 +#> k_parent 0.009647805 +#> sigma 7.040168584 +#> +#> $FOMC +#> Dataset 7 +#> parent_0 92.6837649 +#> alpha 0.4967832 +#> beta 14.1451255 +#> sigma 1.9167519 +#> +#> $DFOP +#> Dataset 7 +#> parent_0 91.058971503 +#> k1 0.044946770 +#> k2 0.002868336 +#> g 0.526942415 +#> sigma 2.221302196 +#> </div><div class='input'><span class='fu'>parms</span><span class='op'>(</span><span class='va'>fits</span><span class='op'>)</span> +</div><div class='output co'>#> $SFO +#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 +#> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450 +#> k_parent 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421 +#> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673 +#> +#> $FOMC +#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 +#> parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481458 +#> alpha 1.338667 0.4967832 1.639099 1.074460 0.2805272 +#> beta 13.033315 14.1451255 5.007077 4.397126 6.9052224 +#> sigma 1.847671 1.9167519 1.066063 3.146056 1.6222778 +#> +#> $DFOP +#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 +#> parent_0 96.55213663 91.058971503 90.34509469 98.14858850 94.311323409 +#> k1 0.21954589 0.044946770 0.41232289 0.31697588 0.080663853 +#> k2 0.02957934 0.002868336 0.07581767 0.03260384 0.003425417 +#> g 0.44845068 0.526942415 0.66091965 0.65322767 0.342652880 +#> sigma 1.35690468 2.221302196 1.34169076 2.87159846 1.942067831 +#> </div><div class='input'><span class='fu'>parms</span><span class='op'>(</span><span class='va'>fits</span>, transformed <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> $SFO +#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 +#> parent_0 88.522754 82.666782 86.854731 91.777931 82.148094 +#> log_k_parent -2.848234 -4.641025 -1.559232 -2.093737 -4.933090 +#> sigma 5.152745 7.040169 3.676964 6.466923 6.504577 +#> +#> $FOMC +#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 +#> parent_0 95.5585751 92.6837649 90.7197870 98.38393897 94.848146 +#> log_alpha 0.2916741 -0.6996015 0.4941466 0.07181816 -1.271085 +#> log_beta 2.5675088 2.6493701 1.6108523 1.48095106 1.932278 +#> sigma 1.8476712 1.9167519 1.0660627 3.14605557 1.622278 +#> +#> $DFOP +#> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10 +#> parent_0 96.5521366 91.05897150 90.3450947 98.1485885 94.311323 +#> log_k1 -1.5161940 -3.10227638 -0.8859485 -1.1489296 -2.517465 +#> log_k2 -3.5206791 -5.85402317 -2.5794240 -3.4233253 -5.676532 +#> g_ilr -0.1463234 0.07627854 0.4719196 0.4477805 -0.460676 +#> sigma 1.3569047 2.22130220 1.3416908 2.8715985 1.942068 +#> </div><div class='input'><span class='co'># }</span> +</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <nav id="toc" data-toggle="toc" class="sticky-top"> @@ -206,7 +283,7 @@ as used internally during the optimisation?</p></td> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/plot.mkinfit-1.png b/docs/reference/plot.mkinfit-1.png Binary files differindex c6a415d7..fc195031 100644 --- a/docs/reference/plot.mkinfit-1.png +++ b/docs/reference/plot.mkinfit-1.png diff --git a/docs/reference/plot.mkinfit-2.png b/docs/reference/plot.mkinfit-2.png Binary files differindex 5dd3731e..994b516e 100644 --- a/docs/reference/plot.mkinfit-2.png +++ b/docs/reference/plot.mkinfit-2.png diff --git a/docs/reference/plot.mkinfit-3.png b/docs/reference/plot.mkinfit-3.png Binary files differindex 59cf8f8d..28789544 100644 --- a/docs/reference/plot.mkinfit-3.png +++ b/docs/reference/plot.mkinfit-3.png diff --git a/docs/reference/plot.mkinfit-4.png b/docs/reference/plot.mkinfit-4.png Binary files differindex d9867952..edea6fce 100644 --- a/docs/reference/plot.mkinfit-4.png +++ b/docs/reference/plot.mkinfit-4.png diff --git a/docs/reference/plot.mkinfit-5.png b/docs/reference/plot.mkinfit-5.png Binary files differindex 1109c8df..b4b6528b 100644 --- a/docs/reference/plot.mkinfit-5.png +++ b/docs/reference/plot.mkinfit-5.png diff --git a/docs/reference/plot.mkinfit-6.png b/docs/reference/plot.mkinfit-6.png Binary files differindex 230c90e9..a939f8e9 100644 --- a/docs/reference/plot.mkinfit-6.png +++ b/docs/reference/plot.mkinfit-6.png diff --git a/docs/reference/plot.mkinfit-7.png b/docs/reference/plot.mkinfit-7.png Binary files differindex b23427b5..ae7807a8 100644 --- a/docs/reference/plot.mkinfit-7.png +++ b/docs/reference/plot.mkinfit-7.png diff --git a/docs/reference/plot.mkinfit.html b/docs/reference/plot.mkinfit.html index f78ccf73..b82a8170 100644 --- a/docs/reference/plot.mkinfit.html +++ b/docs/reference/plot.mkinfit.html @@ -74,7 +74,7 @@ observed data together with the solution of the fitted model." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -111,6 +111,9 @@ observed data together with the solution of the fitted model." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -119,7 +122,7 @@ observed data together with the solution of the fitted model." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -138,7 +141,7 @@ observed data together with the solution of the fitted model." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Plot the observed data and the fitted model of an mkinfit object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/plot.mkinfit.R'><code>R/plot.mkinfit.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/plot.mkinfit.R'><code>R/plot.mkinfit.R</code></a></small> <div class="hidden name"><code>plot.mkinfit.Rd</code></div> </div> @@ -149,49 +152,49 @@ observed data together with the solution of the fitted model.</p> </div> <pre class="usage"><span class='co'># S3 method for mkinfit</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>( - <span class='no'>x</span>, - <span class='kw'>fit</span> <span class='kw'>=</span> <span class='no'>x</span>, - <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>fit</span>$<span class='no'>mkinmod</span>$<span class='no'>map</span>), - <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>, - <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Observed"</span>, - <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/range.html'>range</a></span>(<span class='no'>fit</span>$<span class='no'>data</span>$<span class='no'>time</span>), - <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='st'>"default"</span>, - <span class='kw'>col_obs</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>obs_vars</span>), - <span class='kw'>pch_obs</span> <span class='kw'>=</span> <span class='no'>col_obs</span>, - <span class='kw'>lty_obs</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='fl'>1</span>, <span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>obs_vars</span>)), - <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>legend</span> <span class='kw'>=</span> !<span class='no'>add</span>, - <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>show_errplot</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>maxabs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>rel.height.middle</span> <span class='kw'>=</span> <span class='fl'>0.9</span>, - <span class='kw'>row_layout</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='st'>"topright"</span>, - <span class='kw'>inset</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.05</span>, <span class='fl'>0.05</span>), - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>errmin_digits</span> <span class='kw'>=</span> <span class='fl'>3</span>, - <span class='kw'>frame</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='no'>...</span> -) - -<span class='fu'>plot_sep</span>( - <span class='no'>fit</span>, - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='no'>fit</span>$<span class='no'>err_mod</span>, <span class='st'>"const"</span>), <span class='fl'>TRUE</span>, <span class='st'>"standardized"</span>), - <span class='no'>...</span> -) - -<span class='fu'>plot_res</span>( - <span class='no'>fit</span>, - <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='no'>sep_obs</span>, - <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='no'>fit</span>$<span class='no'>err_mod</span>, <span class='st'>"const"</span>), <span class='fl'>FALSE</span>, <span class='fl'>TRUE</span>), - <span class='no'>...</span> -) - -<span class='fu'>plot_err</span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='no'>sep_obs</span>, <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span> + <span class='va'>x</span>, + fit <span class='op'>=</span> <span class='va'>x</span>, + obs_vars <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>$</span><span class='va'>mkinmod</span><span class='op'>$</span><span class='va'>map</span><span class='op'>)</span>, + xlab <span class='op'>=</span> <span class='st'>"Time"</span>, + ylab <span class='op'>=</span> <span class='st'>"Observed"</span>, + xlim <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/range.html'>range</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>$</span><span class='va'>data</span><span class='op'>$</span><span class='va'>time</span><span class='op'>)</span>, + ylim <span class='op'>=</span> <span class='st'>"default"</span>, + col_obs <span class='op'>=</span> <span class='fl'>1</span><span class='op'>:</span><span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span><span class='op'>(</span><span class='va'>obs_vars</span><span class='op'>)</span>, + pch_obs <span class='op'>=</span> <span class='va'>col_obs</span>, + lty_obs <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span><span class='op'>(</span><span class='fl'>1</span>, <span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span><span class='op'>(</span><span class='va'>obs_vars</span><span class='op'>)</span><span class='op'>)</span>, + add <span class='op'>=</span> <span class='cn'>FALSE</span>, + legend <span class='op'>=</span> <span class='op'>!</span><span class='va'>add</span>, + show_residuals <span class='op'>=</span> <span class='cn'>FALSE</span>, + show_errplot <span class='op'>=</span> <span class='cn'>FALSE</span>, + maxabs <span class='op'>=</span> <span class='st'>"auto"</span>, + sep_obs <span class='op'>=</span> <span class='cn'>FALSE</span>, + rel.height.middle <span class='op'>=</span> <span class='fl'>0.9</span>, + row_layout <span class='op'>=</span> <span class='cn'>FALSE</span>, + lpos <span class='op'>=</span> <span class='st'>"topright"</span>, + inset <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>0.05</span>, <span class='fl'>0.05</span><span class='op'>)</span>, + show_errmin <span class='op'>=</span> <span class='cn'>FALSE</span>, + errmin_digits <span class='op'>=</span> <span class='fl'>3</span>, + frame <span class='op'>=</span> <span class='cn'>TRUE</span>, + <span class='va'>...</span> +<span class='op'>)</span> + +<span class='fu'>plot_sep</span><span class='op'>(</span> + <span class='va'>fit</span>, + show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span>, + show_residuals <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>$</span><span class='va'>err_mod</span>, <span class='st'>"const"</span><span class='op'>)</span>, <span class='cn'>TRUE</span>, <span class='st'>"standardized"</span><span class='op'>)</span>, + <span class='va'>...</span> +<span class='op'>)</span> + +<span class='fu'>plot_res</span><span class='op'>(</span> + <span class='va'>fit</span>, + sep_obs <span class='op'>=</span> <span class='cn'>FALSE</span>, + show_errmin <span class='op'>=</span> <span class='va'>sep_obs</span>, + standardized <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>$</span><span class='va'>err_mod</span>, <span class='st'>"const"</span><span class='op'>)</span>, <span class='cn'>FALSE</span>, <span class='cn'>TRUE</span><span class='op'>)</span>, + <span class='va'>...</span> +<span class='op'>)</span> + +<span class='fu'>plot_err</span><span class='op'>(</span><span class='va'>fit</span>, sep_obs <span class='op'>=</span> <span class='cn'>FALSE</span>, show_errmin <span class='op'>=</span> <span class='va'>sep_obs</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -311,7 +314,7 @@ chi2 error percentage.</p></td> </tr> <tr> <th>...</th> - <td><p>Further arguments passed to <code><a href='https://rdrr.io/r/base/plot.html'>plot</a></code>.</p></td> + <td><p>Further arguments passed to <code><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></code>.</p></td> </tr> <tr> <th>standardized</th> @@ -328,22 +331,35 @@ standardized in the residual plot?</p></td> <p>If the current plot device is a <code><a href='https://rdrr.io/pkg/tikzDevice/man/tikz.html'>tikz</a></code> device, then latex is being used for the formatting of the chi2 error level, if <code>show_errmin = TRUE</code>.</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># One parent compound, one metabolite, both single first order, path from</span> <span class='co'># parent to sink included</span> <span class='co'># \dontrun{</span> -<span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Parent"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</span> ))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span>(<span class='no'>fit</span>, <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='img'><img src='plot.mkinfit-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_err</span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-4.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='va'>SFO_SFO</span> <span class='op'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, full <span class='op'>=</span> <span class='st'>"Parent"</span><span class='op'>)</span>, + m1 <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, full <span class='op'>=</span> <span class='st'>"Metabolite M1"</span> <span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_2006_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0165</span></div><div class='input'><span class='va'>fit</span> <span class='op'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_2006_D</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span><span class='op'>(</span><span class='va'>fit</span>, standardized <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_err</span><span class='op'>(</span><span class='va'>fit</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># Show the observed variables separately, with residuals</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>), - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-5.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fit</span>, sep_obs <span class='op'>=</span> <span class='cn'>TRUE</span>, show_residuals <span class='op'>=</span> <span class='cn'>TRUE</span>, lpos <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"topright"</span>, <span class='st'>"bottomright"</span><span class='op'>)</span>, + show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-5.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># The same can be obtained with less typing, using the convenience function plot_sep</span> -<span class='fu'>plot_sep</span>(<span class='no'>fit</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><div class='img'><img src='plot.mkinfit-6.png' alt='' width='700' height='433' /></div><div class='input'> +<span class='fu'>plot_sep</span><span class='op'>(</span><span class='va'>fit</span>, lpos <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"topright"</span>, <span class='st'>"bottomright"</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-6.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># Show the observed variables separately, with the error model</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_errplot</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>), - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-7.png' alt='' width='700' height='433' /></div><div class='input'># } +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fit</span>, sep_obs <span class='op'>=</span> <span class='cn'>TRUE</span>, show_errplot <span class='op'>=</span> <span class='cn'>TRUE</span>, lpos <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"topright"</span>, <span class='st'>"bottomright"</span><span class='op'>)</span>, + show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mkinfit-7.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># }</span> </div></pre> </div> @@ -361,7 +377,7 @@ latex is being used for the formatting of the chi2 error level, if </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/plot.mmkin-1.png b/docs/reference/plot.mmkin-1.png Binary files differindex 8cf969c9..438d5a53 100644 --- a/docs/reference/plot.mmkin-1.png +++ b/docs/reference/plot.mmkin-1.png diff --git a/docs/reference/plot.mmkin-2.png b/docs/reference/plot.mmkin-2.png Binary files differindex 45d67b55..ee04b3c4 100644 --- a/docs/reference/plot.mmkin-2.png +++ b/docs/reference/plot.mmkin-2.png diff --git a/docs/reference/plot.mmkin-3.png b/docs/reference/plot.mmkin-3.png Binary files differindex c58b371a..e06ed002 100644 --- a/docs/reference/plot.mmkin-3.png +++ b/docs/reference/plot.mmkin-3.png diff --git a/docs/reference/plot.mmkin-4.png b/docs/reference/plot.mmkin-4.png Binary files differindex 47cd7eec..5869df55 100644 --- a/docs/reference/plot.mmkin-4.png +++ b/docs/reference/plot.mmkin-4.png diff --git a/docs/reference/plot.mmkin-5.png b/docs/reference/plot.mmkin-5.png Binary files differindex 44037bb4..927c573b 100644 --- a/docs/reference/plot.mmkin-5.png +++ b/docs/reference/plot.mmkin-5.png diff --git a/docs/reference/plot.mmkin.html b/docs/reference/plot.mmkin.html index 6c9f2449..2003b210 100644 --- a/docs/reference/plot.mmkin.html +++ b/docs/reference/plot.mmkin.html @@ -76,7 +76,7 @@ the fit of at least one model to the same dataset is shown." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -113,6 +113,9 @@ the fit of at least one model to the same dataset is shown." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -121,7 +124,7 @@ the fit of at least one model to the same dataset is shown." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -141,31 +144,31 @@ the fit of at least one model to the same dataset is shown." /> <div class="page-header"> <h1>Plot model fits (observed and fitted) and the residuals for a row or column of an mmkin object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/plot.mmkin.R'><code>R/plot.mmkin.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/plot.mmkin.R'><code>R/plot.mmkin.R</code></a></small> <div class="hidden name"><code>plot.mmkin.Rd</code></div> </div> <div class="ref-description"> - <p>When x is a row selected from an mmkin object (<code><a href='Extract.mmkin.html'>[.mmkin</a></code>), the + <p>When x is a row selected from an mmkin object (<code><a href='[.mmkin.html'>[.mmkin</a></code>), the same model fitted for at least one dataset is shown. When it is a column, the fit of at least one model to the same dataset is shown.</p> </div> <pre class="usage"><span class='co'># S3 method for mmkin</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>( - <span class='no'>x</span>, - <span class='kw'>main</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>legends</span> <span class='kw'>=</span> <span class='fl'>1</span>, - <span class='kw'>resplot</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"time"</span>, <span class='st'>"errmod"</span>), - <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>errmin_var</span> <span class='kw'>=</span> <span class='st'>"All data"</span>, - <span class='kw'>errmin_digits</span> <span class='kw'>=</span> <span class='fl'>3</span>, - <span class='kw'>cex</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, - <span class='kw'>rel.height.middle</span> <span class='kw'>=</span> <span class='fl'>0.9</span>, - <span class='kw'>ymax</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='no'>...</span> -)</pre> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span> + <span class='va'>x</span>, + main <span class='op'>=</span> <span class='st'>"auto"</span>, + legends <span class='op'>=</span> <span class='fl'>1</span>, + resplot <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"time"</span>, <span class='st'>"errmod"</span><span class='op'>)</span>, + standardized <span class='op'>=</span> <span class='cn'>FALSE</span>, + show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span>, + errmin_var <span class='op'>=</span> <span class='st'>"All data"</span>, + errmin_digits <span class='op'>=</span> <span class='fl'>3</span>, + cex <span class='op'>=</span> <span class='fl'>0.7</span>, + rel.height.middle <span class='op'>=</span> <span class='fl'>0.9</span>, + ymax <span class='op'>=</span> <span class='st'>"auto"</span>, + <span class='va'>...</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -237,21 +240,30 @@ than two rows of plots are shown.</p></td> <p>If the current plot device is a <code><a href='https://rdrr.io/pkg/tikzDevice/man/tikz.html'>tikz</a></code> device, then latex is being used for the formatting of the chi2 error level.</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># \dontrun{</span> <span class='co'># Only use one core not to offend CRAN checks</span> - <span class='no'>fits</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"HS"</span>), - <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"FOCUS B"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_B</span>, <span class='st'>"FOCUS C"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_C</span>), <span class='co'># named list for titles</span> - <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> -#> <span class='warning'>iteration limit reached without convergence (10)</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='img'><img src='plot.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ])</div><div class='img'><img src='plot.mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ], <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='img'><img src='plot.mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='va'>fits</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='st'>"HS"</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"FOCUS B"</span> <span class='op'>=</span> <span class='va'>FOCUS_2006_B</span>, <span class='st'>"FOCUS C"</span> <span class='op'>=</span> <span class='va'>FOCUS_2006_C</span><span class='op'>)</span>, <span class='co'># named list for titles</span> + cores <span class='op'>=</span> <span class='fl'>1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> +#> <span class='warning'>iteration limit reached without convergence (10)</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits</span><span class='op'>[</span>, <span class='st'>"FOCUS C"</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span>, show_errmin <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># We can also plot a single fit, if we like the way plot.mmkin works, but then the plot</span> <span class='co'># height should be smaller than the plot width (this is not possible for the html pages</span> <span class='co'># generated by pkgdown, as far as I know).</span> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, <span class='st'>"FOCUS C"</span>]) <span class='co'># same as plot(fits[1, 2])</span></div><div class='img'><img src='plot.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='st'>"FOCUS C"</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># same as plot(fits[1, 2])</span> +</div><div class='img'><img src='plot.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># Show the error models</span> - <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ], <span class='kw'>resplot</span> <span class='kw'>=</span> <span class='st'>"errmod"</span>)</div><div class='img'><img src='plot.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'> # } + <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>fits</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span>, resplot <span class='op'>=</span> <span class='st'>"errmod"</span><span class='op'>)</span> +</div><div class='img'><img src='plot.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># }</span> </div></pre> </div> @@ -269,7 +281,7 @@ latex is being used for the formatting of the chi2 error level.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/plot.nlme.mmkin-1.png b/docs/reference/plot.nlme.mmkin-1.png Binary files differindex fe2ef7d3..63ea381c 100644 --- a/docs/reference/plot.nlme.mmkin-1.png +++ b/docs/reference/plot.nlme.mmkin-1.png diff --git a/docs/reference/plot.nlme.mmkin-2.png b/docs/reference/plot.nlme.mmkin-2.png Binary files differindex c82d0271..df4c955e 100644 --- a/docs/reference/plot.nlme.mmkin-2.png +++ b/docs/reference/plot.nlme.mmkin-2.png diff --git a/docs/reference/plot.nlme.mmkin.html b/docs/reference/plot.nlme.mmkin.html index 17ec06cf..82d73dfb 100644 --- a/docs/reference/plot.nlme.mmkin.html +++ b/docs/reference/plot.nlme.mmkin.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -109,6 +109,9 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -117,7 +120,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -136,7 +139,7 @@ <div class="col-md-9 contents"> <div class="page-header"> <h1>Plot a fitted nonlinear mixed model obtained via an mmkin row object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/plot.nlme.mmkin.R'><code>R/plot.nlme.mmkin.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/plot.nlme.mmkin.R'><code>R/plot.nlme.mmkin.R</code></a></small> <div class="hidden name"><code>plot.nlme.mmkin.Rd</code></div> </div> @@ -145,21 +148,21 @@ </div> <pre class="usage"><span class='co'># S3 method for nlme.mmkin</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>( - <span class='no'>x</span>, - <span class='kw'>i</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fu'><a href='https://rdrr.io/r/base/nrow.html'>ncol</a></span>(<span class='no'>x</span>$<span class='no'>mmkin_orig</span>), - <span class='kw'>main</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='kw'>legends</span> <span class='kw'>=</span> <span class='fl'>1</span>, - <span class='kw'>resplot</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"time"</span>, <span class='st'>"errmod"</span>), - <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, - <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>errmin_var</span> <span class='kw'>=</span> <span class='st'>"All data"</span>, - <span class='kw'>errmin_digits</span> <span class='kw'>=</span> <span class='fl'>3</span>, - <span class='kw'>cex</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, - <span class='kw'>rel.height.middle</span> <span class='kw'>=</span> <span class='fl'>0.9</span>, - <span class='kw'>ymax</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, - <span class='no'>...</span> -)</pre> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span> + <span class='va'>x</span>, + i <span class='op'>=</span> <span class='fl'>1</span><span class='op'>:</span><span class='fu'><a href='https://rdrr.io/r/base/nrow.html'>ncol</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>$</span><span class='va'>mmkin_orig</span><span class='op'>)</span>, + main <span class='op'>=</span> <span class='st'>"auto"</span>, + legends <span class='op'>=</span> <span class='fl'>1</span>, + resplot <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"time"</span>, <span class='st'>"errmod"</span><span class='op'>)</span>, + standardized <span class='op'>=</span> <span class='cn'>FALSE</span>, + show_errmin <span class='op'>=</span> <span class='cn'>TRUE</span>, + errmin_var <span class='op'>=</span> <span class='st'>"All data"</span>, + errmin_digits <span class='op'>=</span> <span class='fl'>3</span>, + cex <span class='op'>=</span> <span class='fl'>0.7</span>, + rel.height.middle <span class='op'>=</span> <span class='fl'>0.9</span>, + ymax <span class='op'>=</span> <span class='st'>"auto"</span>, + <span class='va'>...</span> +<span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -231,17 +234,22 @@ than two rows of plots are shown.</p></td> <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> <p>The function is called for its side effect.</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='no'>ds</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>], - <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)], <span class='no'>name</span> <span class='kw'>==</span> <span class='st'>"parent"</span>)) -<span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='st'>"SFO"</span>, <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>) -<span class='co'>#plot(f) # too many panels for pkgdown</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f</span>[, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='plot.nlme.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>nlme</span>) -<span class='no'>f_nlme</span> <span class='kw'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>) + <pre class="examples"><div class='input'><span class='va'>ds</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>experimental_data_for_UBA_2019</span><span class='op'>[</span><span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>]</span>, + <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>$</span><span class='va'>data</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span><span class='op'>)</span><span class='op'>]</span>, <span class='va'>name</span> <span class='op'>==</span> <span class='st'>"parent"</span><span class='op'>)</span><span class='op'>)</span> +<span class='va'>f</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, cores <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0195</span></div><div class='output co'>#> <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.011</span></div><div class='input'><span class='co'>#plot(f) # too many panels for pkgdown</span> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='img'><img src='plot.nlme.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://svn.r-project.org/R-packages/trunk/nlme'>nlme</a></span><span class='op'>)</span> +<span class='va'>f_nlme</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>)</span> <span class='co'>#plot(f_nlme) # too many panels for pkgdown</span> -<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='plot.nlme.mmkin-2.png' alt='' width='700' height='433' /></div></pre> +<span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</span> +</div><div class='img'><img src='plot.nlme.mmkin-2.png' alt='' width='700' height='433' /></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar"> <nav id="toc" data-toggle="toc" class="sticky-top"> @@ -257,7 +265,7 @@ than two rows of plots are shown.</p></td> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/print.mkinds.html b/docs/reference/print.mkinds.html index af85c78f..7c7f6647 100644 --- a/docs/reference/print.mkinds.html +++ b/docs/reference/print.mkinds.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -109,6 +109,9 @@ <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -117,7 +120,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -136,7 +139,7 @@ <div class="col-md-9 contents"> <div class="page-header"> <h1>Print mkinds objects</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinds.R'><code>R/mkinds.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinds.R'><code>R/mkinds.R</code></a></small> <div class="hidden name"><code>print.mkinds.Rd</code></div> </div> @@ -145,7 +148,7 @@ </div> <pre class="usage"><span class='co'># S3 method for mkinds</span> -<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>x</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -176,7 +179,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/sigma_twocomp.html b/docs/reference/sigma_twocomp.html index 1e1f5798..26b08765 100644 --- a/docs/reference/sigma_twocomp.html +++ b/docs/reference/sigma_twocomp.html @@ -73,7 +73,7 @@ dependence of the measured value \(y\):" /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -110,6 +110,9 @@ dependence of the measured value \(y\):" /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -118,7 +121,7 @@ dependence of the measured value \(y\):" /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -137,7 +140,7 @@ dependence of the measured value \(y\):" /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Two-component error model</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/sigma_twocomp.R'><code>R/sigma_twocomp.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/sigma_twocomp.R'><code>R/sigma_twocomp.R</code></a></small> <div class="hidden name"><code>sigma_twocomp.Rd</code></div> </div> @@ -146,7 +149,7 @@ dependence of the measured value \(y\):" /> dependence of the measured value \(y\):</p> </div> - <pre class="usage"><span class='fu'>sigma_twocomp</span>(<span class='no'>y</span>, <span class='no'>sigma_low</span>, <span class='no'>rsd_high</span>)</pre> + <pre class="usage"><span class='fu'>sigma_twocomp</span><span class='op'>(</span><span class='va'>y</span>, <span class='va'>sigma_low</span>, <span class='va'>rsd_high</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -201,7 +204,7 @@ measurement error in analytical chemistry. Technometrics 37(2), 176-184.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index ad6217e6..a2ef3b75 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -76,7 +76,7 @@ values." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span> </span> </div> @@ -113,6 +113,9 @@ values." /> <li> <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a> </li> + <li> + <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a> + </li> </ul> </li> <li> @@ -121,7 +124,7 @@ values." /> </ul> <ul class="nav navbar-nav navbar-right"> <li> - <a href="http://github.com/jranke/mkin/"> + <a href="https://github.com/jranke/mkin/"> <span class="fab fa fab fa-github fa-lg"></span> </a> @@ -140,7 +143,7 @@ values." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Summary method for class "mkinfit"</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/summary.mkinfit.R'><code>R/summary.mkinfit.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/summary.mkinfit.R'><code>R/summary.mkinfit.R</code></a></small> <div class="hidden name"><code>summary.mkinfit.Rd</code></div> </div> @@ -153,10 +156,10 @@ values.</p> </div> <pre class="usage"><span class='co'># S3 method for mkinfit</span> -<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>object</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>distimes</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='no'>...</span>) +<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>object</span>, data <span class='op'>=</span> <span class='cn'>TRUE</span>, distimes <span class='op'>=</span> <span class='cn'>TRUE</span>, alpha <span class='op'>=</span> <span class='fl'>0.05</span>, <span class='va'>...</span><span class='op'>)</span> <span class='co'># S3 method for summary.mkinfit</span> -<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span>(<span class='fl'>3</span>, <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span>(<span class='st'>"digits"</span>) - <span class='fl'>3</span>), <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>x</span>, digits <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span><span class='op'>(</span><span class='fl'>3</span>, <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span><span class='op'>(</span><span class='st'>"digits"</span><span class='op'>)</span> <span class='op'>-</span> <span class='fl'>3</span><span class='op'>)</span>, <span class='va'>...</span><span class='op'>)</span></pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2> <table class="ref-arguments"> @@ -226,20 +229,24 @@ and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, <a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> - <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)), <span class='no'>FOCUS_2006_A</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> mkin version used for fitting: 0.9.50.2 -#> R version used for fitting: 4.0.0 -#> Date of fit: Wed May 27 07:05:18 2020 -#> Date of summary: Wed May 27 07:05:18 2020 + <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span>, <span class='va'>FOCUS_2006_A</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> mkin version used for fitting: 0.9.50.3 +#> R version used for fitting: 4.0.3 +#> Date of fit: Thu Oct 15 12:41:58 2020 +#> Date of summary: Thu Oct 15 12:41:58 2020 #> #> Equations: #> d_parent/dt = - k_parent * parent #> #> Model predictions using solution type analytical #> -#> Fitted using 131 model solutions performed in 0.026 s +#> Fitted using 131 model solutions performed in 0.029 s #> #> Error model: Constant variance #> @@ -271,9 +278,9 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, #> #> Parameter correlation: #> parent_0 log_k_parent sigma -#> parent_0 1.000e+00 5.428e-01 1.648e-07 -#> log_k_parent 5.428e-01 1.000e+00 2.513e-07 -#> sigma 1.648e-07 2.513e-07 1.000e+00 +#> parent_0 1.000e+00 5.428e-01 1.642e-07 +#> log_k_parent 5.428e-01 1.000e+00 2.507e-07 +#> sigma 1.642e-07 2.507e-07 1.000e+00 #> #> Backtransformed parameters: #> Confidence intervals for internally transformed parameters are asymmetric. @@ -319,7 +326,7 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, </div> <div class="pkgdown"> - <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p> + <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p> </div> </footer> |