diff options
author | Johannes Ranke <johannes.ranke@jrwb.de> | 2025-02-14 09:15:20 +0100 |
---|---|---|
committer | Johannes Ranke <johannes.ranke@jrwb.de> | 2025-02-14 09:15:20 +0100 |
commit | 91a5834dd701211f929fd25419dc34561ce3b4e7 (patch) | |
tree | 860862d680fea23581d08b2948c5ac3e922a8447 /docs/dev/reference | |
parent | b0f08271d1dae8ffaf57f557c27eba1314ece1d5 (diff) |
Diffstat (limited to 'docs/dev/reference')
241 files changed, 19875 insertions, 0 deletions
diff --git a/docs/dev/reference/AIC.mmkin.html b/docs/dev/reference/AIC.mmkin.html new file mode 100644 index 00000000..06b92093 --- /dev/null +++ b/docs/dev/reference/AIC.mmkin.html @@ -0,0 +1,175 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate the AIC for a column of an mmkin object — AIC.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate the AIC for a column of an mmkin object — AIC.mmkin"><meta name="description" content="Provides a convenient way to compare different kinetic models fitted to the +same dataset."><meta property="og:description" content="Provides a convenient way to compare different kinetic models fitted to the +same dataset."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Calculate the AIC for a column of an mmkin object</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/AIC.mmkin.R" class="external-link"><code>R/AIC.mmkin.R</code></a></small> + <div class="d-none name"><code>AIC.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Provides a convenient way to compare different kinetic models fitted to the +same dataset.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">BIC</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An object of class <code><a href="mmkin.html">mmkin</a></code>, containing only one +column.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>For compatibility with the generic method</p></dd> + + +<dt id="arg-k">k<a class="anchor" aria-label="anchor" href="#arg-k"></a></dt> +<dd><p>As in the generic method</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>As in the generic method (a numeric value for single fits, or a +dataframe if there are several fits in the column).</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># skip, as it takes > 10 s on winbuilder</span></span></span> +<span class="r-in"><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" class="external-link">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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"FOCUS A"</span> <span class="op">=</span> <span class="va">FOCUS_2006_A</span>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Optimisation did not converge:</span> +<span class="r-wrn co"><span class="r-pr">#></span> false convergence (8)</span> +<span class="r-in"><span> <span class="co"># We get a warning because the FOMC model does not converge for the</span></span></span> +<span class="r-in"><span> <span class="co"># FOCUS A dataset, as it is well described by SFO</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 55.28197</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 55.28197</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># For FOCUS A, the models fit almost equally well, so the higher the number</span></span></span> +<span class="r-in"><span> <span class="co"># of parameters, the higher (worse) the AIC</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> df AIC</span> +<span class="r-out co"><span class="r-pr">#></span> SFO 3 55.28197</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC 4 57.28198</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP 5 59.28197</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> df AIC</span> +<span class="r-out co"><span class="r-pr">#></span> SFO 3 49.28197</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC 4 49.28198</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP 5 49.28197</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> df BIC</span> +<span class="r-out co"><span class="r-pr">#></span> SFO 3 55.52030</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC 4 57.59974</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP 5 59.67918</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># For FOCUS C, the more complex models fit better</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> df AIC</span> +<span class="r-out co"><span class="r-pr">#></span> SFO 3 59.29336</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC 4 44.68652</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP 5 29.02372</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> df BIC</span> +<span class="r-out co"><span class="r-pr">#></span> SFO 3 59.88504</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC 4 45.47542</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP 5 30.00984</span> +<span class="r-in"><span> </span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/BIC.mmkin.html b/docs/dev/reference/BIC.mmkin.html new file mode 100644 index 00000000..d84916d6 --- /dev/null +++ b/docs/dev/reference/BIC.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/AIC.mmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/AIC.mmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/CAKE_export.html b/docs/dev/reference/CAKE_export.html new file mode 100644 index 00000000..026bc3da --- /dev/null +++ b/docs/dev/reference/CAKE_export.html @@ -0,0 +1,178 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Export a list of datasets format to a CAKE study file — CAKE_export • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Export a list of datasets format to a CAKE study file — CAKE_export"><meta name="description" content="In addition to the datasets, the pathways in the degradation model can be +specified as well."><meta property="og:description" content="In addition to the datasets, the pathways in the degradation model can be +specified as well."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Export a list of datasets format to a CAKE study file</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/CAKE_export.R" class="external-link"><code>R/CAKE_export.R</code></a></small> + <div class="d-none name"><code>CAKE_export.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>In addition to the datasets, the pathways in the degradation model can be +specified as well.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">CAKE_export</span><span class="op">(</span></span> +<span> <span class="va">ds</span>,</span> +<span> map <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="st">"Parent"</span><span class="op">)</span>,</span> +<span> links <span class="op">=</span> <span class="cn">NA</span>,</span> +<span> filename <span class="op">=</span> <span class="st">"CAKE_export.csf"</span>,</span> +<span> path <span class="op">=</span> <span class="st">"."</span>,</span> +<span> overwrite <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> study <span class="op">=</span> <span class="st">"Degradinol aerobic soil degradation"</span>,</span> +<span> description <span class="op">=</span> <span class="st">""</span>,</span> +<span> time_unit <span class="op">=</span> <span class="st">"days"</span>,</span> +<span> res_unit <span class="op">=</span> <span class="st">"% AR"</span>,</span> +<span> comment <span class="op">=</span> <span class="st">""</span>,</span> +<span> date <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.Date</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> optimiser <span class="op">=</span> <span class="st">"IRLS"</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-ds">ds<a class="anchor" aria-label="anchor" href="#arg-ds"></a></dt> +<dd><p>A named list of datasets in long format as compatible with +<code><a href="mkinfit.html">mkinfit</a></code>.</p></dd> + + +<dt id="arg-map">map<a class="anchor" aria-label="anchor" href="#arg-map"></a></dt> +<dd><p>A character vector with CAKE compartment names (Parent, A1, ...), +named with the names used in the list of datasets.</p></dd> + + +<dt id="arg-links">links<a class="anchor" aria-label="anchor" href="#arg-links"></a></dt> +<dd><p>An optional character vector of target compartments, named with +the names of the source compartments. In order to make this easier, the +names are used as in the datasets supplied.</p></dd> + + +<dt id="arg-filename">filename<a class="anchor" aria-label="anchor" href="#arg-filename"></a></dt> +<dd><p>Where to write the result. Should end in .csf in order to be +compatible with CAKE.</p></dd> + + +<dt id="arg-path">path<a class="anchor" aria-label="anchor" href="#arg-path"></a></dt> +<dd><p>An optional path to the output file.</p></dd> + + +<dt id="arg-overwrite">overwrite<a class="anchor" aria-label="anchor" href="#arg-overwrite"></a></dt> +<dd><p>If TRUE, existing files are overwritten.</p></dd> + + +<dt id="arg-study">study<a class="anchor" aria-label="anchor" href="#arg-study"></a></dt> +<dd><p>The name of the study.</p></dd> + + +<dt id="arg-description">description<a class="anchor" aria-label="anchor" href="#arg-description"></a></dt> +<dd><p>An optional description.</p></dd> + + +<dt id="arg-time-unit">time_unit<a class="anchor" aria-label="anchor" href="#arg-time-unit"></a></dt> +<dd><p>The time unit for the residue data.</p></dd> + + +<dt id="arg-res-unit">res_unit<a class="anchor" aria-label="anchor" href="#arg-res-unit"></a></dt> +<dd><p>The unit used for the residues.</p></dd> + + +<dt id="arg-comment">comment<a class="anchor" aria-label="anchor" href="#arg-comment"></a></dt> +<dd><p>An optional comment.</p></dd> + + +<dt id="arg-date">date<a class="anchor" aria-label="anchor" href="#arg-date"></a></dt> +<dd><p>The date of file creation.</p></dd> + + +<dt id="arg-optimiser">optimiser<a class="anchor" aria-label="anchor" href="#arg-optimiser"></a></dt> +<dd><p>Can be OLS or IRLS.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The function is called for its side effect.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/D24_2014.html b/docs/dev/reference/D24_2014.html new file mode 100644 index 00000000..890e91d8 --- /dev/null +++ b/docs/dev/reference/D24_2014.html @@ -0,0 +1,218 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014 • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 — D24_2014"><meta name="description" content="The five datasets were extracted from the active substance evaluation dossier +published by EFSA. Kinetic evaluations shown for these datasets are intended +to illustrate and advance kinetic modelling. The fact that these data and +some results are shown here does not imply a license to use them in the +context of pesticide registrations, as the use of the data may be +constrained by data protection regulations."><meta property="og:description" content="The five datasets were extracted from the active substance evaluation dossier +published by EFSA. Kinetic evaluations shown for these datasets are intended +to illustrate and advance kinetic modelling. The fact that these data and +some results are shown here does not imply a license to use them in the +context of pesticide registrations, as the use of the data may be +constrained by data protection regulations."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Aerobic soil degradation data on 2,4-D from the EU assessment in 2014</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/D24_2014.R" class="external-link"><code>R/D24_2014.R</code></a></small> + <div class="d-none name"><code>D24_2014.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The five datasets were extracted from the active substance evaluation dossier +published by EFSA. Kinetic evaluations shown for these datasets are intended +to illustrate and advance kinetic modelling. The fact that these data and +some results are shown here does not imply a license to use them in the +context of pesticide registrations, as the use of the data may be +constrained by data protection regulations.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">D24_2014</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>An <a href="mkindsg.html">mkindsg</a> object grouping five datasets</p> + </div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>Hellenic Ministry of Rural Development and Agriculture (2014) +Final addendum to the Renewal Assessment Report - public version - 2,4-D +Volume 3 Annex B.8 Fate and behaviour in the environment +https://open.efsa.europa.eu/study-inventory/EFSA-Q-2013-00811</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>Data for the first dataset are from p. 685. Data for the other four +datasets were used in the preprocessed versions given in the kinetics +section (p. 761ff.), with the exception of residues smaller than 1 for DCP +in the soil from Site I2, where the values given on p. 694 were used.</p> +<p>The R code used to create this data object is installed with this package +in the 'dataset_generation' directory. In the code, page numbers are given for +specific pieces of information in the comments.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">D24_2014</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkindsg> holding 5 mkinds objects</span> +<span class="r-out co"><span class="r-pr">#></span> Title $title: Aerobic soil degradation data on 2,4-D from the EU assessment in 2014 </span> +<span class="r-out co"><span class="r-pr">#></span> Occurrence of observed compounds $observed_n:</span> +<span class="r-out co"><span class="r-pr">#></span> D24 DCP DCA </span> +<span class="r-out co"><span class="r-pr">#></span> 5 4 4 </span> +<span class="r-out co"><span class="r-pr">#></span> Time normalisation factors $f_time_norm:</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.6062378 0.7118732 0.7156063 0.7156063 0.8977124</span> +<span class="r-out co"><span class="r-pr">#></span> Meta information $meta:</span> +<span class="r-out co"><span class="r-pr">#></span> study usda_soil_type study_moisture_ref_type</span> +<span class="r-out co"><span class="r-pr">#></span> Mississippi Cohen 1991 Silt loam <NA></span> +<span class="r-out co"><span class="r-pr">#></span> Fayette Liu and Adelfinskaya 2011 Silt loam pF1</span> +<span class="r-out co"><span class="r-pr">#></span> RefSol 03-G Liu and Adelfinskaya 2011 Loam pF1</span> +<span class="r-out co"><span class="r-pr">#></span> Site E1 Liu and Adelfinskaya 2011 Loam pF1</span> +<span class="r-out co"><span class="r-pr">#></span> Site I2 Liu and Adelfinskaya 2011 Loamy sand pF1</span> +<span class="r-out co"><span class="r-pr">#></span> rel_moisture temperature</span> +<span class="r-out co"><span class="r-pr">#></span> Mississippi NA 25</span> +<span class="r-out co"><span class="r-pr">#></span> Fayette 0.5 20</span> +<span class="r-out co"><span class="r-pr">#></span> RefSol 03-G 0.5 20</span> +<span class="r-out co"><span class="r-pr">#></span> Site E1 0.5 20</span> +<span class="r-out co"><span class="r-pr">#></span> Site I2 0.5 20</span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">D24_2014</span><span class="op">$</span><span class="va">ds</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span>, data <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Mississippi </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: D24 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 2, 4, 7, 15, 24, 35, 56, 71, 114, 183, 273, 365 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 1 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> time D24</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0 96.8</span> +<span class="r-out co"><span class="r-pr">#></span> 2 2 81.0</span> +<span class="r-out co"><span class="r-pr">#></span> 3 4 81.7</span> +<span class="r-out co"><span class="r-pr">#></span> 4 7 88.2</span> +<span class="r-out co"><span class="r-pr">#></span> 5 15 66.3</span> +<span class="r-out co"><span class="r-pr">#></span> 6 24 72.9</span> +<span class="r-out co"><span class="r-pr">#></span> 7 35 62.6</span> +<span class="r-out co"><span class="r-pr">#></span> 8 56 54.6</span> +<span class="r-out co"><span class="r-pr">#></span> 9 71 35.2</span> +<span class="r-out co"><span class="r-pr">#></span> 10 114 18.0</span> +<span class="r-out co"><span class="r-pr">#></span> 11 183 11.3</span> +<span class="r-out co"><span class="r-pr">#></span> 12 273 9.9</span> +<span class="r-out co"><span class="r-pr">#></span> 13 365 6.3</span> +<span class="r-in"><span><span class="va">m_D24</span> <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>D24 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"DCP"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> DCP <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"DCA"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> DCA <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">m_D24</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkinmod> model generated with</span> +<span class="r-out co"><span class="r-pr">#></span> Use of formation fractions $use_of_ff: max </span> +<span class="r-out co"><span class="r-pr">#></span> Specification $spec:</span> +<span class="r-out co"><span class="r-pr">#></span> $D24</span> +<span class="r-out co"><span class="r-pr">#></span> $type: SFO; $to: DCP; $sink: TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> $DCP</span> +<span class="r-out co"><span class="r-pr">#></span> $type: SFO; $to: DCA; $sink: TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> $DCA</span> +<span class="r-out co"><span class="r-pr">#></span> $type: SFO; $sink: TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> Coefficient matrix $coefmat available</span> +<span class="r-out co"><span class="r-pr">#></span> Compiled model $cf available</span> +<span class="r-out co"><span class="r-pr">#></span> Differential equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_D24/dt = - k_D24 * D24</span> +<span class="r-out co"><span class="r-pr">#></span> d_DCP/dt = + f_D24_to_DCP * k_D24 * D24 - k_DCP * DCP</span> +<span class="r-out co"><span class="r-pr">#></span> d_DCA/dt = + f_DCP_to_DCA * k_DCP * DCP - k_DCA * DCA</span> +<span class="r-in"><span><span class="va">m_D24_2</span> <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>D24 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, to <span class="op">=</span> <span class="st">"DCP"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> DCP <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"DCA"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> DCA <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">m_D24_2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkinmod> model generated with</span> +<span class="r-out co"><span class="r-pr">#></span> Use of formation fractions $use_of_ff: max </span> +<span class="r-out co"><span class="r-pr">#></span> Specification $spec:</span> +<span class="r-out co"><span class="r-pr">#></span> $D24</span> +<span class="r-out co"><span class="r-pr">#></span> $type: DFOP; $to: DCP; $sink: TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> $DCP</span> +<span class="r-out co"><span class="r-pr">#></span> $type: SFO; $to: DCA; $sink: TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> $DCA</span> +<span class="r-out co"><span class="r-pr">#></span> $type: SFO; $sink: TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> Compiled model $cf available</span> +<span class="r-out co"><span class="r-pr">#></span> Differential equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_D24/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> +<span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> +<span class="r-out co"><span class="r-pr">#></span> * D24</span> +<span class="r-out co"><span class="r-pr">#></span> d_DCP/dt = + f_D24_to_DCP * ((k1 * g * exp(-k1 * time) + k2 * (1 - g) *</span> +<span class="r-out co"><span class="r-pr">#></span> exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2</span> +<span class="r-out co"><span class="r-pr">#></span> * time))) * D24 - k_DCP * DCP</span> +<span class="r-out co"><span class="r-pr">#></span> d_DCA/dt = + f_DCP_to_DCA * k_DCP * DCP - k_DCA * DCA</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/DFOP.solution-1.png b/docs/dev/reference/DFOP.solution-1.png Binary files differnew file mode 100644 index 00000000..6b78836f --- /dev/null +++ b/docs/dev/reference/DFOP.solution-1.png diff --git a/docs/dev/reference/DFOP.solution.html b/docs/dev/reference/DFOP.solution.html new file mode 100644 index 00000000..633e909c --- /dev/null +++ b/docs/dev/reference/DFOP.solution.html @@ -0,0 +1,155 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Double First-Order in Parallel kinetics — DFOP.solution • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Double First-Order in Parallel kinetics — DFOP.solution"><meta name="description" content="Function describing decline from a defined starting value using the sum of +two exponential decline functions."><meta property="og:description" content="Function describing decline from a defined starting value using the sum of +two exponential decline functions."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Double First-Order in Parallel kinetics</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parent_solutions.R" class="external-link"><code>R/parent_solutions.R</code></a></small> + <div class="d-none name"><code>DFOP.solution.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Function describing decline from a defined starting value using the sum of +two exponential decline functions.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-t">t<a class="anchor" aria-label="anchor" href="#arg-t"></a></dt> +<dd><p>Time.</p></dd> + + +<dt id="arg-parent-">parent_0<a class="anchor" aria-label="anchor" href="#arg-parent-"></a></dt> +<dd><p>Starting value for the response variable at time zero.</p></dd> + + +<dt id="arg-k-">k1<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>First kinetic constant.</p></dd> + + +<dt id="arg-k-">k2<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>Second kinetic constant.</p></dd> + + +<dt id="arg-g">g<a class="anchor" aria-label="anchor" href="#arg-g"></a></dt> +<dd><p>Fraction of the starting value declining according to the first +kinetic constant.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The value of the response variable at time <code>t</code>.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a> +FOCUS (2014) “Generic guidance for Estimating Persistence +and Degradation Kinetics from Environmental Fate Studies on Pesticides in +EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, +Version 1.1, 18 December 2014 +<a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>Other parent solutions: +<code><a href="FOMC.solution.html">FOMC.solution</a>()</code>, +<code><a href="HS.solution.html">HS.solution</a>()</code>, +<code><a href="IORE.solution.html">IORE.solution</a>()</code>, +<code><a href="SFO.solution.html">SFO.solution</a>()</code>, +<code><a href="SFORB.solution.html">SFORB.solution</a>()</code>, +<code><a href="logistic.solution.html">logistic.solution</a>()</code></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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" class="external-link">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></span></span> +<span class="r-plt img"><img src="DFOP.solution-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/Extract.mmkin.html b/docs/dev/reference/Extract.mmkin.html new file mode 100644 index 00000000..a7b231f4 --- /dev/null +++ b/docs/dev/reference/Extract.mmkin.html @@ -0,0 +1,187 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Subsetting method for mmkin objects — [.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Subsetting method for mmkin objects — [.mmkin"><meta name="description" content="Subsetting method for mmkin objects"><meta property="og:description" content="Subsetting method for mmkin objects"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Subsetting method for mmkin objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mmkin.R" class="external-link"><code>R/mmkin.R</code></a></small> + <div class="d-none name"><code>Extract.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Subsetting method for mmkin objects</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="va">x</span><span class="op">[</span><span class="va">i</span>, <span class="va">j</span>, <span class="va">...</span>, drop <span class="op">=</span> <span class="cn">FALSE</span><span class="op">]</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An <code><a href="mmkin.html">mmkin</a> object</code></p></dd> + + +<dt id="arg-i">i<a class="anchor" aria-label="anchor" href="#arg-i"></a></dt> +<dd><p>Row index selecting the fits for specific models</p></dd> + + +<dt id="arg-j">j<a class="anchor" aria-label="anchor" href="#arg-j"></a></dt> +<dd><p>Column index selecting the fits to specific datasets</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used, only there to satisfy the generic method definition</p></dd> + + +<dt id="arg-drop">drop<a class="anchor" aria-label="anchor" href="#arg-drop"></a></dt> +<dd><p>If FALSE, the method always returns an mmkin object, otherwise +either a list of mkinfit objects or a single mkinfit object.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>An object of class <code><a href="mmkin.html">mmkin</a></code>.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># Only use one core, to pass R CMD check --as-cran</span></span></span> +<span class="r-in"><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" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"FOMC"</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>B <span class="op">=</span> <span class="va">FOCUS_2006_B</span>, C <span class="op">=</span> <span class="va">FOCUS_2006_C</span><span class="op">)</span>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="va">fits</span><span class="op">[</span><span class="st">"FOMC"</span>, <span class="op">]</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mmkin> object</span> +<span class="r-out co"><span class="r-pr">#></span> Status of individual fits:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model B C </span> +<span class="r-out co"><span class="r-pr">#></span> FOMC OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> OK: No warnings</span> +<span class="r-in"><span> <span class="va">fits</span><span class="op">[</span>, <span class="st">"B"</span><span class="op">]</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mmkin> object</span> +<span class="r-out co"><span class="r-pr">#></span> Status of individual fits:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model B </span> +<span class="r-out co"><span class="r-pr">#></span> SFO OK</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC OK</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> OK: No warnings</span> +<span class="r-in"><span> <span class="va">fits</span><span class="op">[</span><span class="st">"SFO"</span>, <span class="st">"B"</span><span class="op">]</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mmkin> object</span> +<span class="r-out co"><span class="r-pr">#></span> Status of individual fits:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model B </span> +<span class="r-out co"><span class="r-pr">#></span> SFO OK</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> OK: No warnings</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> <span class="co"># This extracts an mkinfit object with lots of components</span></span></span> +<span class="r-in"><span> <span class="va">fits</span><span class="op">[[</span><span class="st">"FOMC"</span>, <span class="st">"B"</span><span class="op">]</span><span class="op">]</span></span></span> +<span class="r-in"><span> <span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $par</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_alpha log_beta sigma </span> +<span class="r-out co"><span class="r-pr">#></span> 99.666192 2.549850 5.050587 1.890202 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $objective</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 28.58291</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $convergence</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $iterations</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 21</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $evaluations</span> +<span class="r-out co"><span class="r-pr">#></span> function gradient </span> +<span class="r-out co"><span class="r-pr">#></span> 25 78 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $message</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "both X-convergence and relative convergence (5)"</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/FOCUS_2006_A.html b/docs/dev/reference/FOCUS_2006_A.html new file mode 100644 index 00000000..b819cd4d --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_A.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html"> + </head> +</html> + diff --git a/docs/dev/reference/FOCUS_2006_B.html b/docs/dev/reference/FOCUS_2006_B.html new file mode 100644 index 00000000..b819cd4d --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_B.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html"> + </head> +</html> + diff --git a/docs/dev/reference/FOCUS_2006_C.html b/docs/dev/reference/FOCUS_2006_C.html new file mode 100644 index 00000000..b819cd4d --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_C.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html"> + </head> +</html> + diff --git a/docs/dev/reference/FOCUS_2006_D.html b/docs/dev/reference/FOCUS_2006_D.html new file mode 100644 index 00000000..b819cd4d --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_D.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html"> + </head> +</html> + diff --git a/docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html b/docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html new file mode 100644 index 00000000..d315baa2 --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html @@ -0,0 +1,145 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B"><meta name="description" content="A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit."><meta property="og:description" content="A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Results of fitting the DFOP model to Datasets A to B of FOCUS (2006)</h1> + + <div class="d-none name"><code>FOCUS_2006_DFOP_ref_A_to_B.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">FOCUS_2006_DFOP_ref_A_to_B</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A data frame containing the following variables.</p><dl><dt><code>package</code></dt> +<dd><p>a factor giving the name of the software package</p></dd> + + <dt><code>M0</code></dt> +<dd><p>The fitted initial concentration of the parent compound</p></dd> + + <dt><code>f</code></dt> +<dd><p>The fitted f parameter</p></dd> + + <dt><code>k1</code></dt> +<dd><p>The fitted k1 parameter</p></dd> + + <dt><code>k2</code></dt> +<dd><p>The fitted k2 parameter</p></dd> + + <dt><code>DT50</code></dt> +<dd><p>The resulting half-life of the parent compound</p></dd> + + <dt><code>DT90</code></dt> +<dd><p>The resulting DT90 of the parent compound</p></dd> + + <dt><code>dataset</code></dt> +<dd><p>The FOCUS dataset that was used</p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence 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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">FOCUS_2006_DFOP_ref_A_to_B</span><span class="op">)</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/FOCUS_2006_E.html b/docs/dev/reference/FOCUS_2006_E.html new file mode 100644 index 00000000..b819cd4d --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_E.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html"> + </head> +</html> + diff --git a/docs/dev/reference/FOCUS_2006_F.html b/docs/dev/reference/FOCUS_2006_F.html new file mode 100644 index 00000000..b819cd4d --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_F.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/FOCUS_2006_datasets.html"> + </head> +</html> + diff --git a/docs/dev/reference/FOCUS_2006_FOMC_ref_A_to_F.html b/docs/dev/reference/FOCUS_2006_FOMC_ref_A_to_F.html new file mode 100644 index 00000000..24bf6df8 --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_FOMC_ref_A_to_F.html @@ -0,0 +1,142 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F"><meta name="description" content="A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit."><meta property="og:description" content="A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Results of fitting the FOMC model to Datasets A to F of FOCUS (2006)</h1> + + <div class="d-none name"><code>FOCUS_2006_FOMC_ref_A_to_F.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">FOCUS_2006_FOMC_ref_A_to_F</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A data frame containing the following variables.</p><dl><dt><code>package</code></dt> +<dd><p>a factor giving the name of the software package</p></dd> + + <dt><code>M0</code></dt> +<dd><p>The fitted initial concentration of the parent compound</p></dd> + + <dt><code>alpha</code></dt> +<dd><p>The fitted alpha parameter</p></dd> + + <dt><code>beta</code></dt> +<dd><p>The fitted beta parameter</p></dd> + + <dt><code>DT50</code></dt> +<dd><p>The resulting half-life of the parent compound</p></dd> + + <dt><code>DT90</code></dt> +<dd><p>The resulting DT90 of the parent compound</p></dd> + + <dt><code>dataset</code></dt> +<dd><p>The FOCUS dataset that was used</p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence 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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">FOCUS_2006_FOMC_ref_A_to_F</span><span class="op">)</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/FOCUS_2006_HS_ref_A_to_F.html b/docs/dev/reference/FOCUS_2006_HS_ref_A_to_F.html new file mode 100644 index 00000000..1f7fad2f --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_HS_ref_A_to_F.html @@ -0,0 +1,145 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F"><meta name="description" content="A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit."><meta property="og:description" content="A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Results of fitting the HS model to Datasets A to F of FOCUS (2006)</h1> + + <div class="d-none name"><code>FOCUS_2006_HS_ref_A_to_F.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">FOCUS_2006_HS_ref_A_to_F</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A data frame containing the following variables.</p><dl><dt><code>package</code></dt> +<dd><p>a factor giving the name of the software package</p></dd> + + <dt><code>M0</code></dt> +<dd><p>The fitted initial concentration of the parent compound</p></dd> + + <dt><code>tb</code></dt> +<dd><p>The fitted tb parameter</p></dd> + + <dt><code>k1</code></dt> +<dd><p>The fitted k1 parameter</p></dd> + + <dt><code>k2</code></dt> +<dd><p>The fitted k2 parameter</p></dd> + + <dt><code>DT50</code></dt> +<dd><p>The resulting half-life of the parent compound</p></dd> + + <dt><code>DT90</code></dt> +<dd><p>The resulting DT90 of the parent compound</p></dd> + + <dt><code>dataset</code></dt> +<dd><p>The FOCUS dataset that was used</p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence 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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">FOCUS_2006_HS_ref_A_to_F</span><span class="op">)</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/FOCUS_2006_SFO_ref_A_to_F.html b/docs/dev/reference/FOCUS_2006_SFO_ref_A_to_F.html new file mode 100644 index 00000000..39b06514 --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_SFO_ref_A_to_F.html @@ -0,0 +1,139 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F"><meta name="description" content="A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit."><meta property="og:description" content="A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Results of fitting the SFO model to Datasets A to F of FOCUS (2006)</h1> + + <div class="d-none name"><code>FOCUS_2006_SFO_ref_A_to_F.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>A table with the fitted parameters and the resulting DT50 and DT90 values +generated with different software packages. Taken directly from FOCUS (2006). +The results from fitting the data with the Topfit software was removed, as +the initial concentration of the parent compound was fixed to a value of 100 +in this fit.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">FOCUS_2006_SFO_ref_A_to_F</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A data frame containing the following variables.</p><dl><dt><code>package</code></dt> +<dd><p>a factor giving the name of the software package</p></dd> + + <dt><code>M0</code></dt> +<dd><p>The fitted initial concentration of the parent compound</p></dd> + + <dt><code>k</code></dt> +<dd><p>The fitted first-order degradation rate constant</p></dd> + + <dt><code>DT50</code></dt> +<dd><p>The resulting half-life of the parent compound</p></dd> + + <dt><code>DT90</code></dt> +<dd><p>The resulting DT90 of the parent compound</p></dd> + + <dt><code>dataset</code></dt> +<dd><p>The FOCUS dataset that was used</p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence 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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">FOCUS_2006_SFO_ref_A_to_F</span><span class="op">)</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/FOCUS_2006_datasets.html b/docs/dev/reference/FOCUS_2006_datasets.html new file mode 100644 index 00000000..a147a4f9 --- /dev/null +++ b/docs/dev/reference/FOCUS_2006_datasets.html @@ -0,0 +1,133 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets"><meta name="description" content="Data taken from FOCUS (2006), p. 258."><meta property="og:description" content="Data taken from FOCUS (2006), p. 258."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Datasets A to F from the FOCUS Kinetics report from 2006</h1> + + <div class="d-none name"><code>FOCUS_2006_datasets.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Data taken from FOCUS (2006), p. 258.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">FOCUS_2006_A</span></span> +<span> <span class="va">FOCUS_2006_B</span></span> +<span> <span class="va">FOCUS_2006_C</span></span> +<span> <span class="va">FOCUS_2006_D</span></span> +<span> <span class="va">FOCUS_2006_E</span></span> +<span> <span class="va">FOCUS_2006_F</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>6 datasets with observations on the following variables.</p><dl><dt><code>name</code></dt> +<dd><p>a factor containing the name of the observed variable</p></dd> + + <dt><code>time</code></dt> +<dd><p>a numeric vector containing time points</p></dd> + + <dt><code>value</code></dt> +<dd><p>a numeric vector containing concentrations in percent of applied radioactivity</p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence 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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">FOCUS_2006_C</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> name time value</span> +<span class="r-out co"><span class="r-pr">#></span> 1 parent 0 85.1</span> +<span class="r-out co"><span class="r-pr">#></span> 2 parent 1 57.9</span> +<span class="r-out co"><span class="r-pr">#></span> 3 parent 3 29.9</span> +<span class="r-out co"><span class="r-pr">#></span> 4 parent 7 14.6</span> +<span class="r-out co"><span class="r-pr">#></span> 5 parent 14 9.7</span> +<span class="r-out co"><span class="r-pr">#></span> 6 parent 28 6.6</span> +<span class="r-out co"><span class="r-pr">#></span> 7 parent 63 4.0</span> +<span class="r-out co"><span class="r-pr">#></span> 8 parent 91 3.9</span> +<span class="r-out co"><span class="r-pr">#></span> 9 parent 119 0.6</span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/FOMC.solution-1.png b/docs/dev/reference/FOMC.solution-1.png Binary files differnew file mode 100644 index 00000000..18a4b586 --- /dev/null +++ b/docs/dev/reference/FOMC.solution-1.png diff --git a/docs/dev/reference/FOMC.solution.html b/docs/dev/reference/FOMC.solution.html new file mode 100644 index 00000000..5d1f2443 --- /dev/null +++ b/docs/dev/reference/FOMC.solution.html @@ -0,0 +1,166 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>First-Order Multi-Compartment kinetics — FOMC.solution • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="First-Order Multi-Compartment kinetics — FOMC.solution"><meta name="description" content="Function describing exponential decline from a defined starting value, with +a decreasing rate constant."><meta property="og:description" content="Function describing exponential decline from a defined starting value, with +a decreasing rate constant."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>First-Order Multi-Compartment kinetics</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parent_solutions.R" class="external-link"><code>R/parent_solutions.R</code></a></small> + <div class="d-none name"><code>FOMC.solution.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Function describing exponential decline from a defined starting value, with +a decreasing rate constant.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-t">t<a class="anchor" aria-label="anchor" href="#arg-t"></a></dt> +<dd><p>Time.</p></dd> + + +<dt id="arg-parent-">parent_0<a class="anchor" aria-label="anchor" href="#arg-parent-"></a></dt> +<dd><p>Starting value for the response variable at time zero.</p></dd> + + +<dt id="arg-alpha">alpha<a class="anchor" aria-label="anchor" href="#arg-alpha"></a></dt> +<dd><p>Shape parameter determined by coefficient of variation of rate +constant values.</p></dd> + + +<dt id="arg-beta">beta<a class="anchor" aria-label="anchor" href="#arg-beta"></a></dt> +<dd><p>Location parameter.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The value of the response variable at time <code>t</code>.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>The form given here differs slightly from the original reference by +Gustafson and Holden (1990). The parameter <code>beta</code> corresponds to 1/beta +in the original equation.</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>The solution of the FOMC kinetic model reduces to the +<code><a href="SFO.solution.html">SFO.solution</a></code> for large values of <code>alpha</code> and <code>beta</code> +with \(k = \frac{\beta}{\alpha}\).</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> +<p>FOCUS (2014) “Generic guidance for Estimating Persistence +and Degradation Kinetics from Environmental Fate Studies on Pesticides in +EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, +Version 1.1, 18 December 2014 +<a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> +<p>Gustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil: +A new model based on spatial variability. <em>Environmental Science and +Technology</em> <b>24</b>, 1032-1038</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>Other parent solutions: +<code><a href="DFOP.solution.html">DFOP.solution</a>()</code>, +<code><a href="HS.solution.html">HS.solution</a>()</code>, +<code><a href="IORE.solution.html">IORE.solution</a>()</code>, +<code><a href="SFO.solution.html">SFO.solution</a>()</code>, +<code><a href="SFORB.solution.html">SFORB.solution</a>()</code>, +<code><a href="logistic.solution.html">logistic.solution</a>()</code></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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" class="external-link">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></span></span> +<span class="r-plt img"><img src="FOMC.solution-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/HS.solution-1.png b/docs/dev/reference/HS.solution-1.png Binary files differnew file mode 100644 index 00000000..61d89dbc --- /dev/null +++ b/docs/dev/reference/HS.solution-1.png diff --git a/docs/dev/reference/HS.solution.html b/docs/dev/reference/HS.solution.html new file mode 100644 index 00000000..d15e75dd --- /dev/null +++ b/docs/dev/reference/HS.solution.html @@ -0,0 +1,156 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Hockey-Stick kinetics — HS.solution • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Hockey-Stick kinetics — HS.solution"><meta name="description" content="Function describing two exponential decline functions with a break point +between them."><meta property="og:description" content="Function describing two exponential decline functions with a break point +between them."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Hockey-Stick kinetics</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parent_solutions.R" class="external-link"><code>R/parent_solutions.R</code></a></small> + <div class="d-none name"><code>HS.solution.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Function describing two exponential decline functions with a break point +between them.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-t">t<a class="anchor" aria-label="anchor" href="#arg-t"></a></dt> +<dd><p>Time.</p></dd> + + +<dt id="arg-parent-">parent_0<a class="anchor" aria-label="anchor" href="#arg-parent-"></a></dt> +<dd><p>Starting value for the response variable at time zero.</p></dd> + + +<dt id="arg-k-">k1<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>First kinetic constant.</p></dd> + + +<dt id="arg-k-">k2<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>Second kinetic constant.</p></dd> + + +<dt id="arg-tb">tb<a class="anchor" aria-label="anchor" href="#arg-tb"></a></dt> +<dd><p>Break point. Before this time, exponential decline according to +<code>k1</code> is calculated, after this time, exponential decline proceeds +according to <code>k2</code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The value of the response variable at time <code>t</code>.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a> +FOCUS (2014) “Generic guidance for Estimating Persistence +and Degradation Kinetics from Environmental Fate Studies on Pesticides in +EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, +Version 1.1, 18 December 2014 +<a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>Other parent solutions: +<code><a href="DFOP.solution.html">DFOP.solution</a>()</code>, +<code><a href="FOMC.solution.html">FOMC.solution</a>()</code>, +<code><a href="IORE.solution.html">IORE.solution</a>()</code>, +<code><a href="SFO.solution.html">SFO.solution</a>()</code>, +<code><a href="SFORB.solution.html">SFORB.solution</a>()</code>, +<code><a href="logistic.solution.html">logistic.solution</a>()</code></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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" class="external-link">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></span></span> +<span class="r-plt img"><img src="HS.solution-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/IORE.solution-1.png b/docs/dev/reference/IORE.solution-1.png Binary files differnew file mode 100644 index 00000000..54c9dcae --- /dev/null +++ b/docs/dev/reference/IORE.solution-1.png diff --git a/docs/dev/reference/IORE.solution.html b/docs/dev/reference/IORE.solution.html new file mode 100644 index 00000000..47cc1e3d --- /dev/null +++ b/docs/dev/reference/IORE.solution.html @@ -0,0 +1,171 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Indeterminate order rate equation kinetics — IORE.solution • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Indeterminate order rate equation kinetics — IORE.solution"><meta name="description" content="Function describing exponential decline from a defined starting value, with +a concentration dependent rate constant."><meta property="og:description" content="Function describing exponential decline from a defined starting value, with +a concentration dependent rate constant."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Indeterminate order rate equation kinetics</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parent_solutions.R" class="external-link"><code>R/parent_solutions.R</code></a></small> + <div class="d-none name"><code>IORE.solution.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Function describing exponential decline from a defined starting value, with +a concentration dependent rate constant.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-t">t<a class="anchor" aria-label="anchor" href="#arg-t"></a></dt> +<dd><p>Time.</p></dd> + + +<dt id="arg-parent-">parent_0<a class="anchor" aria-label="anchor" href="#arg-parent-"></a></dt> +<dd><p>Starting value for the response variable at time zero.</p></dd> + + +<dt id="arg-k-iore">k__iore<a class="anchor" aria-label="anchor" href="#arg-k-iore"></a></dt> +<dd><p>Rate constant. Note that this depends on the concentration +units used.</p></dd> + + +<dt id="arg-n">N<a class="anchor" aria-label="anchor" href="#arg-n"></a></dt> +<dd><p>Exponent describing the nonlinearity of the rate equation</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The value of the response variable at time <code>t</code>.</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>The solution of the IORE kinetic model reduces to the +<code><a href="SFO.solution.html">SFO.solution</a></code> if N = 1. The parameters of the IORE model can +be transformed to equivalent parameters of the FOMC mode - see the NAFTA +guidance for details.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>NAFTA Technical Working Group on Pesticides (not dated) Guidance +for Evaluating and Calculating Degradation Kinetics in Environmental Media</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>Other parent solutions: +<code><a href="DFOP.solution.html">DFOP.solution</a>()</code>, +<code><a href="FOMC.solution.html">FOMC.solution</a>()</code>, +<code><a href="HS.solution.html">HS.solution</a>()</code>, +<code><a href="SFO.solution.html">SFO.solution</a>()</code>, +<code><a href="SFORB.solution.html">SFORB.solution</a>()</code>, +<code><a href="logistic.solution.html">logistic.solution</a>()</code></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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" class="external-link">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></span></span> +<span class="r-plt img"><img src="IORE.solution-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-out co"><span class="r-pr">#></span> Error in is.loaded(initfunc, PACKAGE = dllname, type = "") : </span> +<span class="r-out co"><span class="r-pr">#></span> invalid 'PACKAGE' argument</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">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>,</span></span> +<span class="r-in"><span> row.names <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> fit.fomc.par fit.iore.par fit.iore.deS.par</span> +<span class="r-out co"><span class="r-pr">#></span> model par 1 85.87489063 85.874890 85.874890</span> +<span class="r-out co"><span class="r-pr">#></span> model par 2 0.05192238 -4.826631 -4.826631</span> +<span class="r-out co"><span class="r-pr">#></span> model par 3 0.65096665 1.949403 1.949403</span> +<span class="r-out co"><span class="r-pr">#></span> model par 4 1.85744396 1.857444 1.857444</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/cbind.html" class="external-link">rbind</a></span><span class="op">(</span>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>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back</span> +<span class="r-out co"><span class="r-pr">#></span> fomc 1.785233 15.1479 4.559973</span> +<span class="r-out co"><span class="r-pr">#></span> iore 1.785233 15.1479 4.559973</span> +<span class="r-out co"><span class="r-pr">#></span> iore.deS 1.785233 15.1479 4.559973</span> +<span class="r-in"><span> <span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/NAFTA_SOP_2015-1.png b/docs/dev/reference/NAFTA_SOP_2015-1.png Binary files differnew file mode 100644 index 00000000..98d4246c --- /dev/null +++ b/docs/dev/reference/NAFTA_SOP_2015-1.png diff --git a/docs/dev/reference/NAFTA_SOP_2015.html b/docs/dev/reference/NAFTA_SOP_2015.html new file mode 100644 index 00000000..3b176eed --- /dev/null +++ b/docs/dev/reference/NAFTA_SOP_2015.html @@ -0,0 +1,167 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015 • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015"><meta name="description" content="Data taken from US EPA (2015), p. 19 and 23."><meta property="og:description" content="Data taken from US EPA (2015), p. 19 and 23."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Example datasets from the NAFTA SOP published 2015</h1> + + <div class="d-none name"><code>NAFTA_SOP_2015.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Data taken from US EPA (2015), p. 19 and 23.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">NAFTA_SOP_Appendix_B</span></span> +<span> <span class="va">NAFTA_SOP_Appendix_D</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>2 datasets with observations on the following variables.</p><dl><dt><code>name</code></dt> +<dd><p>a factor containing the name of the observed variable</p></dd> + + <dt><code>time</code></dt> +<dd><p>a numeric vector containing time points</p></dd> + + <dt><code>value</code></dt> +<dd><p>a numeric vector containing concentrations</p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>NAFTA (2011) Guidance for evaluating and calculating degradation kinetics + in environmental media. NAFTA Technical Working Group on Pesticides + <a href="https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/guidance-evaluating-and-calculating-degradation" class="external-link">https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/guidance-evaluating-and-calculating-degradation</a> + accessed 2019-02-22</p> +<p>US EPA (2015) Standard Operating Procedure for Using the NAFTA Guidance to + Calculate Representative Half-life Values and Characterizing Pesticide + Degradation + <a href="https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance" class="external-link">https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span> <span class="va">nafta_evaluation</span> <span class="op"><-</span> <span class="fu"><a href="nafta.html">nafta</a></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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</span> +<span class="r-msg co"><span class="r-pr">#></span> The representative half-life of the IORE model is longer than the one corresponding</span> +<span class="r-msg co"><span class="r-pr">#></span> to the terminal degradation rate found with the DFOP model.</span> +<span class="r-msg co"><span class="r-pr">#></span> The representative half-life obtained from the DFOP model may be used</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">nafta_evaluation</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Sums of squares:</span> +<span class="r-out co"><span class="r-pr">#></span> SFO IORE DFOP </span> +<span class="r-out co"><span class="r-pr">#></span> 1378.6832 615.7730 517.8836 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Critical sum of squares for checking the SFO model:</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 717.4598</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> $SFO</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 83.7558 1.80e-14 77.18268 90.3288</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.0017 7.43e-05 0.00112 0.0026</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 8.7518 1.22e-05 5.64278 11.8608</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $IORE</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 9.69e+01 NA 8.88e+01 1.05e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k__iore_parent 8.40e-14 NA 1.79e-18 3.94e-09</span> +<span class="r-out co"><span class="r-pr">#></span> N_parent 6.68e+00 NA 4.19e+00 9.17e+00</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.85e+00 NA 3.76e+00 7.94e+00</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $DFOP</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 9.76e+01 1.94e-13 9.02e+01 1.05e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k1 4.24e-02 5.92e-03 2.03e-02 8.88e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k2 8.24e-04 6.48e-03 3.89e-04 1.75e-03</span> +<span class="r-out co"><span class="r-pr">#></span> g 2.88e-01 2.47e-05 1.95e-01 4.03e-01</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.36e+00 2.22e-05 3.43e+00 7.30e+00</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> DTx values:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50_rep</span> +<span class="r-out co"><span class="r-pr">#></span> SFO 407 1350 407</span> +<span class="r-out co"><span class="r-pr">#></span> IORE 541 5190000 1560000</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP 429 2380 841</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Representative half-life:</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 841.41</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">nafta_evaluation</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="NAFTA_SOP_2015-1.png" alt="" width="700" height="433"></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/NAFTA_SOP_Appendix_B.html b/docs/dev/reference/NAFTA_SOP_Appendix_B.html new file mode 100644 index 00000000..c3c9b055 --- /dev/null +++ b/docs/dev/reference/NAFTA_SOP_Appendix_B.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/NAFTA_SOP_2015.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/NAFTA_SOP_2015.html"> + </head> +</html> + diff --git a/docs/dev/reference/NAFTA_SOP_Appendix_D.html b/docs/dev/reference/NAFTA_SOP_Appendix_D.html new file mode 100644 index 00000000..c3c9b055 --- /dev/null +++ b/docs/dev/reference/NAFTA_SOP_Appendix_D.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/NAFTA_SOP_2015.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/NAFTA_SOP_2015.html"> + </head> +</html> + diff --git a/docs/dev/reference/NAFTA_SOP_Attachment-1.png b/docs/dev/reference/NAFTA_SOP_Attachment-1.png Binary files differnew file mode 100644 index 00000000..a6066441 --- /dev/null +++ b/docs/dev/reference/NAFTA_SOP_Attachment-1.png diff --git a/docs/dev/reference/NAFTA_SOP_Attachment.html b/docs/dev/reference/NAFTA_SOP_Attachment.html new file mode 100644 index 00000000..afae4f43 --- /dev/null +++ b/docs/dev/reference/NAFTA_SOP_Attachment.html @@ -0,0 +1,156 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment"><meta name="description" content="Data taken from from Attachment 1 of the SOP."><meta property="og:description" content="Data taken from from Attachment 1 of the SOP."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Example datasets from Attachment 1 to the NAFTA SOP published 2015</h1> + + <div class="d-none name"><code>NAFTA_SOP_Attachment.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Data taken from from Attachment 1 of the SOP.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">NAFTA_SOP_Attachment</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A list (NAFTA_SOP_Attachment) containing 16 datasets suitable + for the evaluation with <code><a href="nafta.html">nafta</a></code></p> + </div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>NAFTA (2011) Guidance for evaluating and calculating degradation kinetics + in environmental media. NAFTA Technical Working Group on Pesticides + <a href="https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/guidance-evaluating-and-calculating-degradation" class="external-link">https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/guidance-evaluating-and-calculating-degradation</a> + accessed 2019-02-22</p> +<p>US EPA (2015) Standard Operating Procedure for Using the NAFTA Guidance to + Calculate Representative Half-life Values and Characterizing Pesticide + Degradation + <a href="https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance" class="external-link">https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span> <span class="va">nafta_att_p5a</span> <span class="op"><-</span> <span class="fu"><a href="nafta.html">nafta</a></span><span class="op">(</span><span class="va">NAFTA_SOP_Attachment</span><span class="op">[[</span><span class="st">"p5a"</span><span class="op">]</span><span class="op">]</span>, cores <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</span> +<span class="r-msg co"><span class="r-pr">#></span> The half-life obtained from the IORE model may be used</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">nafta_att_p5a</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Sums of squares:</span> +<span class="r-out co"><span class="r-pr">#></span> SFO IORE DFOP </span> +<span class="r-out co"><span class="r-pr">#></span> 465.21753 56.27506 32.06401 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Critical sum of squares for checking the SFO model:</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 64.4304</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> $SFO</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 95.8401 4.67e-21 92.245 99.4357</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.0102 3.92e-12 0.009 0.0117</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 4.8230 3.81e-06 3.214 6.4318</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $IORE</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 1.01e+02 NA 9.91e+01 1.02e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k__iore_parent 1.54e-05 NA 4.08e-06 5.84e-05</span> +<span class="r-out co"><span class="r-pr">#></span> N_parent 2.57e+00 NA 2.25e+00 2.89e+00</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.68e+00 NA 1.12e+00 2.24e+00</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $DFOP</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 9.99e+01 1.41e-26 98.8116 101.0810</span> +<span class="r-out co"><span class="r-pr">#></span> k1 2.67e-02 5.05e-06 0.0243 0.0295</span> +<span class="r-out co"><span class="r-pr">#></span> k2 3.41e-12 5.00e-01 0.0000 Inf</span> +<span class="r-out co"><span class="r-pr">#></span> g 6.47e-01 3.67e-06 0.6248 0.6677</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.27e+00 8.91e-06 0.8395 1.6929</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> DTx values:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50_rep</span> +<span class="r-out co"><span class="r-pr">#></span> SFO 67.7 2.25e+02 6.77e+01</span> +<span class="r-out co"><span class="r-pr">#></span> IORE 58.2 1.07e+03 3.22e+02</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP 55.5 3.70e+11 2.03e+11</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Representative half-life:</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 321.51</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">nafta_att_p5a</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="NAFTA_SOP_Attachment-1.png" alt="" width="700" height="433"></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/SFO.solution-1.png b/docs/dev/reference/SFO.solution-1.png Binary files differnew file mode 100644 index 00000000..34fdd460 --- /dev/null +++ b/docs/dev/reference/SFO.solution-1.png diff --git a/docs/dev/reference/SFO.solution.html b/docs/dev/reference/SFO.solution.html new file mode 100644 index 00000000..f61d1d79 --- /dev/null +++ b/docs/dev/reference/SFO.solution.html @@ -0,0 +1,143 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Single First-Order kinetics — SFO.solution • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Single First-Order kinetics — SFO.solution"><meta name="description" content="Function describing exponential decline from a defined starting value."><meta property="og:description" content="Function describing exponential decline from a defined starting value."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Single First-Order kinetics</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parent_solutions.R" class="external-link"><code>R/parent_solutions.R</code></a></small> + <div class="d-none name"><code>SFO.solution.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Function describing exponential decline from a defined starting value.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-t">t<a class="anchor" aria-label="anchor" href="#arg-t"></a></dt> +<dd><p>Time.</p></dd> + + +<dt id="arg-parent-">parent_0<a class="anchor" aria-label="anchor" href="#arg-parent-"></a></dt> +<dd><p>Starting value for the response variable at time zero.</p></dd> + + +<dt id="arg-k">k<a class="anchor" aria-label="anchor" href="#arg-k"></a></dt> +<dd><p>Kinetic rate constant.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The value of the response variable at time <code>t</code>.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a> +FOCUS (2014) “Generic guidance for Estimating Persistence +and Degradation Kinetics from Environmental Fate Studies on Pesticides in +EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, +Version 1.1, 18 December 2014 +<a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>Other parent solutions: +<code><a href="DFOP.solution.html">DFOP.solution</a>()</code>, +<code><a href="FOMC.solution.html">FOMC.solution</a>()</code>, +<code><a href="HS.solution.html">HS.solution</a>()</code>, +<code><a href="IORE.solution.html">IORE.solution</a>()</code>, +<code><a href="SFORB.solution.html">SFORB.solution</a>()</code>, +<code><a href="logistic.solution.html">logistic.solution</a>()</code></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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></span></span> +<span class="r-plt img"><img src="SFO.solution-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/SFORB.solution-1.png b/docs/dev/reference/SFORB.solution-1.png Binary files differnew file mode 100644 index 00000000..08d25616 --- /dev/null +++ b/docs/dev/reference/SFORB.solution-1.png diff --git a/docs/dev/reference/SFORB.solution.html b/docs/dev/reference/SFORB.solution.html new file mode 100644 index 00000000..d9e9440f --- /dev/null +++ b/docs/dev/reference/SFORB.solution.html @@ -0,0 +1,165 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Single First-Order Reversible Binding kinetics — SFORB.solution • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Single First-Order Reversible Binding kinetics — SFORB.solution"><meta name="description" content="Function describing the solution of the differential equations describing +the kinetic model with first-order terms for a two-way transfer from a free +to a bound fraction, and a first-order degradation term for the free +fraction. The initial condition is a defined amount in the free fraction +and no substance in the bound fraction."><meta property="og:description" content="Function describing the solution of the differential equations describing +the kinetic model with first-order terms for a two-way transfer from a free +to a bound fraction, and a first-order degradation term for the free +fraction. The initial condition is a defined amount in the free fraction +and no substance in the bound fraction."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Single First-Order Reversible Binding kinetics</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parent_solutions.R" class="external-link"><code>R/parent_solutions.R</code></a></small> + <div class="d-none name"><code>SFORB.solution.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Function describing the solution of the differential equations describing +the kinetic model with first-order terms for a two-way transfer from a free +to a bound fraction, and a first-order degradation term for the free +fraction. The initial condition is a defined amount in the free fraction +and no substance in the bound fraction.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-t">t<a class="anchor" aria-label="anchor" href="#arg-t"></a></dt> +<dd><p>Time.</p></dd> + + +<dt id="arg-parent-">parent_0<a class="anchor" aria-label="anchor" href="#arg-parent-"></a></dt> +<dd><p>Starting value for the response variable at time zero.</p></dd> + + +<dt id="arg-k-">k_12<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>Kinetic constant describing transfer from free to bound.</p></dd> + + +<dt id="arg-k-">k_21<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>Kinetic constant describing transfer from bound to free.</p></dd> + + +<dt id="arg-k-output">k_1output<a class="anchor" aria-label="anchor" href="#arg-k-output"></a></dt> +<dd><p>Kinetic constant describing degradation of the free +fraction.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The value of the response variable, which is the sum of free and +bound fractions at time <code>t</code>.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a> +FOCUS (2014) “Generic guidance for Estimating Persistence +and Degradation Kinetics from Environmental Fate Studies on Pesticides in +EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, +Version 1.1, 18 December 2014 +<a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>Other parent solutions: +<code><a href="DFOP.solution.html">DFOP.solution</a>()</code>, +<code><a href="FOMC.solution.html">FOMC.solution</a>()</code>, +<code><a href="HS.solution.html">HS.solution</a>()</code>, +<code><a href="IORE.solution.html">IORE.solution</a>()</code>, +<code><a href="SFO.solution.html">SFO.solution</a>()</code>, +<code><a href="logistic.solution.html">logistic.solution</a>()</code></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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></span></span> +<span class="r-plt img"><img src="SFORB.solution-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/[.mhmkin.html b/docs/dev/reference/[.mhmkin.html new file mode 100644 index 00000000..19cc9c91 --- /dev/null +++ b/docs/dev/reference/[.mhmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mhmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mhmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/add_err-1.png b/docs/dev/reference/add_err-1.png Binary files differnew file mode 100644 index 00000000..1bcea3d5 --- /dev/null +++ b/docs/dev/reference/add_err-1.png diff --git a/docs/dev/reference/add_err-2.png b/docs/dev/reference/add_err-2.png Binary files differnew file mode 100644 index 00000000..67c083ea --- /dev/null +++ b/docs/dev/reference/add_err-2.png diff --git a/docs/dev/reference/add_err-3.png b/docs/dev/reference/add_err-3.png Binary files differnew file mode 100644 index 00000000..f25ae5e7 --- /dev/null +++ b/docs/dev/reference/add_err-3.png diff --git a/docs/dev/reference/add_err.html b/docs/dev/reference/add_err.html new file mode 100644 index 00000000..00a2b1d0 --- /dev/null +++ b/docs/dev/reference/add_err.html @@ -0,0 +1,216 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Add normally distributed errors to simulated kinetic degradation data — add_err • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Add normally distributed errors to simulated kinetic degradation data — add_err"><meta name="description" content="Normally distributed errors are added to data predicted for a specific +degradation model using mkinpredict. The variance of the error +may depend on the predicted value and is specified as a standard deviation."><meta property="og:description" content="Normally distributed errors are added to data predicted for a specific +degradation model using mkinpredict. The variance of the error +may depend on the predicted value and is specified as a standard deviation."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Add normally distributed errors to simulated kinetic degradation data</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/add_err.R" class="external-link"><code>R/add_err.R</code></a></small> + <div class="d-none name"><code>add_err.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Normally distributed errors are added to data predicted for a specific +degradation model using <code><a href="mkinpredict.html">mkinpredict</a></code>. The variance of the error +may depend on the predicted value and is specified as a standard deviation.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">add_err</span><span class="op">(</span></span> +<span> <span class="va">prediction</span>,</span> +<span> <span class="va">sdfunc</span>,</span> +<span> secondary <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span>,</span> +<span> n <span class="op">=</span> <span class="fl">10</span>,</span> +<span> LOD <span class="op">=</span> <span class="fl">0.1</span>,</span> +<span> reps <span class="op">=</span> <span class="fl">2</span>,</span> +<span> digits <span class="op">=</span> <span class="fl">1</span>,</span> +<span> seed <span class="op">=</span> <span class="cn">NA</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-prediction">prediction<a class="anchor" aria-label="anchor" href="#arg-prediction"></a></dt> +<dd><p>A prediction from a kinetic model as produced by +<code><a href="mkinpredict.html">mkinpredict</a></code>.</p></dd> + + +<dt id="arg-sdfunc">sdfunc<a class="anchor" aria-label="anchor" href="#arg-sdfunc"></a></dt> +<dd><p>A function taking the predicted value as its only argument and +returning a standard deviation that should be used for generating the +random error terms for this value.</p></dd> + + +<dt id="arg-secondary">secondary<a class="anchor" aria-label="anchor" href="#arg-secondary"></a></dt> +<dd><p>The names of state variables that should have an initial +value of zero</p></dd> + + +<dt id="arg-n">n<a class="anchor" aria-label="anchor" href="#arg-n"></a></dt> +<dd><p>The number of datasets to be generated.</p></dd> + + +<dt id="arg-lod">LOD<a class="anchor" aria-label="anchor" href="#arg-lod"></a></dt> +<dd><p>The limit of detection (LOD). Values that are below the LOD after +adding the random error will be set to NA.</p></dd> + + +<dt id="arg-reps">reps<a class="anchor" aria-label="anchor" href="#arg-reps"></a></dt> +<dd><p>The number of replicates to be generated within the datasets.</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>The number of digits to which the values will be rounded.</p></dd> + + +<dt id="arg-seed">seed<a class="anchor" aria-label="anchor" href="#arg-seed"></a></dt> +<dd><p>The seed used for the generation of random numbers. If NA, the +seed is not set.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A list of datasets compatible with <code><a href="mmkin.html">mmkin</a></code>, i.e. the +components of the list are datasets compatible with <code><a href="mkinfit.html">mkinfit</a></code>.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Ranke J and Lehmann R (2015) To t-test or not to t-test, that is +the question. XV Symposium on Pesticide Chemistry 2-4 September 2015, +Piacenza, Italy +https://jrwb.de/posters/piacenza_2015.pdf</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The kinetic model</span></span></span> +<span class="r-in"><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, use_of_ff <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Generate a prediction for a specific set of parameters</span></span></span> +<span class="r-in"><span><span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># This is the prediction used for the "Type 2 datasets" on the Piacenza poster</span></span></span> +<span class="r-in"><span><span class="co"># from 2015</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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>,</span></span> +<span class="r-in"><span> k_M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Add an error term with a constant (independent of the value) standard deviation</span></span></span> +<span class="r-in"><span><span class="co"># of 10, and generate three datasets</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Name the datasets for nicer plotting</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">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" class="external-link">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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Name the model in the list of models (with only one member in this case) for</span></span></span> +<span class="r-in"><span><span class="co"># nicer plotting later on. Be quiet and use only one core not to offend CRAN</span></span></span> +<span class="r-in"><span><span class="co"># checks</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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" class="external-link">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></span> +<span class="r-in"><span> <span class="va">d_SFO_SFO_err</span>, cores <span class="op">=</span> <span class="fl">1</span>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_SFO_SFO</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="add_err-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># We would like to inspect the fit for dataset 3 more closely</span></span></span> +<span class="r-in"><span><span class="co"># Using double brackets makes the returned object an mkinfit object</span></span></span> +<span class="r-in"><span><span class="co"># instead of a list of mkinfit objects, so plot.mkinfit is used</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_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></span></span> +<span class="r-plt img"><img src="add_err-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># If we use single brackets, we should give two indices (model and dataset),</span></span></span> +<span class="r-in"><span><span class="co"># and plot.mmkin is used</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_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></span></span> +<span class="r-plt img"><img src="add_err-3.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/anova.saem.mmkin.html b/docs/dev/reference/anova.saem.mmkin.html new file mode 100644 index 00000000..c30a8927 --- /dev/null +++ b/docs/dev/reference/anova.saem.mmkin.html @@ -0,0 +1,140 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Anova method for saem.mmkin objects — anova.saem.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Anova method for saem.mmkin objects — anova.saem.mmkin"><meta name="description" content="Generate an anova object. The method to calculate the BIC is that from the +saemix package. As in other prominent anova methods, models are sorted by +number of parameters, and the tests (if requested) are always relative to +the model on the previous line."><meta property="og:description" content="Generate an anova object. The method to calculate the BIC is that from the +saemix package. As in other prominent anova methods, models are sorted by +number of parameters, and the tests (if requested) are always relative to +the model on the previous line."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Anova method for saem.mmkin objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/anova.saem.mmkin.R" class="external-link"><code>R/anova.saem.mmkin.R</code></a></small> + <div class="d-none name"><code>anova.saem.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Generate an anova object. The method to calculate the BIC is that from the +saemix package. As in other prominent anova methods, models are sorted by +number of parameters, and the tests (if requested) are always relative to +the model on the previous line.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'saem.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> <span class="va">...</span>,</span> +<span> method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"is"</span>, <span class="st">"lin"</span>, <span class="st">"gq"</span><span class="op">)</span>,</span> +<span> test <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> model.names <span class="op">=</span> <span class="cn">NULL</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An <a href="saem.html">saem.mmkin</a> object</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>further such objects</p></dd> + + +<dt id="arg-method">method<a class="anchor" aria-label="anchor" href="#arg-method"></a></dt> +<dd><p>Method for likelihood calculation: "is" (importance sampling), +"lin" (linear approximation), or "gq" (Gaussian quadrature). Passed +to <a href="https://rdrr.io/pkg/saemix/man/logLik.html" class="external-link">saemix::logLik.SaemixObject</a></p></dd> + + +<dt id="arg-test">test<a class="anchor" aria-label="anchor" href="#arg-test"></a></dt> +<dd><p>Should a likelihood ratio test be performed? If TRUE, +the alternative models are tested against the first model. Should +only be done for nested models.</p></dd> + + +<dt id="arg-model-names">model.names<a class="anchor" aria-label="anchor" href="#arg-model-names"></a></dt> +<dd><p>Optional character vector of model names</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>an "anova" data frame; the traditional (S3) result of anova()</p> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/aw.html b/docs/dev/reference/aw.html new file mode 100644 index 00000000..c87247c5 --- /dev/null +++ b/docs/dev/reference/aw.html @@ -0,0 +1,153 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate Akaike weights for model averaging — aw • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate Akaike weights for model averaging — aw"><meta name="description" content="Akaike weights are calculated based on the relative +expected Kullback-Leibler information as specified +by Burnham and Anderson (2004)."><meta property="og:description" content="Akaike weights are calculated based on the relative +expected Kullback-Leibler information as specified +by Burnham and Anderson (2004)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Calculate Akaike weights for model averaging</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/aw.R" class="external-link"><code>R/aw.R</code></a></small> + <div class="d-none name"><code>aw.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Akaike weights are calculated based on the relative +expected Kullback-Leibler information as specified +by Burnham and Anderson (2004).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">aw</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu">aw</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu">aw</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mixed.mmkin'</span></span> +<span><span class="fu">aw</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'multistart'</span></span> +<span><span class="fu">aw</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An <a href="mmkin.html">mmkin</a> column object, containing two or more +<a href="mkinfit.html">mkinfit</a> models that have been fitted to the same data, +or an mkinfit object. In the latter case, further mkinfit +objects fitted to the same data should be specified +as dots arguments.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used in the method for <a href="mmkin.html">mmkin</a> column objects, +further <a href="mkinfit.html">mkinfit</a> objects in the method for mkinfit objects.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Burnham KP and Anderson DR (2004) Multimodel +Inference: Understanding AIC and BIC in Model Selection. +<em>Sociological Methods & Research</em> <strong>33</strong>(2) 261-304</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">f_sfo</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_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_dfop</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_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">aw_sfo_dfop</span> <span class="op"><-</span> <span class="fu">aw</span><span class="op">(</span><span class="va">f_sfo</span>, <span class="va">f_dfop</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/sum.html" class="external-link">sum</a></span><span class="op">(</span><span class="va">aw_sfo_dfop</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1</span> +<span class="r-in"><span><span class="va">aw_sfo_dfop</span> <span class="co"># SFO gets more weight as it has less parameters and a similar fit</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.5970258 0.4029742</span> +<span class="r-in"><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" class="external-link">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" class="external-link">list</a></span><span class="op">(</span><span class="st">"FOCUS D"</span> <span class="op">=</span> <span class="va">FOCUS_2006_D</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></span></span> +<span class="r-in"><span><span class="fu">aw</span><span class="op">(</span><span class="va">f</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.4808722 0.1945539 0.3245740</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/sum.html" class="external-link">sum</a></span><span class="op">(</span><span class="fu">aw</span><span class="op">(</span><span class="va">f</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1</span> +<span class="r-in"><span><span class="fu">aw</span><span class="op">(</span><span class="va">f</span><span class="op">[</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"DFOP"</span><span class="op">)</span><span class="op">]</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.5970258 0.4029742</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/aw.mixed.mmkin.html b/docs/dev/reference/aw.mixed.mmkin.html new file mode 100644 index 00000000..ccfdbfc6 --- /dev/null +++ b/docs/dev/reference/aw.mixed.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/aw.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/aw.html"> + </head> +</html> + diff --git a/docs/dev/reference/aw.mkinfit.html b/docs/dev/reference/aw.mkinfit.html new file mode 100644 index 00000000..ccfdbfc6 --- /dev/null +++ b/docs/dev/reference/aw.mkinfit.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/aw.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/aw.html"> + </head> +</html> + diff --git a/docs/dev/reference/aw.mmkin.html b/docs/dev/reference/aw.mmkin.html new file mode 100644 index 00000000..ccfdbfc6 --- /dev/null +++ b/docs/dev/reference/aw.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/aw.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/aw.html"> + </head> +</html> + diff --git a/docs/dev/reference/aw.multistart.html b/docs/dev/reference/aw.multistart.html new file mode 100644 index 00000000..ccfdbfc6 --- /dev/null +++ b/docs/dev/reference/aw.multistart.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/aw.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/aw.html"> + </head> +</html> + diff --git a/docs/dev/reference/backtransform_odeparms.html b/docs/dev/reference/backtransform_odeparms.html new file mode 100644 index 00000000..b07fb165 --- /dev/null +++ b/docs/dev/reference/backtransform_odeparms.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/transform_odeparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/transform_odeparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/best.default.html b/docs/dev/reference/best.default.html new file mode 100644 index 00000000..06f15f0c --- /dev/null +++ b/docs/dev/reference/best.default.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html"> + </head> +</html> + diff --git a/docs/dev/reference/best.html b/docs/dev/reference/best.html new file mode 100644 index 00000000..06f15f0c --- /dev/null +++ b/docs/dev/reference/best.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html"> + </head> +</html> + diff --git a/docs/dev/reference/check_failed.html b/docs/dev/reference/check_failed.html new file mode 100644 index 00000000..9dea2650 --- /dev/null +++ b/docs/dev/reference/check_failed.html @@ -0,0 +1,100 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Check if fit within an mhmkin object failed — check_failed • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Check if fit within an mhmkin object failed — check_failed"><meta name="description" content="Check if fit within an mhmkin object failed"><meta property="og:description" content="Check if fit within an mhmkin object failed"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Check if fit within an mhmkin object failed</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mhmkin.R" class="external-link"><code>R/mhmkin.R</code></a></small> + <div class="d-none name"><code>check_failed.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Check if fit within an mhmkin object failed</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">check_failed</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>The object to be checked</p></dd> + +</dl></div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/confint.mkinfit.html b/docs/dev/reference/confint.mkinfit.html new file mode 100644 index 00000000..a0051a85 --- /dev/null +++ b/docs/dev/reference/confint.mkinfit.html @@ -0,0 +1,382 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Confidence intervals for parameters of mkinfit objects — confint.mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Confidence intervals for parameters of mkinfit objects — confint.mkinfit"><meta name="description" content="The default method 'quadratic' is based on the quadratic approximation of +the curvature of the likelihood function at the maximum likelihood parameter +estimates. +The alternative method 'profile' is based on the profile likelihood for each +parameter. The 'profile' method uses two nested optimisations and can take a +very long time, even if parallelized by specifying 'cores' on unixoid +platforms. The speed of the method could likely be improved by using the +method of Venzon and Moolgavkar (1988)."><meta property="og:description" content="The default method 'quadratic' is based on the quadratic approximation of +the curvature of the likelihood function at the maximum likelihood parameter +estimates. +The alternative method 'profile' is based on the profile likelihood for each +parameter. The 'profile' method uses two nested optimisations and can take a +very long time, even if parallelized by specifying 'cores' on unixoid +platforms. The speed of the method could likely be improved by using the +method of Venzon and Moolgavkar (1988)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Confidence intervals for parameters of mkinfit objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/confint.mkinfit.R" class="external-link"><code>R/confint.mkinfit.R</code></a></small> + <div class="d-none name"><code>confint.mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The default method 'quadratic' is based on the quadratic approximation of +the curvature of the likelihood function at the maximum likelihood parameter +estimates. +The alternative method 'profile' is based on the profile likelihood for each +parameter. The 'profile' method uses two nested optimisations and can take a +very long time, even if parallelized by specifying 'cores' on unixoid +platforms. The speed of the method could likely be improved by using the +method of Venzon and Moolgavkar (1988).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">confint</a></span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> <span class="va">parm</span>,</span> +<span> level <span class="op">=</span> <span class="fl">0.95</span>,</span> +<span> alpha <span class="op">=</span> <span class="fl">1</span> <span class="op">-</span> <span class="va">level</span>,</span> +<span> <span class="va">cutoff</span>,</span> +<span> method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"quadratic"</span>, <span class="st">"profile"</span><span class="op">)</span>,</span> +<span> transformed <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> backtransform <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<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" class="external-link">detectCores</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> rel_tol <span class="op">=</span> <span class="fl">0.01</span>,</span> +<span> quiet <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An <code><a href="mkinfit.html">mkinfit</a></code> object</p></dd> + + +<dt id="arg-parm">parm<a class="anchor" aria-label="anchor" href="#arg-parm"></a></dt> +<dd><p>A vector of names of the parameters which are to be given +confidence intervals. If missing, all parameters are considered.</p></dd> + + +<dt id="arg-level">level<a class="anchor" aria-label="anchor" href="#arg-level"></a></dt> +<dd><p>The confidence level required</p></dd> + + +<dt id="arg-alpha">alpha<a class="anchor" aria-label="anchor" href="#arg-alpha"></a></dt> +<dd><p>The allowed error probability, overrides 'level' if specified.</p></dd> + + +<dt id="arg-cutoff">cutoff<a class="anchor" aria-label="anchor" href="#arg-cutoff"></a></dt> +<dd><p>Possibility to specify an alternative cutoff for the difference +in the log-likelihoods at the confidence boundary. Specifying an explicit +cutoff value overrides arguments 'level' and 'alpha'</p></dd> + + +<dt id="arg-method">method<a class="anchor" aria-label="anchor" href="#arg-method"></a></dt> +<dd><p>The 'quadratic' method approximates the likelihood function at +the optimised parameters using the second term of the Taylor expansion, +using a second derivative (hessian) contained in the object. +The 'profile' method searches the parameter space for the +cutoff of the confidence intervals by means of a likelihood ratio test.</p></dd> + + +<dt id="arg-transformed">transformed<a class="anchor" aria-label="anchor" href="#arg-transformed"></a></dt> +<dd><p>If the quadratic approximation is used, should it be +applied to the likelihood based on the transformed parameters?</p></dd> + + +<dt id="arg-backtransform">backtransform<a class="anchor" aria-label="anchor" href="#arg-backtransform"></a></dt> +<dd><p>If we approximate the likelihood in terms of the +transformed parameters, should we backtransform the parameters with +their confidence intervals?</p></dd> + + +<dt id="arg-cores">cores<a class="anchor" aria-label="anchor" href="#arg-cores"></a></dt> +<dd><p>The number of cores to be used for multicore processing. +On Windows machines, cores > 1 is currently not supported.</p></dd> + + +<dt id="arg-rel-tol">rel_tol<a class="anchor" aria-label="anchor" href="#arg-rel-tol"></a></dt> +<dd><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></dd> + + +<dt id="arg-quiet">quiet<a class="anchor" aria-label="anchor" href="#arg-quiet"></a></dt> +<dd><p>Should we suppress the message "Profiling the likelihood"</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A matrix with columns giving lower and upper confidence limits for +each parameter.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Bates DM and Watts GW (1988) Nonlinear regression analysis & its applications</p> +<p>Pawitan Y (2013) In all likelihood - Statistical modelling and +inference using likelihood. Clarendon Press, Oxford.</p> +<p>Venzon DJ and Moolgavkar SH (1988) A Method for Computing +Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37, +87–94.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><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="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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 71.8242430 93.1600766</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.2109541 0.4440528</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.9778868 7.3681380</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Profiling the likelihood</span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 73.0641834 92.1392181</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.2170293 0.4235348</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 3.1307772 8.0628314</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Set the number of cores for the profiling method for further examples</span></span></span> +<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/identical.html" class="external-link">identical</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html" class="external-link">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></span> +<span class="r-in"><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" class="external-link">detectCores</a></span><span class="op">(</span><span class="op">)</span> <span class="op">-</span> <span class="fl">1</span></span></span> +<span class="r-in"><span><span class="op">}</span> <span class="kw">else</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="va">n_cores</span> <span class="op"><-</span> <span class="fl">1</span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html" class="external-link">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></span> +<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html" class="external-link">Sys.info</a></span><span class="op">(</span><span class="op">)</span><span class="op">[</span><span class="st">"sysname"</span><span class="op">]</span> <span class="op">==</span> <span class="st">"Windows"</span><span class="op">)</span> <span class="va">n_cores</span> <span class="op">=</span> <span class="fl">1</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><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="mkinmod.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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><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="mkinmod.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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><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" class="external-link">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></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/system.time.html" class="external-link">system.time</a></span><span class="op">(</span><span class="va">ci_profile</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> user system elapsed </span> +<span class="r-out co"><span class="r-pr">#></span> 1.182 0.004 1.186 </span> +<span class="r-in"><span><span class="co"># Using more cores does not save much time here, as parent_0 takes up most of the time</span></span></span> +<span class="r-in"><span><span class="co"># If we additionally exclude parent_0 (the confidence of which is often of</span></span></span> +<span class="r-in"><span><span class="co"># minor interest), we get a nice performance improvement if we use at least 4 cores</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/system.time.html" class="external-link">system.time</a></span><span class="op">(</span><span class="va">ci_profile_no_parent_0</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Profiling the likelihood</span> +<span class="r-out co"><span class="r-pr">#></span> user system elapsed </span> +<span class="r-out co"><span class="r-pr">#></span> 0.429 0.171 0.324 </span> +<span class="r-in"><span><span class="va">ci_profile</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 96.456003640 1.027703e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink 0.040762501 5.549764e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 0.046786482 5.500879e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink 0.003892605 6.702778e-03</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.535612399 3.985263e+00</span> +<span class="r-in"><span><span class="va">ci_quadratic_transformed</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span> +<span class="r-in"><span><span class="va">ci_quadratic_transformed</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 96.403841640 1.027931e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink 0.041033378 5.596269e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 0.046777902 5.511931e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink 0.004012217 6.897547e-03</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.396089689 3.854918e+00</span> +<span class="r-in"><span><span class="va">ci_quadratic_untransformed</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span> +<span class="r-in"><span><span class="va">ci_quadratic_untransformed</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 96.403841645 102.79312449</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink 0.040485331 0.05535491</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 0.046611582 0.05494364</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink 0.003835483 0.00668582</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.396089689 3.85491806</span> +<span class="r-in"><span><span class="co"># Against the expectation based on Bates and Watts (1988), the confidence</span></span></span> +<span class="r-in"><span><span class="co"># intervals based on the internal parameter transformation are less</span></span></span> +<span class="r-in"><span><span class="co"># congruent with the likelihood based intervals. Note the superiority of the</span></span></span> +<span class="r-in"><span><span class="co"># interval based on the untransformed fit for k_m1_sink</span></span></span> +<span class="r-in"><span><span class="va">rel_diffs_transformed</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html" class="external-link">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></span> +<span class="r-in"><span><span class="va">rel_diffs_untransformed</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html" class="external-link">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></span> +<span class="r-in"><span><span class="va">rel_diffs_transformed</span> <span class="op"><</span> <span class="va">rel_diffs_untransformed</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 FALSE FALSE</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink TRUE FALSE</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 TRUE FALSE</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink FALSE FALSE</span> +<span class="r-out co"><span class="r-pr">#></span> sigma FALSE FALSE</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">signif</a></span><span class="op">(</span><span class="va">rel_diffs_transformed</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 0.000541 0.000222</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink 0.006650 0.008380</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 0.000183 0.002010</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink 0.030700 0.029100</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 0.055000 0.032700</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">signif</a></span><span class="op">(</span><span class="va">rel_diffs_untransformed</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 0.000541 0.000222</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink 0.006800 0.002570</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 0.003740 0.001180</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink 0.014700 0.002530</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 0.055000 0.032700</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Investigate a case with formation fractions</span></span></span> +<span class="r-in"><span><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" class="external-link">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></span></span> +<span class="r-in"><span><span class="va">ci_profile_ff</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Profiling the likelihood</span> +<span class="r-in"><span><span class="va">ci_profile_ff</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 96.456003640 1.027703e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.090911032 1.071578e-01</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.003892606 6.702775e-03</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.471328495 5.611550e-01</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.535612399 3.985263e+00</span> +<span class="r-in"><span><span class="va">ci_quadratic_transformed_ff</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span> +<span class="r-in"><span><span class="va">ci_quadratic_transformed_ff</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 96.403833581 102.79311649</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.090823771 0.10725430</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.004012219 0.00689755</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.469118824 0.55959615</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.396089689 3.85491806</span> +<span class="r-in"><span><span class="va">ci_quadratic_untransformed_ff</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span> +<span class="r-in"><span><span class="va">ci_quadratic_untransformed_ff</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 96.403833586 1.027931e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.090491913 1.069035e-01</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.003835485 6.685823e-03</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.469113477 5.598387e-01</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.396089689 3.854918e+00</span> +<span class="r-in"><span><span class="va">rel_diffs_transformed_ff</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html" class="external-link">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></span> +<span class="r-in"><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" class="external-link">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></span> +<span class="r-in"><span><span class="co"># While the confidence interval for the parent rate constant is closer to</span></span></span> +<span class="r-in"><span><span class="co"># the profile based interval when using the internal parameter</span></span></span> +<span class="r-in"><span><span class="co"># transformation, the interval for the metabolite rate constant is 'better</span></span></span> +<span class="r-in"><span><span class="co"># without internal parameter transformation.</span></span></span> +<span class="r-in"><span><span class="va">rel_diffs_transformed_ff</span> <span class="op"><</span> <span class="va">rel_diffs_untransformed_ff</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 FALSE FALSE</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent TRUE TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 FALSE FALSE</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 TRUE FALSE</span> +<span class="r-out co"><span class="r-pr">#></span> sigma TRUE FALSE</span> +<span class="r-in"><span><span class="va">rel_diffs_transformed_ff</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 0.0005408690 0.0002217233</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.0009598532 0.0009001864</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.0307283045 0.0290588367</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.0046881768 0.0027780062</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 0.0550252516 0.0327066836</span> +<span class="r-in"><span><span class="va">rel_diffs_untransformed_ff</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 0.0005408689 0.0002217233</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.0046102155 0.0023732280</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.0146740687 0.0025291815</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.0046995210 0.0023457712</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 0.0550252516 0.0327066836</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The profiling for the following fit does not finish in a reasonable time,</span></span></span> +<span class="r-in"><span><span class="co"># therefore we use the quadratic approximation</span></span></span> +<span class="r-in"><span><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 94.596181875 106.19936592</span> +<span class="r-out co"><span class="r-pr">#></span> k_M1 0.037605432 0.04490757</span> +<span class="r-out co"><span class="r-pr">#></span> k_M2 0.008568745 0.01087675</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_M1 0.021464676 0.62023880</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_M2 0.015167158 0.37975350</span> +<span class="r-out co"><span class="r-pr">#></span> k1 0.273897535 0.33388072</span> +<span class="r-out co"><span class="r-pr">#></span> k2 0.018614555 0.02250379</span> +<span class="r-out co"><span class="r-pr">#></span> g 0.671943738 0.73583261</span> +<span class="r-out co"><span class="r-pr">#></span> sigma_low 0.251283679 0.83992102</span> +<span class="r-out co"><span class="r-pr">#></span> rsd_high 0.040411022 0.07662008</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/confint.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> 2.5% 97.5%</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 94.59618 106.1994</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/create_deg_func.html b/docs/dev/reference/create_deg_func.html new file mode 100644 index 00000000..4c66c02b --- /dev/null +++ b/docs/dev/reference/create_deg_func.html @@ -0,0 +1,148 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Create degradation functions for known analytical solutions — create_deg_func • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create degradation functions for known analytical solutions — create_deg_func"><meta name="description" content="Create degradation functions for known analytical solutions"><meta property="og:description" content="Create degradation functions for known analytical solutions"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Create degradation functions for known analytical solutions</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/create_deg_func.R" class="external-link"><code>R/create_deg_func.R</code></a></small> + <div class="d-none name"><code>create_deg_func.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Create degradation functions for known analytical solutions</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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" class="external-link">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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-spec">spec<a class="anchor" aria-label="anchor" href="#arg-spec"></a></dt> +<dd><p>List of model specifications as contained in mkinmod objects</p></dd> + + +<dt id="arg-use-of-ff">use_of_ff<a class="anchor" aria-label="anchor" href="#arg-use-of-ff"></a></dt> +<dd><p>Minimum or maximum use of formation fractions</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>Degradation function to be attached to mkinmod objects</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="va">FOCUS_D</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">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></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><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></span></span> +<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="va"><a href="http://rbenchmark.googlecode.com" class="external-link">rbenchmark</a></span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html" class="external-link">benchmark</a></span><span class="op">(</span></span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> replications <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Loading required package: rbenchmark</span> +<span class="r-out co"><span class="r-pr">#></span> test replications elapsed relative user.self sys.self user.child</span> +<span class="r-out co"><span class="r-pr">#></span> 1 analytical 2 0.249 1.000 0.249 0 0</span> +<span class="r-out co"><span class="r-pr">#></span> 2 deSolve 2 0.307 1.233 0.306 0 0</span> +<span class="r-out co"><span class="r-pr">#></span> sys.child</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0</span> +<span class="r-out co"><span class="r-pr">#></span> 2 0</span> +<span class="r-in"><span> <span class="va">DFOP_SFO</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html" class="external-link">benchmark</a></span><span class="op">(</span></span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> replications <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> test replications elapsed relative user.self sys.self user.child</span> +<span class="r-out co"><span class="r-pr">#></span> 1 analytical 2 0.391 1.000 0.391 0 0</span> +<span class="r-out co"><span class="r-pr">#></span> 2 deSolve 2 0.543 1.389 0.542 0 0</span> +<span class="r-out co"><span class="r-pr">#></span> sys.child</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0</span> +<span class="r-out co"><span class="r-pr">#></span> 2 0</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/dimethenamid_2018-1.png b/docs/dev/reference/dimethenamid_2018-1.png Binary files differnew file mode 100644 index 00000000..3a509a7f --- /dev/null +++ b/docs/dev/reference/dimethenamid_2018-1.png diff --git a/docs/dev/reference/dimethenamid_2018.html b/docs/dev/reference/dimethenamid_2018.html new file mode 100644 index 00000000..4bd35bc6 --- /dev/null +++ b/docs/dev/reference/dimethenamid_2018.html @@ -0,0 +1,347 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018 • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018 — dimethenamid_2018"><meta name="description" content="The datasets were extracted from the active substance evaluation dossier +published by EFSA. Kinetic evaluations shown for these datasets are intended +to illustrate and advance kinetic modelling. The fact that these data and +some results are shown here does not imply a license to use them in the +context of pesticide registrations, as the use of the data may be +constrained by data protection regulations."><meta property="og:description" content="The datasets were extracted from the active substance evaluation dossier +published by EFSA. Kinetic evaluations shown for these datasets are intended +to illustrate and advance kinetic modelling. The fact that these data and +some results are shown here does not imply a license to use them in the +context of pesticide registrations, as the use of the data may be +constrained by data protection regulations."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/dimethenamid_2018.R" class="external-link"><code>R/dimethenamid_2018.R</code></a></small> + <div class="d-none name"><code>dimethenamid_2018.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The datasets were extracted from the active substance evaluation dossier +published by EFSA. Kinetic evaluations shown for these datasets are intended +to illustrate and advance kinetic modelling. The fact that these data and +some results are shown here does not imply a license to use them in the +context of pesticide registrations, as the use of the data may be +constrained by data protection regulations.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">dimethenamid_2018</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>An <a href="mkindsg.html">mkindsg</a> object grouping seven datasets with some meta information</p> + </div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>Rapporteur Member State Germany, Co-Rapporteur Member State Bulgaria (2018) +Renewal Assessment Report Dimethenamid-P Volume 3 - B.8 Environmental fate and behaviour +Rev. 2 - November 2017 +https://open.efsa.europa.eu/study-inventory/EFSA-Q-2014-00716</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>The R code used to create this data object is installed with this package +in the 'dataset_generation' directory. In the code, page numbers are given for +specific pieces of information in the comments.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">dimethenamid_2018</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkindsg> holding 7 mkinds objects</span> +<span class="r-out co"><span class="r-pr">#></span> Title $title: Aerobic soil degradation data on dimethenamid-P from the EU assessment in 2018 </span> +<span class="r-out co"><span class="r-pr">#></span> Occurrence of observed compounds $observed_n:</span> +<span class="r-out co"><span class="r-pr">#></span> DMTAP M23 M27 M31 DMTA </span> +<span class="r-out co"><span class="r-pr">#></span> 3 7 7 7 4 </span> +<span class="r-out co"><span class="r-pr">#></span> Time normalisation factors $f_time_norm:</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.0000000 0.9706477 1.2284784 1.2284784 0.6233856 0.7678922 0.6733938</span> +<span class="r-out co"><span class="r-pr">#></span> Meta information $meta:</span> +<span class="r-out co"><span class="r-pr">#></span> study usda_soil_type study_moisture_ref_type rel_moisture</span> +<span class="r-out co"><span class="r-pr">#></span> Calke Unsworth 2014 Sandy loam pF2 1.00</span> +<span class="r-out co"><span class="r-pr">#></span> Borstel Staudenmaier 2009 Sand pF1 0.50</span> +<span class="r-out co"><span class="r-pr">#></span> Elliot 1 Wendt 1997 Clay loam pF2.5 0.75</span> +<span class="r-out co"><span class="r-pr">#></span> Elliot 2 Wendt 1997 Clay loam pF2.5 0.75</span> +<span class="r-out co"><span class="r-pr">#></span> Flaach König 1996 Sandy clay loam pF1 0.40</span> +<span class="r-out co"><span class="r-pr">#></span> BBA 2.2 König 1995 Loamy sand pF1 0.40</span> +<span class="r-out co"><span class="r-pr">#></span> BBA 2.3 König 1995 Sandy loam pF1 0.40</span> +<span class="r-out co"><span class="r-pr">#></span> study_ref_moisture temperature</span> +<span class="r-out co"><span class="r-pr">#></span> Calke NA 20</span> +<span class="r-out co"><span class="r-pr">#></span> Borstel 23.00 20</span> +<span class="r-out co"><span class="r-pr">#></span> Elliot 1 33.37 23</span> +<span class="r-out co"><span class="r-pr">#></span> Elliot 2 33.37 23</span> +<span class="r-out co"><span class="r-pr">#></span> Flaach NA 20</span> +<span class="r-out co"><span class="r-pr">#></span> BBA 2.2 NA 20</span> +<span class="r-out co"><span class="r-pr">#></span> BBA 2.3 NA 20</span> +<span class="r-in"><span><span class="va">dmta_ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="fl">1</span><span class="op">:</span><span class="fl">7</span>, <span class="kw">function</span><span class="op">(</span><span class="va">i</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="va">ds_i</span> <span class="op"><-</span> <span class="va">dimethenamid_2018</span><span class="op">$</span><span class="va">ds</span><span class="op">[[</span><span class="va">i</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">data</span></span></span> +<span class="r-in"><span> <span class="va">ds_i</span><span class="op">[</span><span class="va">ds_i</span><span class="op">$</span><span class="va">name</span> <span class="op">==</span> <span class="st">"DMTAP"</span>, <span class="st">"name"</span><span class="op">]</span> <span class="op"><-</span> <span class="st">"DMTA"</span></span></span> +<span class="r-in"><span> <span class="va">ds_i</span><span class="op">$</span><span class="va">time</span> <span class="op"><-</span> <span class="va">ds_i</span><span class="op">$</span><span class="va">time</span> <span class="op">*</span> <span class="va">dimethenamid_2018</span><span class="op">$</span><span class="va">f_time_norm</span><span class="op">[</span><span class="va">i</span><span class="op">]</span></span></span> +<span class="r-in"><span> <span class="va">ds_i</span></span></span> +<span class="r-in"><span><span class="op">}</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">dmta_ds</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">dimethenamid_2018</span><span class="op">$</span><span class="va">ds</span>, <span class="kw">function</span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="va">ds</span><span class="op">$</span><span class="va">title</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/cbind.html" class="external-link">rbind</a></span><span class="op">(</span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 1"</span><span class="op">]</span><span class="op">]</span>, <span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 2"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 1"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="cn">NULL</span></span></span> +<span class="r-in"><span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 2"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="cn">NULL</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="co"># We don't use DFOP for the parent compound, as this gives numerical</span></span></span> +<span class="r-in"><span><span class="co"># instabilities in the fits</span></span></span> +<span class="r-in"><span><span class="va">sfo_sfo3p</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> DMTA <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M23"</span>, <span class="st">"M27"</span>, <span class="st">"M31"</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M23 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M27 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M31 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M27"</span>, sink <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span></span></span> +<span class="r-in"><span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">dmta_sfo_sfo3p_tc</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" class="external-link">list</a></span><span class="op">(</span><span class="st">"SFO-SFO3+"</span> <span class="op">=</span> <span class="va">sfo_sfo3p</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">dmta_ds</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mmkin> object</span> +<span class="r-out co"><span class="r-pr">#></span> Status of individual fits:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model Calke Borstel Flaach BBA 2.2 BBA 2.3 Elliot</span> +<span class="r-out co"><span class="r-pr">#></span> SFO-SFO3+ OK OK OK OK OK OK </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> OK: No warnings</span> +<span class="r-in"><span><span class="co"># The default (test_log_parms = FALSE) gives an undue</span></span></span> +<span class="r-in"><span><span class="co"># influence of ill-defined rate constants that have</span></span></span> +<span class="r-in"><span><span class="co"># extremely small values:</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="fu"><a href="mixed.html">mixed</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span>, test_log_parms <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="dimethenamid_2018-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># If we disregards ill-defined rate constants, the results</span></span></span> +<span class="r-in"><span><span class="co"># look more plausible, but the truth is likely to be in</span></span></span> +<span class="r-in"><span><span class="co"># between these variants</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="fu"><a href="mixed.html">mixed</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span>, test_log_parms <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># We can also specify a default value for the failing</span></span></span> +<span class="r-in"><span><span class="co"># log parameters, to mimic FOCUS guidance</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="fu"><a href="mixed.html">mixed</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span>, test_log_parms <span class="op">=</span> <span class="cn">TRUE</span>,</span></span> +<span class="r-in"><span> default_log_parms <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">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></span> +<span class="r-in"><span><span class="co"># As these attempts are not satisfying, we use nonlinear mixed-effects models</span></span></span> +<span class="r-in"><span><span class="co"># f_dmta_nlme_tc <- nlme(dmta_sfo_sfo3p_tc)</span></span></span> +<span class="r-in"><span><span class="co"># nlme reaches maxIter = 50 without convergence</span></span></span> +<span class="r-in"><span><span class="va">f_dmta_saem_tc</span> <span class="op"><-</span> <span class="fu"><a href="saem.html">saem</a></span><span class="op">(</span><span class="va">dmta_sfo_sfo3p_tc</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># I am commenting out the convergence plot as rendering them</span></span></span> +<span class="r-in"><span><span class="co"># with pkgdown fails (at least without further tweaks to the</span></span></span> +<span class="r-in"><span><span class="co"># graphics device used)</span></span></span> +<span class="r-in"><span><span class="co">#saemix::plot(f_dmta_saem_tc$so, plot.type = "convergence")</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_dmta_saem_tc</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> saemix version used for fitting: 3.3 </span> +<span class="r-out co"><span class="r-pr">#></span> mkin version used for pre-fitting: 1.2.10 </span> +<span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.4.2 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of fit: Fri Feb 14 07:29:22 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of summary: Fri Feb 14 07:29:22 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_DMTA/dt = - k_DMTA * DMTA</span> +<span class="r-out co"><span class="r-pr">#></span> d_M23/dt = + f_DMTA_to_M23 * k_DMTA * DMTA - k_M23 * M23</span> +<span class="r-out co"><span class="r-pr">#></span> d_M27/dt = + f_DMTA_to_M27 * k_DMTA * DMTA - k_M27 * M27 + k_M31 * M31</span> +<span class="r-out co"><span class="r-pr">#></span> d_M31/dt = + f_DMTA_to_M31 * k_DMTA * DMTA - k_M31 * M31</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 563 observations of 4 variable(s) grouped in 6 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type deSolve </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted in 295.57 s</span> +<span class="r-out co"><span class="r-pr">#></span> Using 300, 100 iterations and 9 chains</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance model: Two-component variance function </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for degradation parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_0 log_k_DMTA log_k_M23 log_k_M27 log_k_M31 f_DMTA_ilr_1 </span> +<span class="r-out co"><span class="r-pr">#></span> 95.5662 -2.9048 -3.8130 -4.1600 -4.1486 0.1341 </span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_2 f_DMTA_ilr_3 </span> +<span class="r-out co"><span class="r-pr">#></span> 0.1385 -1.6700 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed degradation parameter values:</span> +<span class="r-out co"><span class="r-pr">#></span> None</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for random effects (square root of initial entries in omega):</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_0 log_k_DMTA log_k_M23 log_k_M27 log_k_M31 f_DMTA_ilr_1</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_0 4.802 0.0000 0.0000 0.000 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_DMTA 0.000 0.9834 0.0000 0.000 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M23 0.000 0.0000 0.6983 0.000 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M27 0.000 0.0000 0.0000 1.028 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M31 0.000 0.0000 0.0000 0.000 0.9841 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_1 0.000 0.0000 0.0000 0.000 0.0000 0.7185</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_2 0.000 0.0000 0.0000 0.000 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_3 0.000 0.0000 0.0000 0.000 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_2 f_DMTA_ilr_3</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_0 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_DMTA 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M23 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M27 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M31 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_1 0.0000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_2 0.7378 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_3 0.0000 0.4451</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for error model parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 b.1 </span> +<span class="r-out co"><span class="r-pr">#></span> 1 1 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Results:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood computed by importance sampling</span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 2276 2273 -1120</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Optimised parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_0 88.4862 84.1127 92.8598</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_DMTA -3.0512 -3.5674 -2.5351</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M23 -4.0576 -4.9013 -3.2139</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M27 -3.8584 -4.2572 -3.4595</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M31 -3.9779 -4.4844 -3.4714</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_1 0.1264 -0.2186 0.4714</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_2 0.1509 -0.2547 0.5565</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_3 -1.3891 -1.6962 -1.0819</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 0.9196 0.8307 1.0085</span> +<span class="r-out co"><span class="r-pr">#></span> b.1 0.1377 0.1205 0.1549</span> +<span class="r-out co"><span class="r-pr">#></span> SD.DMTA_0 3.5956 -0.8167 8.0078</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_DMTA 0.6437 0.2784 1.0091</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_M23 0.9929 0.3719 1.6139</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_M27 0.4530 0.1522 0.7537</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_M31 0.5773 0.1952 0.9595</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_DMTA_ilr_1 0.4063 0.1505 0.6621</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_DMTA_ilr_2 0.4800 0.1817 0.7783</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_DMTA_ilr_3 0.3582 0.1350 0.5814</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Correlation: </span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_0 l__DMTA lg__M23 lg__M27 lg__M31 f_DMTA__1 f_DMTA__2</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_DMTA 0.0306 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M23 -0.0234 -0.0032 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M27 -0.0380 -0.0049 0.0041 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M31 -0.0247 -0.0031 0.0022 0.0817 </span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_1 -0.0046 -0.0006 0.0425 -0.0438 0.0319 </span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_2 -0.0008 -0.0002 0.0216 -0.0267 -0.0890 -0.0349 </span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_ilr_3 -0.1805 -0.0136 0.0434 0.0791 0.0390 -0.0061 0.0053 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> SD.DMTA_0 3.5956 -0.8167 8.0078</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_DMTA 0.6437 0.2784 1.0091</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_M23 0.9929 0.3719 1.6139</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_M27 0.4530 0.1522 0.7537</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_M31 0.5773 0.1952 0.9595</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_DMTA_ilr_1 0.4063 0.1505 0.6621</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_DMTA_ilr_2 0.4800 0.1817 0.7783</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_DMTA_ilr_3 0.3582 0.1350 0.5814</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance model:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 0.9196 0.8307 1.0085</span> +<span class="r-out co"><span class="r-pr">#></span> b.1 0.1377 0.1205 0.1549</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_0 88.48621 84.112654 92.85977</span> +<span class="r-out co"><span class="r-pr">#></span> k_DMTA 0.04730 0.028230 0.07926</span> +<span class="r-out co"><span class="r-pr">#></span> k_M23 0.01729 0.007437 0.04020</span> +<span class="r-out co"><span class="r-pr">#></span> k_M27 0.02110 0.014162 0.03144</span> +<span class="r-out co"><span class="r-pr">#></span> k_M31 0.01872 0.011283 0.03107</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_to_M23 0.14551 NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_to_M27 0.12169 NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> f_DMTA_to_M31 0.11062 NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Resulting formation fractions:</span> +<span class="r-out co"><span class="r-pr">#></span> ff</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_M23 0.1455</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_M27 0.1217</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_M31 0.1106</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA_sink 0.6222</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> DMTA 14.65 48.68</span> +<span class="r-out co"><span class="r-pr">#></span> M23 40.09 133.17</span> +<span class="r-out co"><span class="r-pr">#></span> M27 32.85 109.11</span> +<span class="r-out co"><span class="r-pr">#></span> M31 37.02 122.97</span> +<span class="r-in"><span><span class="co"># As the confidence interval for the random effects of DMTA_0</span></span></span> +<span class="r-in"><span><span class="co"># includes zero, we could try an alternative model without</span></span></span> +<span class="r-in"><span><span class="co"># such random effects</span></span></span> +<span class="r-in"><span><span class="co"># f_dmta_saem_tc_2 <- saem(dmta_sfo_sfo3p_tc,</span></span></span> +<span class="r-in"><span><span class="co"># covariance.model = diag(c(0, rep(1, 7))))</span></span></span> +<span class="r-in"><span><span class="co"># saemix::plot(f_dmta_saem_tc_2$so, plot.type = "convergence")</span></span></span> +<span class="r-in"><span><span class="co"># This does not perform better judged by AIC and BIC</span></span></span> +<span class="r-in"><span><span class="co"># saemix::compare.saemix(f_dmta_saem_tc$so, f_dmta_saem_tc_2$so)</span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/ds_dfop.html b/docs/dev/reference/ds_dfop.html new file mode 100644 index 00000000..66134d2e --- /dev/null +++ b/docs/dev/reference/ds_dfop.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html"> + </head> +</html> + diff --git a/docs/dev/reference/ds_dfop_sfo.html b/docs/dev/reference/ds_dfop_sfo.html new file mode 100644 index 00000000..66134d2e --- /dev/null +++ b/docs/dev/reference/ds_dfop_sfo.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html"> + </head> +</html> + diff --git a/docs/dev/reference/ds_fomc.html b/docs/dev/reference/ds_fomc.html new file mode 100644 index 00000000..66134d2e --- /dev/null +++ b/docs/dev/reference/ds_fomc.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html"> + </head> +</html> + diff --git a/docs/dev/reference/ds_hs.html b/docs/dev/reference/ds_hs.html new file mode 100644 index 00000000..66134d2e --- /dev/null +++ b/docs/dev/reference/ds_hs.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html"> + </head> +</html> + diff --git a/docs/dev/reference/ds_mixed-1.png b/docs/dev/reference/ds_mixed-1.png Binary files differnew file mode 100644 index 00000000..7968f1c9 --- /dev/null +++ b/docs/dev/reference/ds_mixed-1.png diff --git a/docs/dev/reference/ds_mixed.html b/docs/dev/reference/ds_mixed.html new file mode 100644 index 00000000..875949dd --- /dev/null +++ b/docs/dev/reference/ds_mixed.html @@ -0,0 +1,208 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Synthetic data for hierarchical kinetic degradation models — ds_mixed • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Synthetic data for hierarchical kinetic degradation models — ds_mixed"><meta name="description" content="The R code used to create this data object is installed with this package in +the 'dataset_generation' directory."><meta property="og:description" content="The R code used to create this data object is installed with this package in +the 'dataset_generation' directory."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Synthetic data for hierarchical kinetic degradation models</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/ds_mixed.R" class="external-link"><code>R/ds_mixed.R</code></a></small> + <div class="d-none name"><code>ds_mixed.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The R code used to create this data object is installed with this package in +the 'dataset_generation' directory.</p> + </div> + + + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <span class="va">sfo_mmkin</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_sfo</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, cores <span class="op">=</span> <span class="fl">15</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">sfo_saem</span> <span class="op"><-</span> <span class="fu"><a href="saem.html">saem</a></span><span class="op">(</span><span class="va">sfo_mmkin</span>, no_random_effect <span class="op">=</span> <span class="st">"parent_0"</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">sfo_saem</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="ds_mixed-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># This is the code used to generate the datasets</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/cat.html" class="external-link">cat</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/readLines.html" class="external-link">readLines</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span><span class="st">"dataset_generation/ds_mixed.R"</span>, package <span class="op">=</span> <span class="st">"mkin"</span><span class="op">)</span><span class="op">)</span>, sep <span class="op">=</span> <span class="st">"\n"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> # Synthetic data for hierarchical kinetic models</span> +<span class="r-out co"><span class="r-pr">#></span> # Refactored version of the code previously in tests/testthat/setup_script.R</span> +<span class="r-out co"><span class="r-pr">#></span> # The number of datasets was 3 for FOMC, and 10 for HS in that script, now it</span> +<span class="r-out co"><span class="r-pr">#></span> # is always 15 for consistency</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> library(mkin) # We use mkinmod and mkinpredict</span> +<span class="r-out co"><span class="r-pr">#></span> sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120)</span> +<span class="r-out co"><span class="r-pr">#></span> n <- 15</span> +<span class="r-out co"><span class="r-pr">#></span> log_sd <- 0.3</span> +<span class="r-out co"><span class="r-pr">#></span> err_1 = list(const = 1, prop = 0.05)</span> +<span class="r-out co"><span class="r-pr">#></span> tc <- function(value) sigma_twocomp(value, err_1$const, err_1$prop)</span> +<span class="r-out co"><span class="r-pr">#></span> const <- function(value) 2</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> SFO <- mkinmod(parent = mkinsub("SFO"))</span> +<span class="r-out co"><span class="r-pr">#></span> sfo_pop <- list(parent_0 = 100, k_parent = 0.03)</span> +<span class="r-out co"><span class="r-pr">#></span> sfo_parms <- as.matrix(data.frame(</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent = rlnorm(n, log(sfo_pop$k_parent), log_sd)))</span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> ds_sfo <- lapply(1:n, function(i) {</span> +<span class="r-out co"><span class="r-pr">#></span> ds_mean <- mkinpredict(SFO, sfo_parms[i, ],</span> +<span class="r-out co"><span class="r-pr">#></span> c(parent = sfo_pop$parent_0), sampling_times)</span> +<span class="r-out co"><span class="r-pr">#></span> add_err(ds_mean, tc, n = 1)[[1]]</span> +<span class="r-out co"><span class="r-pr">#></span> })</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_sfo, "pop") <- sfo_pop</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_sfo, "parms") <- sfo_parms</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC <- mkinmod(parent = mkinsub("FOMC"))</span> +<span class="r-out co"><span class="r-pr">#></span> fomc_pop <- list(parent_0 = 100, alpha = 2, beta = 8)</span> +<span class="r-out co"><span class="r-pr">#></span> fomc_parms <- as.matrix(data.frame(</span> +<span class="r-out co"><span class="r-pr">#></span> alpha = rlnorm(n, log(fomc_pop$alpha), 0.4),</span> +<span class="r-out co"><span class="r-pr">#></span> beta = rlnorm(n, log(fomc_pop$beta), 0.2)))</span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> ds_fomc <- lapply(1:n, function(i) {</span> +<span class="r-out co"><span class="r-pr">#></span> ds_mean <- mkinpredict(FOMC, fomc_parms[i, ],</span> +<span class="r-out co"><span class="r-pr">#></span> c(parent = fomc_pop$parent_0), sampling_times)</span> +<span class="r-out co"><span class="r-pr">#></span> add_err(ds_mean, tc, n = 1)[[1]]</span> +<span class="r-out co"><span class="r-pr">#></span> })</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_fomc, "pop") <- fomc_pop</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_fomc, "parms") <- fomc_parms</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP <- mkinmod(parent = mkinsub("DFOP"))</span> +<span class="r-out co"><span class="r-pr">#></span> dfop_pop <- list(parent_0 = 100, k1 = 0.06, k2 = 0.015, g = 0.4)</span> +<span class="r-out co"><span class="r-pr">#></span> dfop_parms <- as.matrix(data.frame(</span> +<span class="r-out co"><span class="r-pr">#></span> k1 = rlnorm(n, log(dfop_pop$k1), log_sd),</span> +<span class="r-out co"><span class="r-pr">#></span> k2 = rlnorm(n, log(dfop_pop$k2), log_sd),</span> +<span class="r-out co"><span class="r-pr">#></span> g = plogis(rnorm(n, qlogis(dfop_pop$g), log_sd))))</span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> ds_dfop <- lapply(1:n, function(i) {</span> +<span class="r-out co"><span class="r-pr">#></span> ds_mean <- mkinpredict(DFOP, dfop_parms[i, ],</span> +<span class="r-out co"><span class="r-pr">#></span> c(parent = dfop_pop$parent_0), sampling_times)</span> +<span class="r-out co"><span class="r-pr">#></span> add_err(ds_mean, tc, n = 1)[[1]]</span> +<span class="r-out co"><span class="r-pr">#></span> })</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_dfop, "pop") <- dfop_pop</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_dfop, "parms") <- dfop_parms</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> HS <- mkinmod(parent = mkinsub("HS"))</span> +<span class="r-out co"><span class="r-pr">#></span> hs_pop <- list(parent_0 = 100, k1 = 0.08, k2 = 0.01, tb = 15)</span> +<span class="r-out co"><span class="r-pr">#></span> hs_parms <- as.matrix(data.frame(</span> +<span class="r-out co"><span class="r-pr">#></span> k1 = rlnorm(n, log(hs_pop$k1), log_sd),</span> +<span class="r-out co"><span class="r-pr">#></span> k2 = rlnorm(n, log(hs_pop$k2), log_sd),</span> +<span class="r-out co"><span class="r-pr">#></span> tb = rlnorm(n, log(hs_pop$tb), 0.1)))</span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> ds_hs <- lapply(1:n, function(i) {</span> +<span class="r-out co"><span class="r-pr">#></span> ds_mean <- mkinpredict(HS, hs_parms[i, ],</span> +<span class="r-out co"><span class="r-pr">#></span> c(parent = hs_pop$parent_0), sampling_times)</span> +<span class="r-out co"><span class="r-pr">#></span> add_err(ds_mean, const, n = 1)[[1]]</span> +<span class="r-out co"><span class="r-pr">#></span> })</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_hs, "pop") <- hs_pop</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_hs, "parms") <- hs_parms</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP_SFO <- mkinmod(</span> +<span class="r-out co"><span class="r-pr">#></span> parent = mkinsub("DFOP", "m1"),</span> +<span class="r-out co"><span class="r-pr">#></span> m1 = mkinsub("SFO"),</span> +<span class="r-out co"><span class="r-pr">#></span> quiet = TRUE)</span> +<span class="r-out co"><span class="r-pr">#></span> dfop_sfo_pop <- list(parent_0 = 100,</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 = 0.007, f_parent_to_m1 = 0.5,</span> +<span class="r-out co"><span class="r-pr">#></span> k1 = 0.1, k2 = 0.02, g = 0.5)</span> +<span class="r-out co"><span class="r-pr">#></span> dfop_sfo_parms <- as.matrix(data.frame(</span> +<span class="r-out co"><span class="r-pr">#></span> k1 = rlnorm(n, log(dfop_sfo_pop$k1), log_sd),</span> +<span class="r-out co"><span class="r-pr">#></span> k2 = rlnorm(n, log(dfop_sfo_pop$k2), log_sd),</span> +<span class="r-out co"><span class="r-pr">#></span> g = plogis(rnorm(n, qlogis(dfop_sfo_pop$g), log_sd)),</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 = plogis(rnorm(n,</span> +<span class="r-out co"><span class="r-pr">#></span> qlogis(dfop_sfo_pop$f_parent_to_m1), log_sd)),</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 = rlnorm(n, log(dfop_sfo_pop$k_m1), log_sd)))</span> +<span class="r-out co"><span class="r-pr">#></span> ds_dfop_sfo_mean <- lapply(1:n,</span> +<span class="r-out co"><span class="r-pr">#></span> function(i) {</span> +<span class="r-out co"><span class="r-pr">#></span> mkinpredict(DFOP_SFO, dfop_sfo_parms[i, ],</span> +<span class="r-out co"><span class="r-pr">#></span> c(parent = dfop_sfo_pop$parent_0, m1 = 0), sampling_times)</span> +<span class="r-out co"><span class="r-pr">#></span> }</span> +<span class="r-out co"><span class="r-pr">#></span> )</span> +<span class="r-out co"><span class="r-pr">#></span> set.seed(123456)</span> +<span class="r-out co"><span class="r-pr">#></span> ds_dfop_sfo <- lapply(ds_dfop_sfo_mean, function(ds) {</span> +<span class="r-out co"><span class="r-pr">#></span> add_err(ds,</span> +<span class="r-out co"><span class="r-pr">#></span> sdfunc = function(value) sqrt(err_1$const^2 + value^2 * err_1$prop^2),</span> +<span class="r-out co"><span class="r-pr">#></span> n = 1, secondary = "m1")[[1]]</span> +<span class="r-out co"><span class="r-pr">#></span> })</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_dfop_sfo, "pop") <- dfop_sfo_pop</span> +<span class="r-out co"><span class="r-pr">#></span> attr(ds_dfop_sfo, "parms") <- dfop_sfo_parms</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> #save(ds_sfo, ds_fomc, ds_dfop, ds_hs, ds_dfop_sfo, file = "data/ds_mixed.rda", version = 2)</span> +</code></pre></div> + </div> + </main></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/ds_sfo.html b/docs/dev/reference/ds_sfo.html new file mode 100644 index 00000000..66134d2e --- /dev/null +++ b/docs/dev/reference/ds_sfo.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/ds_mixed.html"> + </head> +</html> + diff --git a/docs/dev/reference/endpoints.html b/docs/dev/reference/endpoints.html new file mode 100644 index 00000000..daa1ec0b --- /dev/null +++ b/docs/dev/reference/endpoints.html @@ -0,0 +1,181 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Function to calculate endpoints for further use from kinetic models fitted with mkinfit — endpoints • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to calculate endpoints for further use from kinetic models fitted with mkinfit — endpoints"><meta name="description" content="This function calculates DT50 and DT90 values as well as formation fractions +from kinetic models fitted with mkinfit. If the SFORB model was specified +for one of the parents or metabolites, the Eigenvalues are returned. These +are equivalent to the rate constants of the DFOP model, but with the +advantage that the SFORB model can also be used for metabolites."><meta property="og:description" content="This function calculates DT50 and DT90 values as well as formation fractions +from kinetic models fitted with mkinfit. If the SFORB model was specified +for one of the parents or metabolites, the Eigenvalues are returned. These +are equivalent to the rate constants of the DFOP model, but with the +advantage that the SFORB model can also be used for metabolites."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/endpoints.R" class="external-link"><code>R/endpoints.R</code></a></small> + <div class="d-none name"><code>endpoints.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function calculates DT50 and DT90 values as well as formation fractions +from kinetic models fitted with mkinfit. If the SFORB model was specified +for one of the parents or metabolites, the Eigenvalues are returned. These +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> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">endpoints</span><span class="op">(</span><span class="va">fit</span>, covariates <span class="op">=</span> <span class="cn">NULL</span>, covariate_quantile <span class="op">=</span> <span class="fl">0.5</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-fit">fit<a class="anchor" aria-label="anchor" href="#arg-fit"></a></dt> +<dd><p>An object of class <a href="mkinfit.html">mkinfit</a>, <a href="nlme.mmkin.html">nlme.mmkin</a> or <a href="saem.html">saem.mmkin</a>, or +another object that has list components mkinmod containing an <a href="mkinmod.html">mkinmod</a> +degradation model, and two numeric vectors, bparms.optim and bparms.fixed, +that contain parameter values for that model.</p></dd> + + +<dt id="arg-covariates">covariates<a class="anchor" aria-label="anchor" href="#arg-covariates"></a></dt> +<dd><p>Numeric vector with covariate values for all variables in +any covariate models in the object. If given, it overrides 'covariate_quantile'.</p></dd> + + +<dt id="arg-covariate-quantile">covariate_quantile<a class="anchor" aria-label="anchor" href="#arg-covariate-quantile"></a></dt> +<dd><p>This argument only has an effect if the fitted +object has covariate models. If so, the default is to show endpoints +for the median of the covariate values (50th percentile).</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A list with a matrix of dissipation times named distimes, and, if +applicable, a vector of formation fractions named ff and, if the SFORB model +was in use, a vector of eigenvalues of these SFORB models, equivalent to +DFOP rate constants</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>Additional DT50 values are calculated from the FOMC DT90 and k1 and k2 from +HS and DFOP, as well as from Eigenvalues b1 and b2 of any SFORB models</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>The function is used internally by <a href="summary.mkinfit.html">summary.mkinfit</a>, +<a href="summary.nlme.mmkin.html">summary.nlme.mmkin</a> and <a href="summary.saem.mmkin.html">summary.saem.mmkin</a>.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><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">"FOMC"</span>, <span class="va">FOCUS_2006_C</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu">endpoints</span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back</span> +<span class="r-out co"><span class="r-pr">#></span> parent 1.785233 15.1479 4.559973</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span> <span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <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></span> +<span class="r-in"><span> <span class="fu">endpoints</span><span class="op">(</span><span class="va">fit_2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back DT50_k1 DT50_k2</span> +<span class="r-out co"><span class="r-pr">#></span> parent 1.886925 21.25106 6.397207 1.508293 38.83438</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span> <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></span> +<span class="r-in"><span> <span class="fu">endpoints</span><span class="op">(</span><span class="va">fit_3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_free </span> +<span class="r-out co"><span class="r-pr">#></span> 1 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $SFORB</span> +<span class="r-out co"><span class="r-pr">#></span> parent_b1 parent_b2 parent_g </span> +<span class="r-out co"><span class="r-pr">#></span> 0.4595574 0.0178488 0.8539454 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back DT50_parent_b1 DT50_parent_b2</span> +<span class="r-out co"><span class="r-pr">#></span> parent 1.886925 21.25106 6.397208 1.508293 38.83438</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span> <span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/experimental_data_for_UBA-1.png b/docs/dev/reference/experimental_data_for_UBA-1.png Binary files differnew file mode 100644 index 00000000..07c1b33e --- /dev/null +++ b/docs/dev/reference/experimental_data_for_UBA-1.png diff --git a/docs/dev/reference/experimental_data_for_UBA.html b/docs/dev/reference/experimental_data_for_UBA.html new file mode 100644 index 00000000..93ed1dfa --- /dev/null +++ b/docs/dev/reference/experimental_data_for_UBA.html @@ -0,0 +1,255 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019 • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019"><meta name="description" content="The 12 datasets were extracted from active substance evaluation dossiers published + by EFSA. Kinetic evaluations shown for these datasets are intended to illustrate + and advance error model specifications. The fact that these data and some + results are shown here do not imply a license to use them in the context of + pesticide registrations, as the use of the data may be constrained by + data protection regulations. +Preprocessing of data was performed based on the recommendations of the FOCUS + kinetics workgroup (FOCUS, 2014) as described below. +Datasets 1 and 2 are from the Renewal Assessment Report (RAR) for imazamox + (France, 2015, p. 15). For setting values reported as zero, an LOQ of 0.1 + was assumed. Metabolite residues reported for day zero were added to the + parent compound residues. +Datasets 3 and 4 are from the Renewal Assessment Report (RAR) for isofetamid + (Belgium, 2014, p. 8) and show the data for two different radiolabels. For + dataset 4, the value given for the metabolite in the day zero sampling + in replicate B was added to the parent compound, following the respective + FOCUS recommendation. +Dataset 5 is from the Renewal Assessment Report (RAR) for ethofumesate + (Austria, 2015, p. 16). +Datasets 6 to 10 are from the Renewal Assessment Report (RAR) for glyphosate + (Germany, 2013, pages 8, 28, 50, 51). For the initial sampling, + the residues given for the metabolite were added to the parent + value, following the recommendation of the FOCUS kinetics workgroup. +Dataset 11 is from the Renewal Assessment Report (RAR) for 2,4-D + (Hellas, 2013, p. 644). Values reported as zero were set to NA, with + the exception of the day three sampling of metabolite A2, which was set + to one half of the LOD reported to be 1% AR. +Dataset 12 is from the Renewal Assessment Report (RAR) for thifensulfuron-methyl + (United Kingdom, 2014, p. 81)."><meta property="og:description" content="The 12 datasets were extracted from active substance evaluation dossiers published + by EFSA. Kinetic evaluations shown for these datasets are intended to illustrate + and advance error model specifications. The fact that these data and some + results are shown here do not imply a license to use them in the context of + pesticide registrations, as the use of the data may be constrained by + data protection regulations. +Preprocessing of data was performed based on the recommendations of the FOCUS + kinetics workgroup (FOCUS, 2014) as described below. +Datasets 1 and 2 are from the Renewal Assessment Report (RAR) for imazamox + (France, 2015, p. 15). For setting values reported as zero, an LOQ of 0.1 + was assumed. Metabolite residues reported for day zero were added to the + parent compound residues. +Datasets 3 and 4 are from the Renewal Assessment Report (RAR) for isofetamid + (Belgium, 2014, p. 8) and show the data for two different radiolabels. For + dataset 4, the value given for the metabolite in the day zero sampling + in replicate B was added to the parent compound, following the respective + FOCUS recommendation. +Dataset 5 is from the Renewal Assessment Report (RAR) for ethofumesate + (Austria, 2015, p. 16). +Datasets 6 to 10 are from the Renewal Assessment Report (RAR) for glyphosate + (Germany, 2013, pages 8, 28, 50, 51). For the initial sampling, + the residues given for the metabolite were added to the parent + value, following the recommendation of the FOCUS kinetics workgroup. +Dataset 11 is from the Renewal Assessment Report (RAR) for 2,4-D + (Hellas, 2013, p. 644). Values reported as zero were set to NA, with + the exception of the day three sampling of metabolite A2, which was set + to one half of the LOD reported to be 1% AR. +Dataset 12 is from the Renewal Assessment Report (RAR) for thifensulfuron-methyl + (United Kingdom, 2014, p. 81)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Experimental datasets used for development and testing of error models</h1> + + <div class="d-none name"><code>experimental_data_for_UBA.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The 12 datasets were extracted from active substance evaluation dossiers published + by EFSA. Kinetic evaluations shown for these datasets are intended to illustrate + and advance error model specifications. The fact that these data and some + results are shown here do not imply a license to use them in the context of + pesticide registrations, as the use of the data may be constrained by + data protection regulations.</p> +<p>Preprocessing of data was performed based on the recommendations of the FOCUS + kinetics workgroup (FOCUS, 2014) as described below.</p> +<p>Datasets 1 and 2 are from the Renewal Assessment Report (RAR) for imazamox + (France, 2015, p. 15). For setting values reported as zero, an LOQ of 0.1 + was assumed. Metabolite residues reported for day zero were added to the + parent compound residues.</p> +<p>Datasets 3 and 4 are from the Renewal Assessment Report (RAR) for isofetamid + (Belgium, 2014, p. 8) and show the data for two different radiolabels. For + dataset 4, the value given for the metabolite in the day zero sampling + in replicate B was added to the parent compound, following the respective + FOCUS recommendation.</p> +<p>Dataset 5 is from the Renewal Assessment Report (RAR) for ethofumesate + (Austria, 2015, p. 16).</p> +<p>Datasets 6 to 10 are from the Renewal Assessment Report (RAR) for glyphosate + (Germany, 2013, pages 8, 28, 50, 51). For the initial sampling, + the residues given for the metabolite were added to the parent + value, following the recommendation of the FOCUS kinetics workgroup.</p> +<p>Dataset 11 is from the Renewal Assessment Report (RAR) for 2,4-D + (Hellas, 2013, p. 644). Values reported as zero were set to NA, with + the exception of the day three sampling of metabolite A2, which was set + to one half of the LOD reported to be 1% AR.</p> +<p>Dataset 12 is from the Renewal Assessment Report (RAR) for thifensulfuron-methyl + (United Kingdom, 2014, p. 81).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">experimental_data_for_UBA_2019</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A list containing twelve datasets as an R6 class defined by <code><a href="mkinds.html">mkinds</a></code>, + each containing, among others, the following components</p><dl><dt><code>title</code></dt> +<dd><p>The name of the dataset, e.g. <code>Soil 1</code></p></dd> + + <dt><code>data</code></dt> +<dd><p>A data frame with the data in the form expected by <code><a href="mkinfit.html">mkinfit</a></code></p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + + +<p>Austria (2015). Ethofumesate Renewal Assessment Report Volume 3 Annex B.8 (AS)</p> +<p>Belgium (2014). Isofetamid (IKF-5411) Draft Assessment Report Volume 3 Annex B.8 (AS)</p> +<p>France (2015). Imazamox Draft Renewal Assessment Report Volume 3 Annex B.8 (AS)</p> +<p>FOCUS (2014) “Generic guidance for Estimating Persistence and + Degradation Kinetics from Environmental Fate Studies on Pesticides in EU + Registration” Report of the FOCUS Work Group on Degradation Kinetics, + Version 1.1, 18 December 2014 + <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> +<p>Germany (2013). Renewal Assessment Report Glyphosate Volume 3 Annex B.8: Environmental Fate + and Behaviour</p> +<p>Hellas (2013). Renewal Assessment Report 2,4-D Volume 3 Annex B.8: Fate and behaviour in the + environment</p> +<p>Ranke (2019) Documentation of results obtained for the error model expertise + written for the German Umweltbundesamt.</p> +<p>United Kingdom (2014). Thifensulfuron-methyl - Annex B.8 (Volume 3) to the Report and Proposed + Decision of the United Kingdom made to the European Commission under Regulation (EC) No. + 1141/2010 for renewal of an active substance</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Model definitions</span></span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> use_of_ff <span class="op">=</span> <span class="st">"max"</span></span></span> +<span class="r-in"><span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">dfop_sfo</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, to <span class="op">=</span> <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> use_of_ff <span class="op">=</span> <span class="st">"max"</span></span></span> +<span class="r-in"><span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><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></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"A2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A2 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> use_of_ff <span class="op">=</span> <span class="st">"max"</span></span></span> +<span class="r-in"><span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">dfop_sfo_sfo</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, to <span class="op">=</span> <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"A2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A2 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> use_of_ff <span class="op">=</span> <span class="st">"max"</span></span></span> +<span class="r-in"><span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="va">d_1_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="va">experimental_data_for_UBA_2019</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">2</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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">d_1_2</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste</a></span><span class="op">(</span><span class="st">"Soil"</span>, <span class="fl">1</span><span class="op">:</span><span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">f_1_2_tc</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" class="external-link">list</a></span><span class="op">(</span><span class="st">"DFOP-SFO-SFO"</span> <span class="op">=</span> <span class="va">dfop_sfo_sfo</span><span class="op">)</span>, <span class="va">d_1_2</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_1_2_tc</span>, resplot <span class="op">=</span> <span class="st">"errmod"</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="experimental_data_for_UBA-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/f_time_norm_focus.html b/docs/dev/reference/f_time_norm_focus.html new file mode 100644 index 00000000..f59f5eb2 --- /dev/null +++ b/docs/dev/reference/f_time_norm_focus.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Normalisation factors for aerobic soil degradation according to FOCUS guidance — f_time_norm_focus • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Normalisation factors for aerobic soil degradation according to FOCUS guidance — f_time_norm_focus"><meta name="description" content="Time step normalisation factors for aerobic soil degradation as described +in Appendix 8 to the FOCUS kinetics guidance (FOCUS 2014, p. 369)."><meta property="og:description" content="Time step normalisation factors for aerobic soil degradation as described +in Appendix 8 to the FOCUS kinetics guidance (FOCUS 2014, p. 369)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Normalisation factors for aerobic soil degradation according to FOCUS guidance</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/f_time_norm_focus.R" class="external-link"><code>R/f_time_norm_focus.R</code></a></small> + <div class="d-none name"><code>f_time_norm_focus.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Time step normalisation factors for aerobic soil degradation as described +in Appendix 8 to the FOCUS kinetics guidance (FOCUS 2014, p. 369).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">f_time_norm_focus</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'numeric'</span></span> +<span><span class="fu">f_time_norm_focus</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> moisture <span class="op">=</span> <span class="cn">NA</span>,</span> +<span> field_moisture <span class="op">=</span> <span class="cn">NA</span>,</span> +<span> temperature <span class="op">=</span> <span class="va">object</span>,</span> +<span> Q10 <span class="op">=</span> <span class="fl">2.58</span>,</span> +<span> walker <span class="op">=</span> <span class="fl">0.7</span>,</span> +<span> f_na <span class="op">=</span> <span class="cn">NA</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mkindsg'</span></span> +<span><span class="fu">f_time_norm_focus</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> study_moisture_ref_source <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"auto"</span>, <span class="st">"meta"</span>, <span class="st">"focus"</span><span class="op">)</span>,</span> +<span> Q10 <span class="op">=</span> <span class="fl">2.58</span>,</span> +<span> walker <span class="op">=</span> <span class="fl">0.7</span>,</span> +<span> f_na <span class="op">=</span> <span class="cn">NA</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An object containing information used for the calculations</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Currently not used</p></dd> + + +<dt id="arg-moisture">moisture<a class="anchor" aria-label="anchor" href="#arg-moisture"></a></dt> +<dd><p>Numeric vector of moisture contents in \% w/w</p></dd> + + +<dt id="arg-field-moisture">field_moisture<a class="anchor" aria-label="anchor" href="#arg-field-moisture"></a></dt> +<dd><p>Numeric vector of moisture contents at field capacity +(pF2) in \% w/w</p></dd> + + +<dt id="arg-temperature">temperature<a class="anchor" aria-label="anchor" href="#arg-temperature"></a></dt> +<dd><p>Numeric vector of temperatures in °C</p></dd> + + +<dt id="arg-q-">Q10<a class="anchor" aria-label="anchor" href="#arg-q-"></a></dt> +<dd><p>The Q10 value used for temperature normalisation</p></dd> + + +<dt id="arg-walker">walker<a class="anchor" aria-label="anchor" href="#arg-walker"></a></dt> +<dd><p>The Walker exponent used for moisture normalisation</p></dd> + + +<dt id="arg-f-na">f_na<a class="anchor" aria-label="anchor" href="#arg-f-na"></a></dt> +<dd><p>The factor to use for NA values. If set to NA, only factors +for complete cases will be returned.</p></dd> + + +<dt id="arg-study-moisture-ref-source">study_moisture_ref_source<a class="anchor" aria-label="anchor" href="#arg-study-moisture-ref-source"></a></dt> +<dd><p>Source for the reference value +used to calculate the study moisture. If 'auto', preference is given +to a reference moisture given in the meta information, otherwise +the focus soil moisture for the soil class is used</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a> +FOCUS (2014) “Generic guidance for Estimating Persistence +and Degradation Kinetics from Environmental Fate Studies on Pesticides in +EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, +Version 1.1, 18 December 2014 +<a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><a href="focus_soil_moisture.html">focus_soil_moisture</a></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">f_time_norm_focus</span><span class="op">(</span><span class="fl">25</span>, <span class="fl">20</span>, <span class="fl">25</span><span class="op">)</span> <span class="co"># 1.37, compare FOCUS 2014 p. 184</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.373956</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">D24_2014</span><span class="op">$</span><span class="va">meta</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> study usda_soil_type study_moisture_ref_type</span> +<span class="r-out co"><span class="r-pr">#></span> Mississippi Cohen 1991 Silt loam <NA></span> +<span class="r-out co"><span class="r-pr">#></span> Fayette Liu and Adelfinskaya 2011 Silt loam pF1</span> +<span class="r-out co"><span class="r-pr">#></span> RefSol 03-G Liu and Adelfinskaya 2011 Loam pF1</span> +<span class="r-out co"><span class="r-pr">#></span> Site E1 Liu and Adelfinskaya 2011 Loam pF1</span> +<span class="r-out co"><span class="r-pr">#></span> Site I2 Liu and Adelfinskaya 2011 Loamy sand pF1</span> +<span class="r-out co"><span class="r-pr">#></span> rel_moisture temperature</span> +<span class="r-out co"><span class="r-pr">#></span> Mississippi NA 25</span> +<span class="r-out co"><span class="r-pr">#></span> Fayette 0.5 20</span> +<span class="r-out co"><span class="r-pr">#></span> RefSol 03-G 0.5 20</span> +<span class="r-out co"><span class="r-pr">#></span> Site E1 0.5 20</span> +<span class="r-out co"><span class="r-pr">#></span> Site I2 0.5 20</span> +<span class="r-in"><span><span class="co"># No moisture normalisation in the first dataset, so we use f_na = 1 to get</span></span></span> +<span class="r-in"><span><span class="co"># temperature only normalisation as in the EU evaluation</span></span></span> +<span class="r-in"><span><span class="fu">f_time_norm_focus</span><span class="op">(</span><span class="va">D24_2014</span>, study_moisture_ref_source <span class="op">=</span> <span class="st">"focus"</span>, f_na <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> $f_time_norm was (re)set to normalised values</span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/f_time_norm_focus.mkindsg.html b/docs/dev/reference/f_time_norm_focus.mkindsg.html new file mode 100644 index 00000000..9a442194 --- /dev/null +++ b/docs/dev/reference/f_time_norm_focus.mkindsg.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/f_time_norm_focus.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/f_time_norm_focus.html"> + </head> +</html> + diff --git a/docs/dev/reference/f_time_norm_focus.numeric.html b/docs/dev/reference/f_time_norm_focus.numeric.html new file mode 100644 index 00000000..9a442194 --- /dev/null +++ b/docs/dev/reference/f_time_norm_focus.numeric.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/f_time_norm_focus.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/f_time_norm_focus.html"> + </head> +</html> + diff --git a/docs/dev/reference/focus_soil_moisture.html b/docs/dev/reference/focus_soil_moisture.html new file mode 100644 index 00000000..8feadc34 --- /dev/null +++ b/docs/dev/reference/focus_soil_moisture.html @@ -0,0 +1,123 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar — focus_soil_moisture • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar — focus_soil_moisture"><meta name="description" content="The value were transcribed from p. 36. The table assumes field capacity +corresponds to pF2, MWHC to pF 1 and 1/3 bar to pF 2.5."><meta property="og:description" content="The value were transcribed from p. 36. The table assumes field capacity +corresponds to pF2, MWHC to pF 1 and 1/3 bar to pF 2.5."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/focus_soil_moisture.R" class="external-link"><code>R/focus_soil_moisture.R</code></a></small> + <div class="d-none name"><code>focus_soil_moisture.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The value were transcribed from p. 36. The table assumes field capacity +corresponds to pF2, MWHC to pF 1 and 1/3 bar to pF 2.5.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">focus_soil_moisture</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A matrix with upper case USDA soil classes as row names, and water tension +('pF1', 'pF2', 'pF 2.5') as column names</p> + </div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>Anonymous (2014) Generic Guidance for Tier 1 FOCUS Ground Water Assessment +Version 2.2, May 2014 <a href="https://esdac.jrc.ec.europa.eu/projects/ground-water" class="external-link">https://esdac.jrc.ec.europa.eu/projects/ground-water</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">focus_soil_moisture</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> pF1 pF2 pF2.5</span> +<span class="r-out co"><span class="r-pr">#></span> Sand 24 12 7</span> +<span class="r-out co"><span class="r-pr">#></span> Loamy sand 24 14 9</span> +<span class="r-out co"><span class="r-pr">#></span> Sandy loam 27 19 15</span> +<span class="r-out co"><span class="r-pr">#></span> Sandy clay loam 28 22 18</span> +<span class="r-out co"><span class="r-pr">#></span> Clay loam 32 28 25</span> +<span class="r-out co"><span class="r-pr">#></span> Loam 31 25 21</span> +<span class="r-out co"><span class="r-pr">#></span> Silt loam 32 26 21</span> +<span class="r-out co"><span class="r-pr">#></span> Silty clay loam 34 30 27</span> +<span class="r-out co"><span class="r-pr">#></span> Silt 31 27 21</span> +<span class="r-out co"><span class="r-pr">#></span> Sandy clay 41 35 31</span> +<span class="r-out co"><span class="r-pr">#></span> Silty clay 44 40 36</span> +<span class="r-out co"><span class="r-pr">#></span> Clay 53 48 43</span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/get_deg_func.html b/docs/dev/reference/get_deg_func.html new file mode 100644 index 00000000..d3f3dc10 --- /dev/null +++ b/docs/dev/reference/get_deg_func.html @@ -0,0 +1,97 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Retrieve a degradation function from the mmkin namespace — get_deg_func • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Retrieve a degradation function from the mmkin namespace — get_deg_func"><meta name="description" content="Retrieve a degradation function from the mmkin namespace"><meta property="og:description" content="Retrieve a degradation function from the mmkin namespace"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Retrieve a degradation function from the mmkin namespace</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/nlme.mmkin.R" class="external-link"><code>R/nlme.mmkin.R</code></a></small> + <div class="d-none name"><code>get_deg_func.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Retrieve a degradation function from the mmkin namespace</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">get_deg_func</span><span class="op">(</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A function that was likely previously assigned from within +nlme.mmkin</p> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/hierarchical_kinetics.html b/docs/dev/reference/hierarchical_kinetics.html new file mode 100644 index 00000000..1c225992 --- /dev/null +++ b/docs/dev/reference/hierarchical_kinetics.html @@ -0,0 +1,158 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Hierarchical kinetics template — hierarchical_kinetics • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Hierarchical kinetics template — hierarchical_kinetics"><meta name="description" content='R markdown format for setting up hierarchical kinetics based on a template +provided with the mkin package. This format is based on rmarkdown::pdf_document. +Chunk options are adapted. Echoing R code from code chunks and caching are +turned on per default. character for prepending output from code chunks is +set to the empty string, code tidying is off, figure alignment defaults to +centering, and positioning of figures is set to "H", which means that +figures will not move around in the document, but stay where the user +includes them.'><meta property="og:description" content='R markdown format for setting up hierarchical kinetics based on a template +provided with the mkin package. This format is based on rmarkdown::pdf_document. +Chunk options are adapted. Echoing R code from code chunks and caching are +turned on per default. character for prepending output from code chunks is +set to the empty string, code tidying is off, figure alignment defaults to +centering, and positioning of figures is set to "H", which means that +figures will not move around in the document, but stay where the user +includes them.'><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Hierarchical kinetics template</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/hierarchical_kinetics.R" class="external-link"><code>R/hierarchical_kinetics.R</code></a></small> + <div class="d-none name"><code>hierarchical_kinetics.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>R markdown format for setting up hierarchical kinetics based on a template +provided with the mkin package. This format is based on <a href="https://pkgs.rstudio.com/rmarkdown/reference/pdf_document.html" class="external-link">rmarkdown::pdf_document</a>. +Chunk options are adapted. Echoing R code from code chunks and caching are +turned on per default. character for prepending output from code chunks is +set to the empty string, code tidying is off, figure alignment defaults to +centering, and positioning of figures is set to "H", which means that +figures will not move around in the document, but stay where the user +includes them.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">hierarchical_kinetics</span><span class="op">(</span><span class="va">...</span>, keep_tex <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Arguments to <code><a href="https://pkgs.rstudio.com/rmarkdown/reference/pdf_document.html" class="external-link">rmarkdown::pdf_document</a></code></p></dd> + + +<dt id="arg-keep-tex">keep_tex<a class="anchor" aria-label="anchor" href="#arg-keep-tex"></a></dt> +<dd><p>Keep the intermediate tex file used in the conversion to PDF. +Note that this argument does not control whether to keep the auxiliary +files (e.g., <code class="file">.aux</code>) generated by LaTeX when compiling <code class="file">.tex</code> to +<code class="file">.pdf</code>. To keep these files, you may set <code>options(tinytex.clean = +FALSE)</code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>R Markdown output format to pass to +<code><a href="https://pkgs.rstudio.com/rmarkdown/reference/render.html" class="external-link">render</a></code></p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>The latter feature (positioning the figures with "H") depends on the LaTeX +package 'float'. In addition, the LaTeX package 'listing' is used in the +template for showing model fit summaries in the Appendix. This means that +the LaTeX packages 'float' and 'listing' need to be installed in the TeX +distribution used.</p> +<p>On Windows, the easiest way to achieve this (if no TeX distribution +is present before) is to install the 'tinytex' R package, to run +'tinytex::install_tinytex()' to get the basic tiny Tex distribution, +and then to run 'tinytex::tlmgr_install(c("float", "listing"))'.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/rstudio/rmarkdown" class="external-link">rmarkdown</a></span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># The following is now commented out after the relase of v1.2.3 for the generation</span></span></span> +<span class="r-in"><span><span class="co"># of online docs, as the command creates a directory and opens an editor</span></span></span> +<span class="r-in"><span><span class="co">#draft("example_analysis.rmd", template = "hierarchical_kinetics", package = "mkin")</span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/html_listing.html b/docs/dev/reference/html_listing.html new file mode 100644 index 00000000..779fff4c --- /dev/null +++ b/docs/dev/reference/html_listing.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/summary_listing.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/summary_listing.html"> + </head> +</html> + diff --git a/docs/dev/reference/illparms.html b/docs/dev/reference/illparms.html new file mode 100644 index 00000000..0b5f6661 --- /dev/null +++ b/docs/dev/reference/illparms.html @@ -0,0 +1,211 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Method to get the names of ill-defined parameters — illparms • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Method to get the names of ill-defined parameters — illparms"><meta name="description" content="The method for generalised nonlinear regression fits as obtained +with mkinfit and mmkin checks if the degradation parameters +pass the Wald test (in degradation kinetics often simply called t-test) for +significant difference from zero. For this test, the parameterisation +without parameter transformations is used."><meta property="og:description" content="The method for generalised nonlinear regression fits as obtained +with mkinfit and mmkin checks if the degradation parameters +pass the Wald test (in degradation kinetics often simply called t-test) for +significant difference from zero. For this test, the parameterisation +without parameter transformations is used."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Method to get the names of ill-defined parameters</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/illparms.R" class="external-link"><code>R/illparms.R</code></a></small> + <div class="d-none name"><code>illparms.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The method for generalised nonlinear regression fits as obtained +with <a href="mkinfit.html">mkinfit</a> and <a href="mmkin.html">mmkin</a> checks if the degradation parameters +pass the Wald test (in degradation kinetics often simply called t-test) for +significant difference from zero. For this test, the parameterisation +without parameter transformations is used.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">illparms</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu">illparms</span><span class="op">(</span><span class="va">object</span>, conf.level <span class="op">=</span> <span class="fl">0.95</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'illparms.mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu">illparms</span><span class="op">(</span><span class="va">object</span>, conf.level <span class="op">=</span> <span class="fl">0.95</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'illparms.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'saem.mmkin'</span></span> +<span><span class="fu">illparms</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> conf.level <span class="op">=</span> <span class="fl">0.95</span>,</span> +<span> random <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> errmod <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> slopes <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'illparms.saem.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mhmkin'</span></span> +<span><span class="fu">illparms</span><span class="op">(</span><span class="va">object</span>, conf.level <span class="op">=</span> <span class="fl">0.95</span>, random <span class="op">=</span> <span class="cn">TRUE</span>, errmod <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'illparms.mhmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>The object to investigate</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>For potential future extensions</p></dd> + + +<dt id="arg-conf-level">conf.level<a class="anchor" aria-label="anchor" href="#arg-conf-level"></a></dt> +<dd><p>The confidence level for checking p values</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>The object to be printed</p></dd> + + +<dt id="arg-random">random<a class="anchor" aria-label="anchor" href="#arg-random"></a></dt> +<dd><p>For hierarchical fits, should random effects be tested?</p></dd> + + +<dt id="arg-errmod">errmod<a class="anchor" aria-label="anchor" href="#arg-errmod"></a></dt> +<dd><p>For hierarchical fits, should error model parameters be +tested?</p></dd> + + +<dt id="arg-slopes">slopes<a class="anchor" aria-label="anchor" href="#arg-slopes"></a></dt> +<dd><p>For hierarchical <a href="saem.html">saem</a> fits using saemix as backend, +should slope parameters in the covariate model(starting with 'beta_') be +tested?</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>For <a href="mkinfit.html">mkinfit</a> or <a href="saem.html">saem</a> objects, a character vector of parameter +names. For <a href="mmkin.html">mmkin</a> or <a href="mhmkin.html">mhmkin</a> objects, a matrix like object of class +'illparms.mmkin' or 'illparms.mhmkin'.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>The method for hierarchical model fits, also known as nonlinear +mixed-effects model fits as obtained with <a href="saem.html">saem</a> and <a href="mhmkin.html">mhmkin</a> +checks if any of the confidence intervals for the random +effects expressed as standard deviations include zero, and if +the confidence intervals for the error model parameters include +zero.</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>All return objects have printing methods. For the single fits, printing +does not output anything in the case no ill-defined parameters are found.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><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">"FOMC"</span>, <span class="va">FOCUS_2006_A</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Optimisation did not converge:</span> +<span class="r-wrn co"><span class="r-pr">#></span> false convergence (8)</span> +<span class="r-in"><span><span class="fu">illparms</span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] "parent_0" "alpha" "beta" "sigma" </span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"FOMC"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"FOCUS A"</span> <span class="op">=</span> <span class="va">FOCUS_2006_A</span>,</span></span> +<span class="r-in"><span> <span class="st">"FOCUS C"</span> <span class="op">=</span> <span class="va">FOCUS_2006_C</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">illparms</span><span class="op">(</span><span class="va">fits</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model FOCUS A FOCUS C</span> +<span class="r-out co"><span class="r-pr">#></span> SFO </span> +<span class="r-out co"><span class="r-pr">#></span> FOMC parent_0, alpha, beta, sigma </span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/illparms.mhmkin.html b/docs/dev/reference/illparms.mhmkin.html new file mode 100644 index 00000000..efbcc181 --- /dev/null +++ b/docs/dev/reference/illparms.mhmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/illparms.mkinfit.html b/docs/dev/reference/illparms.mkinfit.html new file mode 100644 index 00000000..efbcc181 --- /dev/null +++ b/docs/dev/reference/illparms.mkinfit.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/illparms.mmkin.html b/docs/dev/reference/illparms.mmkin.html new file mode 100644 index 00000000..efbcc181 --- /dev/null +++ b/docs/dev/reference/illparms.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/illparms.saem.mmkin.html b/docs/dev/reference/illparms.saem.mmkin.html new file mode 100644 index 00000000..efbcc181 --- /dev/null +++ b/docs/dev/reference/illparms.saem.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/ilr.html b/docs/dev/reference/ilr.html new file mode 100644 index 00000000..c6efae2d --- /dev/null +++ b/docs/dev/reference/ilr.html @@ -0,0 +1,163 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Function to perform isometric log-ratio transformation — ilr • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to perform isometric log-ratio transformation — ilr"><meta name="description" content="This implementation is a special case of the class of isometric log-ratio +transformations."><meta property="og:description" content="This implementation is a special case of the class of isometric log-ratio +transformations."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Function to perform isometric log-ratio transformation</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/ilr.R" class="external-link"><code>R/ilr.R</code></a></small> + <div class="d-none name"><code>ilr.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This implementation is a special case of the class of isometric log-ratio +transformations.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">ilr</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span> +<span></span> +<span><span class="fu">invilr</span><span class="op">(</span><span class="va">x</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>A numeric vector. Naturally, the forward transformation is only +sensible for vectors with all elements being greater than zero.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The result of the forward or backward transformation. The returned +components always sum to 1 for the case of the inverse log-ratio +transformation.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Peter Filzmoser, Karel Hron (2008) Outlier Detection for +Compositional Data Using Robust Methods. Math Geosci 40 233-248</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>Another implementation can be found in R package +<code>robCompositions</code>.</p></div> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>René Lehmann and Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Order matters</span></span></span> +<span class="r-in"><span><span class="fu">ilr</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.1</span>, <span class="fl">1</span>, <span class="fl">10</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] -1.628174 -2.820079</span> +<span class="r-in"><span><span class="fu">ilr</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">10</span>, <span class="fl">1</span>, <span class="fl">0.1</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1.628174 2.820079</span> +<span class="r-in"><span><span class="co"># Equal entries give ilr transformations with zeros as elements</span></span></span> +<span class="r-in"><span><span class="fu">ilr</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fl">3</span>, <span class="fl">3</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0 0</span> +<span class="r-in"><span><span class="co"># Almost equal entries give small numbers</span></span></span> +<span class="r-in"><span><span class="fu">ilr</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.3</span>, <span class="fl">0.4</span>, <span class="fl">0.3</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] -0.2034219 0.1174457</span> +<span class="r-in"><span><span class="co"># Only the ratio between the numbers counts, not their sum</span></span></span> +<span class="r-in"><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" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.70 0.29 0.01</span> +<span class="r-in"><span><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" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.70 0.29 0.01</span> +<span class="r-in"><span><span class="co"># Inverse transformation of larger numbers gives unequal elements</span></span></span> +<span class="r-in"><span><span class="fu">invilr</span><span class="op">(</span><span class="op">-</span><span class="fl">10</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 7.213536e-07 9.999993e-01</span> +<span class="r-in"><span><span class="fu">invilr</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="op">-</span><span class="fl">10</span>, <span class="fl">0</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 7.207415e-07 9.991507e-01 8.486044e-04</span> +<span class="r-in"><span><span class="co"># The sum of the elements of the inverse ilr is 1</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/sum.html" class="external-link">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" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 1</span> +<span class="r-in"><span><span class="co"># This is why we do not need all elements of the inverse transformation to go back:</span></span></span> +<span class="r-in"><span><span class="va">a</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.1</span>, <span class="fl">0.3</span>, <span class="fl">0.5</span><span class="op">)</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">b</span><span class="op">)</span> <span class="co"># Four elements</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 4</span> +<span class="r-in"><span><span class="fu">ilr</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.1 0.3 0.5</span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html new file mode 100644 index 00000000..476b8804 --- /dev/null +++ b/docs/dev/reference/index.html @@ -0,0 +1,735 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Package index • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Package index"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-index"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Package index</h1> + </div> + + <div class="section level2"> + <h2 id="main-functions">Main functions<a class="anchor" aria-label="anchor" href="#main-functions"></a></h2> + + <div class="section-desc"><p>Essential functionality</p></div> + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="mkinmod.html">mkinmod()</a></code> <code><a href="mkinmod.html">print(<i><mkinmod></i>)</a></code> <code><a href="mkinmod.html">mkinsub()</a></code> + + </dt> + <dd>Function to set up a kinetic model with one or more state variables</dd> + </dl><dl><dt> + + <code><a href="mkinfit.html">mkinfit()</a></code> + + </dt> + <dd>Fit a kinetic model to data with one or more state variables</dd> + </dl><dl><dt> + + <code><a href="mmkin.html">mmkin()</a></code> <code><a href="mmkin.html">print(<i><mmkin></i>)</a></code> + + </dt> + <dd>Fit one or more kinetic models with one or more state variables to one or more datasets</dd> + </dl><dl><dt> + + <code><a href="mhmkin.html">mhmkin()</a></code> <code><a href="mhmkin.html">`[`(<i><mhmkin></i>)</a></code> <code><a href="mhmkin.html">print(<i><mhmkin></i>)</a></code> + + </dt> + <dd>Fit nonlinear mixed-effects models built from one or more kinetic degradation models and one or more error models</dd> + </dl></div><div class="section level2"> + <h2 id="generics">Generics<a class="anchor" aria-label="anchor" href="#generics"></a></h2> + + <div class="section-desc"><p>Generic functions introduced by the package</p></div> + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="parms.html">parms()</a></code> + + </dt> + <dd>Extract model parameters</dd> + </dl><dl><dt> + + <code><a href="status.html">status()</a></code> <code><a href="status.html">print(<i><status.mmkin></i>)</a></code> <code><a href="status.html">print(<i><status.mhmkin></i>)</a></code> + + </dt> + <dd>Method to get status information for fit array objects</dd> + </dl><dl><dt> + + <code><a href="illparms.html">illparms()</a></code> <code><a href="illparms.html">print(<i><illparms.mkinfit></i>)</a></code> <code><a href="illparms.html">print(<i><illparms.mmkin></i>)</a></code> <code><a href="illparms.html">print(<i><illparms.saem.mmkin></i>)</a></code> <code><a href="illparms.html">print(<i><illparms.mhmkin></i>)</a></code> + + </dt> + <dd>Method to get the names of ill-defined parameters</dd> + </dl><dl><dt> + + <code><a href="endpoints.html">endpoints()</a></code> + + </dt> + <dd>Function to calculate endpoints for further use from kinetic models fitted with mkinfit</dd> + </dl><dl><dt> + + <code><a href="aw.html">aw()</a></code> + + </dt> + <dd>Calculate Akaike weights for model averaging</dd> + </dl></div><div class="section level2"> + <h2 id="show-results">Show results<a class="anchor" aria-label="anchor" href="#show-results"></a></h2> + + <div class="section-desc"><p>Functions working with mkinfit objects</p></div> + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="plot.mkinfit.html">plot(<i><mkinfit></i>)</a></code> <code><a href="plot.mkinfit.html">plot_sep()</a></code> <code><a href="plot.mkinfit.html">plot_res()</a></code> <code><a href="plot.mkinfit.html">plot_err()</a></code> + + </dt> + <dd>Plot the observed data and the fitted model of an mkinfit object</dd> + </dl><dl><dt> + + <code><a href="summary.mkinfit.html">summary(<i><mkinfit></i>)</a></code> <code><a href="summary.mkinfit.html">print(<i><summary.mkinfit></i>)</a></code> + + </dt> + <dd>Summary method for class "mkinfit"</dd> + </dl><dl><dt> + + <code><a href="confint.mkinfit.html">confint(<i><mkinfit></i>)</a></code> + + </dt> + <dd>Confidence intervals for parameters of mkinfit objects</dd> + </dl><dl><dt> + + <code><a href="update.mkinfit.html">update(<i><mkinfit></i>)</a></code> + + </dt> + <dd>Update an mkinfit model with different arguments</dd> + </dl><dl><dt> + + <code><a href="lrtest.mkinfit.html">lrtest(<i><mkinfit></i>)</a></code> <code><a href="lrtest.mkinfit.html">lrtest(<i><mmkin></i>)</a></code> + + </dt> + <dd>Likelihood ratio test for mkinfit models</dd> + </dl><dl><dt> + + <code><a href="loftest.html">loftest()</a></code> + + </dt> + <dd>Lack-of-fit test for models fitted to data with replicates</dd> + </dl><dl><dt> + + <code><a href="mkinerrmin.html">mkinerrmin()</a></code> + + </dt> + <dd>Calculate the minimum error to assume in order to pass the variance test</dd> + </dl><dl><dt> + + <code><a href="CAKE_export.html">CAKE_export()</a></code> + + </dt> + <dd>Export a list of datasets format to a CAKE study file</dd> + </dl></div><div class="section level2"> + <h2 id="work-with-mmkin-objects">Work with mmkin objects<a class="anchor" aria-label="anchor" href="#work-with-mmkin-objects"></a></h2> + + <div class="section-desc"><p>Functions working with aggregated results</p></div> + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="Extract.mmkin.html">`[`(<i><mmkin></i>)</a></code> + + </dt> + <dd>Subsetting method for mmkin objects</dd> + </dl><dl><dt> + + <code><a href="plot.mmkin.html">plot(<i><mmkin></i>)</a></code> + + </dt> + <dd>Plot model fits (observed and fitted) and the residuals for a row or column of an mmkin object</dd> + </dl><dl><dt> + + <code><a href="AIC.mmkin.html">AIC(<i><mmkin></i>)</a></code> <code><a href="AIC.mmkin.html">BIC(<i><mmkin></i>)</a></code> + + </dt> + <dd>Calculate the AIC for a column of an mmkin object</dd> + </dl><dl><dt> + + <code><a href="summary.mmkin.html">summary(<i><mmkin></i>)</a></code> <code><a href="summary.mmkin.html">print(<i><summary.mmkin></i>)</a></code> + + </dt> + <dd>Summary method for class "mmkin"</dd> + </dl></div><div class="section level2"> + <h2 id="mixed-models">Mixed models<a class="anchor" aria-label="anchor" href="#mixed-models"></a></h2> + + <div class="section-desc"><p>Create and work with nonlinear hierarchical models</p></div> + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="hierarchical_kinetics.html">hierarchical_kinetics()</a></code> + + </dt> + <dd>Hierarchical kinetics template</dd> + </dl><dl><dt> + + <code><a href="read_spreadsheet.html">read_spreadsheet()</a></code> + + </dt> + <dd>Read datasets and relevant meta information from a spreadsheet file</dd> + </dl><dl><dt> + + <code><a href="nlme.mmkin.html">nlme(<i><mmkin></i>)</a></code> <code><a href="nlme.mmkin.html">print(<i><nlme.mmkin></i>)</a></code> <code><a href="nlme.mmkin.html">update(<i><nlme.mmkin></i>)</a></code> + + </dt> + <dd>Create an nlme model for an mmkin row object</dd> + </dl><dl><dt> + + <code><a href="saem.html">saem()</a></code> <code><a href="saem.html">print(<i><saem.mmkin></i>)</a></code> <code><a href="saem.html">saemix_model()</a></code> <code><a href="saem.html">saemix_data()</a></code> + + </dt> + <dd>Fit nonlinear mixed models with SAEM</dd> + </dl><dl><dt> + + <code><a href="mhmkin.html">mhmkin()</a></code> <code><a href="mhmkin.html">`[`(<i><mhmkin></i>)</a></code> <code><a href="mhmkin.html">print(<i><mhmkin></i>)</a></code> + + </dt> + <dd>Fit nonlinear mixed-effects models built from one or more kinetic degradation models and one or more error models</dd> + </dl><dl><dt> + + <code><a href="plot.mixed.mmkin.html">plot(<i><mixed.mmkin></i>)</a></code> + + </dt> + <dd>Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object</dd> + </dl><dl><dt> + + <code><a href="summary.nlme.mmkin.html">summary(<i><nlme.mmkin></i>)</a></code> <code><a href="summary.nlme.mmkin.html">print(<i><summary.nlme.mmkin></i>)</a></code> + + </dt> + <dd>Summary method for class "nlme.mmkin"</dd> + </dl><dl><dt> + + <code><a href="summary.saem.mmkin.html">summary(<i><saem.mmkin></i>)</a></code> <code><a href="summary.saem.mmkin.html">print(<i><summary.saem.mmkin></i>)</a></code> + + </dt> + <dd>Summary method for class "saem.mmkin"</dd> + </dl><dl><dt> + + <code><a href="anova.saem.mmkin.html">anova(<i><saem.mmkin></i>)</a></code> + + </dt> + <dd>Anova method for saem.mmkin objects</dd> + </dl><dl><dt> + + <code><a href="logLik.saem.mmkin.html">logLik(<i><saem.mmkin></i>)</a></code> + + </dt> + <dd>logLik method for saem.mmkin objects</dd> + </dl><dl><dt> + + <code><a href="nlme.html">nlme_function()</a></code> <code><a href="nlme.html">nlme_data()</a></code> + + </dt> + <dd>Helper functions to create nlme models from mmkin row objects</dd> + </dl><dl><dt> + + <code><a href="get_deg_func.html">get_deg_func()</a></code> + + </dt> + <dd>Retrieve a degradation function from the mmkin namespace</dd> + </dl><dl><dt> + + <code><a href="mixed.html">mixed()</a></code> <code><a href="mixed.html">print(<i><mixed.mmkin></i>)</a></code> + + </dt> + <dd>Create a mixed effects model from an mmkin row object</dd> + </dl><dl><dt> + + <code><a href="reexports.html">reexports</a></code> <code><a href="reexports.html">intervals</a></code> <code><a href="reexports.html">lrtest</a></code> <code><a href="reexports.html">nlme</a></code> + + </dt> + <dd>Objects exported from other packages</dd> + </dl><dl><dt> + + <code><a href="intervals.saem.mmkin.html">intervals(<i><saem.mmkin></i>)</a></code> + + </dt> + <dd>Confidence intervals for parameters in saem.mmkin objects</dd> + </dl><dl><dt> + + <code><a href="multistart.html">multistart()</a></code> <code><a href="multistart.html">print(<i><multistart></i>)</a></code> <code><a href="multistart.html">best()</a></code> <code><a href="multistart.html">which.best()</a></code> + + </dt> + <dd>Perform a hierarchical model fit with multiple starting values</dd> + </dl><dl><dt> + + <code><a href="llhist.html">llhist()</a></code> + + </dt> + <dd>Plot the distribution of log likelihoods from multistart objects</dd> + </dl><dl><dt> + + <code><a href="parplot.html">parplot()</a></code> + + </dt> + <dd>Plot parameter variability of multistart objects</dd> + </dl><dl><dt> + + <code><a href="check_failed.html">check_failed()</a></code> + + </dt> + <dd>Check if fit within an mhmkin object failed</dd> + </dl></div><div class="section level2"> + <h2 id="datasets-and-known-results">Datasets and known results<a class="anchor" aria-label="anchor" href="#datasets-and-known-results"></a></h2> + + + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="ds_mixed.html">ds_mixed</a></code> <code><a href="ds_mixed.html">ds_sfo</a></code> <code><a href="ds_mixed.html">ds_fomc</a></code> <code><a href="ds_mixed.html">ds_dfop</a></code> <code><a href="ds_mixed.html">ds_hs</a></code> <code><a href="ds_mixed.html">ds_dfop_sfo</a></code> + + </dt> + <dd>Synthetic data for hierarchical kinetic degradation models</dd> + </dl><dl><dt> + + <code><a href="D24_2014.html">D24_2014</a></code> + + </dt> + <dd>Aerobic soil degradation data on 2,4-D from the EU assessment in 2014</dd> + </dl><dl><dt> + + <code><a href="dimethenamid_2018.html">dimethenamid_2018</a></code> + + </dt> + <dd>Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018</dd> + </dl><dl><dt> + + <code><a href="FOCUS_2006_datasets.html">FOCUS_2006_A</a></code> <code><a href="FOCUS_2006_datasets.html">FOCUS_2006_B</a></code> <code><a href="FOCUS_2006_datasets.html">FOCUS_2006_C</a></code> <code><a href="FOCUS_2006_datasets.html">FOCUS_2006_D</a></code> <code><a href="FOCUS_2006_datasets.html">FOCUS_2006_E</a></code> <code><a href="FOCUS_2006_datasets.html">FOCUS_2006_F</a></code> + + </dt> + <dd>Datasets A to F from the FOCUS Kinetics report from 2006</dd> + </dl><dl><dt> + + <code><a href="FOCUS_2006_SFO_ref_A_to_F.html">FOCUS_2006_SFO_ref_A_to_F</a></code> + + </dt> + <dd>Results of fitting the SFO model to Datasets A to F of FOCUS (2006)</dd> + </dl><dl><dt> + + <code><a href="FOCUS_2006_FOMC_ref_A_to_F.html">FOCUS_2006_FOMC_ref_A_to_F</a></code> + + </dt> + <dd>Results of fitting the FOMC model to Datasets A to F of FOCUS (2006)</dd> + </dl><dl><dt> + + <code><a href="FOCUS_2006_HS_ref_A_to_F.html">FOCUS_2006_HS_ref_A_to_F</a></code> + + </dt> + <dd>Results of fitting the HS model to Datasets A to F of FOCUS (2006)</dd> + </dl><dl><dt> + + <code><a href="FOCUS_2006_DFOP_ref_A_to_B.html">FOCUS_2006_DFOP_ref_A_to_B</a></code> + + </dt> + <dd>Results of fitting the DFOP model to Datasets A to B of FOCUS (2006)</dd> + </dl><dl><dt> + + <code><a href="NAFTA_SOP_2015.html">NAFTA_SOP_Appendix_B</a></code> <code><a href="NAFTA_SOP_2015.html">NAFTA_SOP_Appendix_D</a></code> + + </dt> + <dd>Example datasets from the NAFTA SOP published 2015</dd> + </dl><dl><dt> + + <code><a href="NAFTA_SOP_Attachment.html">NAFTA_SOP_Attachment</a></code> + + </dt> + <dd>Example datasets from Attachment 1 to the NAFTA SOP published 2015</dd> + </dl><dl><dt> + + <code><a href="mccall81_245T.html">mccall81_245T</a></code> + + </dt> + <dd>Datasets on aerobic soil metabolism of 2,4,5-T in six soils</dd> + </dl><dl><dt> + + <code><a href="schaefer07_complex_case.html">schaefer07_complex_case</a></code> + + </dt> + <dd>Metabolism data set used for checking the software quality of KinGUI</dd> + </dl><dl><dt> + + <code><a href="synthetic_data_for_UBA_2014.html">synthetic_data_for_UBA_2014</a></code> + + </dt> + <dd>Synthetic datasets for one parent compound with two metabolites</dd> + </dl><dl><dt> + + <code><a href="experimental_data_for_UBA.html">experimental_data_for_UBA_2019</a></code> + + </dt> + <dd>Experimental datasets used for development and testing of error models</dd> + </dl><dl><dt> + + <code><a href="test_data_from_UBA_2014.html">test_data_from_UBA_2014</a></code> + + </dt> + <dd>Three experimental datasets from two water sediment systems and one soil</dd> + </dl><dl><dt> + + <code><a href="focus_soil_moisture.html">focus_soil_moisture</a></code> + + </dt> + <dd>FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar</dd> + </dl><dl><dt> + + <code><a href="mkinds.html">print(<i><mkinds></i>)</a></code> + + </dt> + <dd>A dataset class for mkin</dd> + </dl><dl><dt> + + <code><a href="mkindsg.html">print(<i><mkindsg></i>)</a></code> + + </dt> + <dd>A class for dataset groups for mkin</dd> + </dl></div><div class="section level2"> + <h2 id="nafta-guidance">NAFTA guidance<a class="anchor" aria-label="anchor" href="#nafta-guidance"></a></h2> + + + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="nafta.html">nafta()</a></code> <code><a href="nafta.html">print(<i><nafta></i>)</a></code> + + </dt> + <dd>Evaluate parent kinetics using the NAFTA guidance</dd> + </dl><dl><dt> + + <code><a href="plot.nafta.html">plot(<i><nafta></i>)</a></code> + + </dt> + <dd>Plot the results of the three models used in the NAFTA scheme.</dd> + </dl></div><div class="section level2"> + <h2 id="utility-functions">Utility functions<a class="anchor" aria-label="anchor" href="#utility-functions"></a></h2> + + + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="summary_listing.html">summary_listing()</a></code> <code><a href="summary_listing.html">tex_listing()</a></code> <code><a href="summary_listing.html">html_listing()</a></code> + + </dt> + <dd>Display the output of a summary function according to the output format</dd> + </dl><dl><dt> + + <code><a href="f_time_norm_focus.html">f_time_norm_focus()</a></code> + + </dt> + <dd>Normalisation factors for aerobic soil degradation according to FOCUS guidance</dd> + </dl><dl><dt> + + <code><a href="set_nd_nq.html">set_nd_nq()</a></code> <code><a href="set_nd_nq.html">set_nd_nq_focus()</a></code> + + </dt> + <dd>Set non-detects and unquantified values in residue series without replicates</dd> + </dl><dl><dt> + + <code><a href="max_twa_parent.html">max_twa_parent()</a></code> <code><a href="max_twa_parent.html">max_twa_sfo()</a></code> <code><a href="max_twa_parent.html">max_twa_fomc()</a></code> <code><a href="max_twa_parent.html">max_twa_dfop()</a></code> <code><a href="max_twa_parent.html">max_twa_hs()</a></code> + + </dt> + <dd>Function to calculate maximum time weighted average concentrations from kinetic models fitted with mkinfit</dd> + </dl><dl><dt> + + <code><a href="mkin_wide_to_long.html">mkin_wide_to_long()</a></code> + + </dt> + <dd>Convert a dataframe with observations over time into long format</dd> + </dl><dl><dt> + + <code><a href="mkin_long_to_wide.html">mkin_long_to_wide()</a></code> + + </dt> + <dd>Convert a dataframe from long to wide format</dd> + </dl></div><div class="section level2"> + <h2 id="helper-functions-mainly-used-internally">Helper functions mainly used internally<a class="anchor" aria-label="anchor" href="#helper-functions-mainly-used-internally"></a></h2> + + + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="mkinpredict.html">mkinpredict()</a></code> + + </dt> + <dd>Produce predictions from a kinetic model using specific parameters</dd> + </dl><dl><dt> + + <code><a href="transform_odeparms.html">transform_odeparms()</a></code> <code><a href="transform_odeparms.html">backtransform_odeparms()</a></code> + + </dt> + <dd>Functions to transform and backtransform kinetic parameters for fitting</dd> + </dl><dl><dt> + + <code><a href="ilr.html">ilr()</a></code> <code><a href="ilr.html">invilr()</a></code> + + </dt> + <dd>Function to perform isometric log-ratio transformation</dd> + </dl><dl><dt> + + <code><a href="logLik.mkinfit.html">logLik(<i><mkinfit></i>)</a></code> + + </dt> + <dd>Calculated the log-likelihood of a fitted mkinfit object</dd> + </dl><dl><dt> + + <code><a href="residuals.mkinfit.html">residuals(<i><mkinfit></i>)</a></code> + + </dt> + <dd>Extract residuals from an mkinfit model</dd> + </dl><dl><dt> + + <code><a href="nobs.mkinfit.html">nobs(<i><mkinfit></i>)</a></code> + + </dt> + <dd>Number of observations on which an mkinfit object was fitted</dd> + </dl><dl><dt> + + <code><a href="mkinresplot.html">mkinresplot()</a></code> + + </dt> + <dd>Function to plot residuals stored in an mkin object</dd> + </dl><dl><dt> + + <code><a href="mkinparplot.html">mkinparplot()</a></code> + + </dt> + <dd>Function to plot the confidence intervals obtained using mkinfit</dd> + </dl><dl><dt> + + <code><a href="mkinerrplot.html">mkinerrplot()</a></code> + + </dt> + <dd>Function to plot squared residuals and the error model for an mkin object</dd> + </dl><dl><dt> + + <code><a href="mean_degparms.html">mean_degparms()</a></code> + + </dt> + <dd>Calculate mean degradation parameters for an mmkin row object</dd> + </dl><dl><dt> + + <code><a href="create_deg_func.html">create_deg_func()</a></code> + + </dt> + <dd>Create degradation functions for known analytical solutions</dd> + </dl></div><div class="section level2"> + <h2 id="analytical-solutions">Analytical solutions<a class="anchor" aria-label="anchor" href="#analytical-solutions"></a></h2> + + <div class="section-desc"><p>Parent only model solutions</p></div> + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="SFO.solution.html">SFO.solution()</a></code> + + </dt> + <dd>Single First-Order kinetics</dd> + </dl><dl><dt> + + <code><a href="FOMC.solution.html">FOMC.solution()</a></code> + + </dt> + <dd>First-Order Multi-Compartment kinetics</dd> + </dl><dl><dt> + + <code><a href="DFOP.solution.html">DFOP.solution()</a></code> + + </dt> + <dd>Double First-Order in Parallel kinetics</dd> + </dl><dl><dt> + + <code><a href="SFORB.solution.html">SFORB.solution()</a></code> + + </dt> + <dd>Single First-Order Reversible Binding kinetics</dd> + </dl><dl><dt> + + <code><a href="HS.solution.html">HS.solution()</a></code> + + </dt> + <dd>Hockey-Stick kinetics</dd> + </dl><dl><dt> + + <code><a href="IORE.solution.html">IORE.solution()</a></code> + + </dt> + <dd>Indeterminate order rate equation kinetics</dd> + </dl><dl><dt> + + <code><a href="logistic.solution.html">logistic.solution()</a></code> + + </dt> + <dd>Logistic kinetics</dd> + </dl></div><div class="section level2"> + <h2 id="generate-synthetic-datasets">Generate synthetic datasets<a class="anchor" aria-label="anchor" href="#generate-synthetic-datasets"></a></h2> + + + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="add_err.html">add_err()</a></code> + + </dt> + <dd>Add normally distributed errors to simulated kinetic degradation data</dd> + </dl><dl><dt> + + <code><a href="sigma_twocomp.html">sigma_twocomp()</a></code> + + </dt> + <dd>Two-component error model</dd> + </dl></div><div class="section level2"> + <h2 id="deprecated-functions">Deprecated functions<a class="anchor" aria-label="anchor" href="#deprecated-functions"></a></h2> + + <div class="section-desc"><p>Functions that have been superseded</p></div> + + + </div><div class="section level2"> + + + + + <dl><dt> + + <code><a href="mkinplot.html">mkinplot()</a></code> + + </dt> + <dd>Plot the observed data and the fitted model of an mkinfit object</dd> + </dl></div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/intervals.html b/docs/dev/reference/intervals.html new file mode 100644 index 00000000..9cc267c0 --- /dev/null +++ b/docs/dev/reference/intervals.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/reexports.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/reexports.html"> + </head> +</html> + diff --git a/docs/dev/reference/intervals.saem.mmkin.html b/docs/dev/reference/intervals.saem.mmkin.html new file mode 100644 index 00000000..4e25aa77 --- /dev/null +++ b/docs/dev/reference/intervals.saem.mmkin.html @@ -0,0 +1,121 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Confidence intervals for parameters in saem.mmkin objects — intervals.saem.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Confidence intervals for parameters in saem.mmkin objects — intervals.saem.mmkin"><meta name="description" content="Confidence intervals for parameters in saem.mmkin objects"><meta property="og:description" content="Confidence intervals for parameters in saem.mmkin objects"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Confidence intervals for parameters in saem.mmkin objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/intervals.R" class="external-link"><code>R/intervals.R</code></a></small> + <div class="d-none name"><code>intervals.saem.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Confidence intervals for parameters in saem.mmkin objects</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'saem.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/pkg/nlme/man/intervals.html" class="external-link">intervals</a></span><span class="op">(</span><span class="va">object</span>, level <span class="op">=</span> <span class="fl">0.95</span>, backtransform <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>The fitted saem.mmkin object</p></dd> + + +<dt id="arg-level">level<a class="anchor" aria-label="anchor" href="#arg-level"></a></dt> +<dd><p>The confidence level. Must be the default of 0.95 as this is what +is available in the saemix object</p></dd> + + +<dt id="arg-backtransform">backtransform<a class="anchor" aria-label="anchor" href="#arg-backtransform"></a></dt> +<dd><p>In case the model was fitted with mkin transformations, +should we backtransform the parameters where a one to one correlation +between transformed and backtransformed parameters exists?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>For compatibility with the generic method</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>An object with 'intervals.saem.mmkin' and 'intervals.lme' in the +class attribute</p> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/invilr.html b/docs/dev/reference/invilr.html new file mode 100644 index 00000000..32ca219f --- /dev/null +++ b/docs/dev/reference/invilr.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/ilr.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/ilr.html"> + </head> +</html> + diff --git a/docs/dev/reference/llhist.html b/docs/dev/reference/llhist.html new file mode 100644 index 00000000..fca1f427 --- /dev/null +++ b/docs/dev/reference/llhist.html @@ -0,0 +1,123 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot the distribution of log likelihoods from multistart objects — llhist • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot the distribution of log likelihoods from multistart objects — llhist"><meta name="description" content="Produces a histogram of log-likelihoods. In addition, the likelihood of the +original fit is shown as a red vertical line."><meta property="og:description" content="Produces a histogram of log-likelihoods. In addition, the likelihood of the +original fit is shown as a red vertical line."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Plot the distribution of log likelihoods from multistart objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/llhist.R" class="external-link"><code>R/llhist.R</code></a></small> + <div class="d-none name"><code>llhist.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Produces a histogram of log-likelihoods. In addition, the likelihood of the +original fit is shown as a red vertical line.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">llhist</span><span class="op">(</span><span class="va">object</span>, breaks <span class="op">=</span> <span class="st">"Sturges"</span>, lpos <span class="op">=</span> <span class="st">"topleft"</span>, main <span class="op">=</span> <span class="st">""</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>The <a href="multistart.html">multistart</a> object</p></dd> + + +<dt id="arg-breaks">breaks<a class="anchor" aria-label="anchor" href="#arg-breaks"></a></dt> +<dd><p>Passed to <a href="https://rdrr.io/r/graphics/hist.html" class="external-link">hist</a></p></dd> + + +<dt id="arg-lpos">lpos<a class="anchor" aria-label="anchor" href="#arg-lpos"></a></dt> +<dd><p>Positioning of the legend.</p></dd> + + +<dt id="arg-main">main<a class="anchor" aria-label="anchor" href="#arg-main"></a></dt> +<dd><p>Title of the plot</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Passed to <a href="https://rdrr.io/r/graphics/hist.html" class="external-link">hist</a></p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><a href="multistart.html">multistart</a></p></div> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/loftest-1.png b/docs/dev/reference/loftest-1.png Binary files differnew file mode 100644 index 00000000..e6281140 --- /dev/null +++ b/docs/dev/reference/loftest-1.png diff --git a/docs/dev/reference/loftest-2.png b/docs/dev/reference/loftest-2.png Binary files differnew file mode 100644 index 00000000..32842c7d --- /dev/null +++ b/docs/dev/reference/loftest-2.png diff --git a/docs/dev/reference/loftest-3.png b/docs/dev/reference/loftest-3.png Binary files differnew file mode 100644 index 00000000..e2a5663d --- /dev/null +++ b/docs/dev/reference/loftest-3.png diff --git a/docs/dev/reference/loftest-4.png b/docs/dev/reference/loftest-4.png Binary files differnew file mode 100644 index 00000000..a052626b --- /dev/null +++ b/docs/dev/reference/loftest-4.png diff --git a/docs/dev/reference/loftest-5.png b/docs/dev/reference/loftest-5.png Binary files differnew file mode 100644 index 00000000..168aa062 --- /dev/null +++ b/docs/dev/reference/loftest-5.png diff --git a/docs/dev/reference/loftest.html b/docs/dev/reference/loftest.html new file mode 100644 index 00000000..72496e83 --- /dev/null +++ b/docs/dev/reference/loftest.html @@ -0,0 +1,299 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Lack-of-fit test for models fitted to data with replicates — loftest • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Lack-of-fit test for models fitted to data with replicates — loftest"><meta name="description" content="This is a generic function with a method currently only defined for mkinfit +objects. It fits an anova model to the data contained in the object and +compares the likelihoods using the likelihood ratio test +lrtest.default from the lmtest package."><meta property="og:description" content="This is a generic function with a method currently only defined for mkinfit +objects. It fits an anova model to the data contained in the object and +compares the likelihoods using the likelihood ratio test +lrtest.default from the lmtest package."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Lack-of-fit test for models fitted to data with replicates</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/loftest.R" class="external-link"><code>R/loftest.R</code></a></small> + <div class="d-none name"><code>loftest.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This is a generic function with a method currently only defined for mkinfit +objects. It fits an anova model to the data contained in the object and +compares the likelihoods using the likelihood ratio test +<code><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest.default</a></code> from the lmtest package.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">loftest</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu">loftest</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>A model object with a defined loftest method</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>The anova model is interpreted as the simplest form of an mkinfit model, +assuming only a constant variance about the means, but not enforcing any +structure of the means, so we have one model parameter for every mean +of replicate samples.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>lrtest</p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">test_data</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">subset</a></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">name</span> <span class="op">==</span> <span class="st">"parent"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">sfo_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">test_data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_fit</span><span class="op">)</span> <span class="co"># We see a clear pattern in the residuals</span></span></span> +<span class="r-plt img"><img src="loftest-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_fit</span><span class="op">)</span> <span class="co"># We have a clear lack of fit</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: SFO with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 10 -40.710 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 3 -63.954 -7 46.487 7.027e-08 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># We try a different model (the one that was used to generate the data)</span></span></span> +<span class="r-in"><span><span class="va">dfop_fit</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">test_data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">dfop_fit</span><span class="op">)</span> <span class="co"># We don't see systematic deviations, but heteroscedastic residuals</span></span></span> +<span class="r-plt img"><img src="loftest-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># therefore we should consider adapting the error model, although we have</span></span></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">dfop_fit</span><span class="op">)</span> <span class="co"># no lack of fit</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: DFOP with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq)</span> +<span class="r-out co"><span class="r-pr">#></span> 1 10 -40.710 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 5 -42.453 -5 3.485 0.6257</span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># This is the anova model used internally for the comparison</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova</span> <span class="op"><-</span> <span class="va">test_data</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova</span><span class="op">$</span><span class="va">time</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova</span><span class="op">$</span><span class="va">time</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">anova_fit</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">value</span> <span class="op">~</span> <span class="va">time</span>, data <span class="op">=</span> <span class="va">test_data_anova</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">anova_fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Call:</span> +<span class="r-out co"><span class="r-pr">#></span> lm(formula = value ~ time, data = test_data_anova)</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Residuals:</span> +<span class="r-out co"><span class="r-pr">#></span> Min 1Q Median 3Q Max </span> +<span class="r-out co"><span class="r-pr">#></span> -6.1000 -0.5625 0.0000 0.5625 6.1000 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Coefficients:</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error t value Pr(>|t|) </span> +<span class="r-out co"><span class="r-pr">#></span> (Intercept) 103.150 2.323 44.409 7.44e-12 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time1 -19.950 3.285 -6.073 0.000185 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time3 -50.800 3.285 -15.465 8.65e-08 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time7 -68.500 3.285 -20.854 6.28e-09 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time14 -79.750 3.285 -24.278 1.63e-09 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time28 -86.000 3.285 -26.181 8.35e-10 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time60 -94.900 3.285 -28.891 3.48e-10 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time90 -98.500 3.285 -29.986 2.49e-10 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time120 -100.450 3.285 -30.580 2.09e-10 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Residual standard error: 3.285 on 9 degrees of freedom</span> +<span class="r-out co"><span class="r-pr">#></span> Multiple R-squared: 0.9953, Adjusted R-squared: 0.9912 </span> +<span class="r-out co"><span class="r-pr">#></span> F-statistic: 240.5 on 8 and 9 DF, p-value: 1.417e-09</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/logLik.html" class="external-link">logLik</a></span><span class="op">(</span><span class="va">anova_fit</span><span class="op">)</span> <span class="co"># We get the same likelihood and degrees of freedom</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> 'log Lik.' -40.71015 (df=10)</span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="va">test_data_2</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></span> +<span class="r-in"><span><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="https://rdrr.io/r/base/list.html" class="external-link">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>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"M2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="va">sfo_lin_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_SFO_lin</span>, <span class="va">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_lin_fit</span><span class="op">)</span> <span class="co"># not a good model, we try parallel formation</span></span></span> +<span class="r-plt img"><img src="loftest-3.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_lin_fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: m_synth_SFO_lin with error model const and fixed parameter(s) M1_0, M2_0</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 28 -93.606 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 7 -171.927 -21 156.64 < 2.2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="va">m_synth_SFO_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="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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" class="external-link">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>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="va">sfo_par_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_SFO_par</span>, <span class="va">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_par_fit</span><span class="op">)</span> <span class="co"># much better for metabolites</span></span></span> +<span class="r-plt img"><img src="loftest-4.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_par_fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: m_synth_SFO_par with error model const and fixed parameter(s) M1_0, M2_0</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 28 -93.606 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 7 -156.331 -21 125.45 < 2.2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><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="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"DFOP"</span>, to <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="va">dfop_par_fit</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">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">dfop_par_fit</span><span class="op">)</span> <span class="co"># No visual lack of fit</span></span></span> +<span class="r-plt img"><img src="loftest-5.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">dfop_par_fit</span><span class="op">)</span> <span class="co"># no lack of fit found by the test</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: m_synth_DFOP_par with error model const and fixed parameter(s) M1_0, M2_0</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq)</span> +<span class="r-out co"><span class="r-pr">#></span> 1 28 -93.606 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 9 -102.763 -19 18.313 0.5016</span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># The anova model used for comparison in the case of transformation products</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova_2</span> <span class="op"><-</span> <span class="va">dfop_par_fit</span><span class="op">$</span><span class="va">data</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">variable</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">variable</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">time</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">time</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">anova_fit_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">observed</span> <span class="op">~</span> <span class="va">time</span><span class="op">:</span><span class="va">variable</span> <span class="op">-</span> <span class="fl">1</span>, data <span class="op">=</span> <span class="va">test_data_anova_2</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">anova_fit_2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Call:</span> +<span class="r-out co"><span class="r-pr">#></span> lm(formula = observed ~ time:variable - 1, data = test_data_anova_2)</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Residuals:</span> +<span class="r-out co"><span class="r-pr">#></span> Min 1Q Median 3Q Max </span> +<span class="r-out co"><span class="r-pr">#></span> -6.1000 -0.5875 0.0000 0.5875 6.1000 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Coefficients: (2 not defined because of singularities)</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error t value Pr(>|t|) </span> +<span class="r-out co"><span class="r-pr">#></span> time0:variableparent 103.150 1.573 65.562 < 2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time1:variableparent 83.200 1.573 52.882 < 2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time3:variableparent 52.350 1.573 33.274 < 2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time7:variableparent 34.650 1.573 22.024 < 2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time14:variableparent 23.400 1.573 14.873 6.35e-14 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time28:variableparent 17.150 1.573 10.901 5.47e-11 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time60:variableparent 8.250 1.573 5.244 1.99e-05 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time90:variableparent 4.650 1.573 2.956 0.006717 ** </span> +<span class="r-out co"><span class="r-pr">#></span> time120:variableparent 2.700 1.573 1.716 0.098507 . </span> +<span class="r-out co"><span class="r-pr">#></span> time0:variableM1 NA NA NA NA </span> +<span class="r-out co"><span class="r-pr">#></span> time1:variableM1 11.850 1.573 7.532 6.93e-08 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time3:variableM1 22.700 1.573 14.428 1.26e-13 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time7:variableM1 33.050 1.573 21.007 < 2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time14:variableM1 31.250 1.573 19.863 < 2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time28:variableM1 18.900 1.573 12.013 7.02e-12 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time60:variableM1 7.550 1.573 4.799 6.28e-05 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time90:variableM1 3.850 1.573 2.447 0.021772 * </span> +<span class="r-out co"><span class="r-pr">#></span> time120:variableM1 2.050 1.573 1.303 0.204454 </span> +<span class="r-out co"><span class="r-pr">#></span> time0:variableM2 NA NA NA NA </span> +<span class="r-out co"><span class="r-pr">#></span> time1:variableM2 6.700 1.573 4.259 0.000254 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time3:variableM2 16.750 1.573 10.646 8.93e-11 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time7:variableM2 25.800 1.573 16.399 6.89e-15 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time14:variableM2 28.600 1.573 18.178 6.35e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time28:variableM2 25.400 1.573 16.144 9.85e-15 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time60:variableM2 21.600 1.573 13.729 3.81e-13 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time90:variableM2 17.800 1.573 11.314 2.51e-11 ***</span> +<span class="r-out co"><span class="r-pr">#></span> time120:variableM2 14.100 1.573 8.962 2.79e-09 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Residual standard error: 2.225 on 25 degrees of freedom</span> +<span class="r-out co"><span class="r-pr">#></span> Multiple R-squared: 0.9979, Adjusted R-squared: 0.9957 </span> +<span class="r-out co"><span class="r-pr">#></span> F-statistic: 469.2 on 25 and 25 DF, p-value: < 2.2e-16</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/loftest.mkinfit.html b/docs/dev/reference/loftest.mkinfit.html new file mode 100644 index 00000000..f66a5906 --- /dev/null +++ b/docs/dev/reference/loftest.mkinfit.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/loftest.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/loftest.html"> + </head> +</html> + diff --git a/docs/dev/reference/logLik.mkinfit.html b/docs/dev/reference/logLik.mkinfit.html new file mode 100644 index 00000000..bc2847cc --- /dev/null +++ b/docs/dev/reference/logLik.mkinfit.html @@ -0,0 +1,160 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit"><meta name="description" content="This function returns the product of the likelihood densities of each +observed value, as calculated as part of the fitting procedure using +dnorm, i.e. assuming normal distribution, and with the means +predicted by the degradation model, and the standard deviations predicted by +the error model."><meta property="og:description" content="This function returns the product of the likelihood densities of each +observed value, as calculated as part of the fitting procedure using +dnorm, i.e. assuming normal distribution, and with the means +predicted by the degradation model, and the standard deviations predicted by +the error model."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Calculated the log-likelihood of a fitted mkinfit object</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/logLik.mkinfit.R" class="external-link"><code>R/logLik.mkinfit.R</code></a></small> + <div class="d-none name"><code>logLik.mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function returns the product of the likelihood densities of each +observed value, as calculated as part of the fitting procedure using +<code><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">dnorm</a></code>, i.e. assuming normal distribution, and with the means +predicted by the degradation model, and the standard deviations predicted by +the error model.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/logLik.html" class="external-link">logLik</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An object of class <code><a href="mkinfit.html">mkinfit</a></code>.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>For compatibility with the generic method</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>An object of class <code><a href="https://rdrr.io/r/stats/logLik.html" class="external-link">logLik</a></code> with the number of estimated +parameters (degradation model parameters plus variance model parameters) +as attribute.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>The total number of estimated parameters returned with the value of the +likelihood is calculated as the sum of fitted degradation model parameters +and the fitted error model parameters.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <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> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <span class="va">sfo_sfo</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.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>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span> <span class="va">d_t</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">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></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> <span class="va">f_obs</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_nw</span>, error_model <span class="op">=</span> <span class="st">"obs"</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">f_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_nw</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> df AIC</span> +<span class="r-out co"><span class="r-pr">#></span> f_nw 5 204.4486</span> +<span class="r-out co"><span class="r-pr">#></span> f_obs 6 205.8727</span> +<span class="r-out co"><span class="r-pr">#></span> f_tc 6 141.9656</span> +<span class="r-in"><span> <span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/logLik.saem.mmkin.html b/docs/dev/reference/logLik.saem.mmkin.html new file mode 100644 index 00000000..d542868e --- /dev/null +++ b/docs/dev/reference/logLik.saem.mmkin.html @@ -0,0 +1,109 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>logLik method for saem.mmkin objects — logLik.saem.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="logLik method for saem.mmkin objects — logLik.saem.mmkin"><meta name="description" content="logLik method for saem.mmkin objects"><meta property="og:description" content="logLik method for saem.mmkin objects"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>logLik method for saem.mmkin objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/saem.R" class="external-link"><code>R/saem.R</code></a></small> + <div class="d-none name"><code>logLik.saem.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>logLik method for saem.mmkin objects</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'saem.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/logLik.html" class="external-link">logLik</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span>, method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"is"</span>, <span class="st">"lin"</span>, <span class="st">"gq"</span><span class="op">)</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>The fitted <a href="saem.html">saem.mmkin</a> object</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Passed to <a href="https://rdrr.io/pkg/saemix/man/logLik.html" class="external-link">saemix::logLik.SaemixObject</a></p></dd> + + +<dt id="arg-method">method<a class="anchor" aria-label="anchor" href="#arg-method"></a></dt> +<dd><p>Passed to <a href="https://rdrr.io/pkg/saemix/man/logLik.html" class="external-link">saemix::logLik.SaemixObject</a></p></dd> + +</dl></div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/logistic.solution-1.png b/docs/dev/reference/logistic.solution-1.png Binary files differnew file mode 100644 index 00000000..65739bb7 --- /dev/null +++ b/docs/dev/reference/logistic.solution-1.png diff --git a/docs/dev/reference/logistic.solution-2.png b/docs/dev/reference/logistic.solution-2.png Binary files differnew file mode 100644 index 00000000..e737621e --- /dev/null +++ b/docs/dev/reference/logistic.solution-2.png diff --git a/docs/dev/reference/logistic.solution.html b/docs/dev/reference/logistic.solution.html new file mode 100644 index 00000000..f5fe368a --- /dev/null +++ b/docs/dev/reference/logistic.solution.html @@ -0,0 +1,206 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Logistic kinetics — logistic.solution • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Logistic kinetics — logistic.solution"><meta name="description" content="Function describing exponential decline from a defined starting value, with +an increasing rate constant, supposedly caused by microbial growth"><meta property="og:description" content="Function describing exponential decline from a defined starting value, with +an increasing rate constant, supposedly caused by microbial growth"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Logistic kinetics</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parent_solutions.R" class="external-link"><code>R/parent_solutions.R</code></a></small> + <div class="d-none name"><code>logistic.solution.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Function describing exponential decline from a defined starting value, with +an increasing rate constant, supposedly caused by microbial growth</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-t">t<a class="anchor" aria-label="anchor" href="#arg-t"></a></dt> +<dd><p>Time.</p></dd> + + +<dt id="arg-parent-">parent_0<a class="anchor" aria-label="anchor" href="#arg-parent-"></a></dt> +<dd><p>Starting value for the response variable at time zero.</p></dd> + + +<dt id="arg-kmax">kmax<a class="anchor" aria-label="anchor" href="#arg-kmax"></a></dt> +<dd><p>Maximum rate constant.</p></dd> + + +<dt id="arg-k-">k0<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>Minimum rate constant effective at time zero.</p></dd> + + +<dt id="arg-r">r<a class="anchor" aria-label="anchor" href="#arg-r"></a></dt> +<dd><p>Growth rate of the increase in the rate constant.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The value of the response variable at time <code>t</code>.</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>The solution of the logistic model reduces to the +<code><a href="SFO.solution.html">SFO.solution</a></code> if <code>k0</code> is equal to <code>kmax</code>.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a> +FOCUS (2014) “Generic guidance for Estimating Persistence +and Degradation Kinetics from Environmental Fate Studies on Pesticides in +EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, +Version 1.1, 18 December 2014 +<a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p>Other parent solutions: +<code><a href="DFOP.solution.html">DFOP.solution</a>()</code>, +<code><a href="FOMC.solution.html">FOMC.solution</a>()</code>, +<code><a href="HS.solution.html">HS.solution</a>()</code>, +<code><a href="IORE.solution.html">IORE.solution</a>()</code>, +<code><a href="SFO.solution.html">SFO.solution</a>()</code>, +<code><a href="SFORB.solution.html">SFORB.solution</a>()</code></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># Reproduce the plot on page 57 of FOCUS (2014)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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>,</span></span> +<span class="r-in"><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" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">100</span><span class="op">)</span>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="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>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/legend.html" class="external-link">legend</a></span><span class="op">(</span><span class="st">"topright"</span>, inset <span class="op">=</span> <span class="fl">0.05</span>,</span></span> +<span class="r-in"><span> legend <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="st">"k0 = "</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.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></span> +<span class="r-in"><span> <span class="st">", r = "</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.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>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-plt img"><img src="logistic.solution-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># Fit with synthetic data</span></span></span> +<span class="r-in"><span> <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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"logistic"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><span> <span class="va">parms_logistic</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>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></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="va">parms_logistic</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span></span> +<span class="r-plt img"><img src="logistic.solution-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">m</span><span class="op">)</span><span class="op">$</span><span class="va">bpar</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t) Lower</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 1.057896e+02 1.9023449604 55.610120 3.768360e-16 1.016451e+02</span> +<span class="r-out co"><span class="r-pr">#></span> kmax 6.398190e-02 0.0143201030 4.467978 3.841828e-04 3.929235e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846688e-08</span> +<span class="r-out co"><span class="r-pr">#></span> r 2.263946e-01 0.1718110664 1.317695 1.061043e-01 4.335843e-02</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.332935e+00 0.9145907310 5.830952 4.036926e-05 3.340213e+00</span> +<span class="r-out co"><span class="r-pr">#></span> Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 109.9341588</span> +<span class="r-out co"><span class="r-pr">#></span> kmax 0.1041853</span> +<span class="r-out co"><span class="r-pr">#></span> k0 0.4448749</span> +<span class="r-out co"><span class="r-pr">#></span> r 1.1821120</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 7.3256566</span> +<span class="r-in"><span> <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></span></span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50_k0 DT50_kmax</span> +<span class="r-out co"><span class="r-pr">#></span> parent 36.86533 62.41511 4297.853 10.83349</span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/lrtest.html b/docs/dev/reference/lrtest.html new file mode 100644 index 00000000..9cc267c0 --- /dev/null +++ b/docs/dev/reference/lrtest.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/reexports.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/reexports.html"> + </head> +</html> + diff --git a/docs/dev/reference/lrtest.mkinfit.html b/docs/dev/reference/lrtest.mkinfit.html new file mode 100644 index 00000000..c34e1cdd --- /dev/null +++ b/docs/dev/reference/lrtest.mkinfit.html @@ -0,0 +1,191 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Likelihood ratio test for mkinfit models — lrtest.mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Likelihood ratio test for mkinfit models — lrtest.mkinfit"><meta name="description" content="Compare two mkinfit models based on their likelihood. If two fitted +mkinfit objects are given as arguments, it is checked if they have been +fitted to the same data. It is the responsibility of the user to make sure +that the models are nested, i.e. one of them has less degrees of freedom +and can be expressed by fixing the parameters of the other."><meta property="og:description" content="Compare two mkinfit models based on their likelihood. If two fitted +mkinfit objects are given as arguments, it is checked if they have been +fitted to the same data. It is the responsibility of the user to make sure +that the models are nested, i.e. one of them has less degrees of freedom +and can be expressed by fixing the parameters of the other."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Likelihood ratio test for mkinfit models</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/lrtest.mkinfit.R" class="external-link"><code>R/lrtest.mkinfit.R</code></a></small> + <div class="d-none name"><code>lrtest.mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Compare two mkinfit models based on their likelihood. If two fitted +mkinfit objects are given as arguments, it is checked if they have been +fitted to the same data. It is the responsibility of the user to make sure +that the models are nested, i.e. one of them has less degrees of freedom +and can be expressed by fixing the parameters of the other.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></span><span class="op">(</span><span class="va">object</span>, object_2 <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An <code><a href="mkinfit.html">mkinfit</a></code> object, or an <code><a href="mmkin.html">mmkin</a></code> column +object containing two fits to the same data.</p></dd> + + +<dt id="arg-object-">object_2<a class="anchor" aria-label="anchor" href="#arg-object-"></a></dt> +<dd><p>Optionally, another mkinfit object fitted to the same data.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Argument to <code><a href="mkinfit.html">mkinfit</a></code>, passed to +<code><a href="update.mkinfit.html">update.mkinfit</a></code> for creating the alternative fitted object.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>Alternatively, an argument to mkinfit can be given which is then passed +to <code><a href="update.mkinfit.html">update.mkinfit</a></code> to obtain the alternative model.</p> +<p>The comparison is then made by the <code><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest.default</a></code> +method from the lmtest package. The model with the higher number of fitted +parameters (alternative hypothesis) is listed first, then the model with the +lower number of fitted parameters (null hypothesis).</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">test_data</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">subset</a></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">name</span> <span class="op">==</span> <span class="st">"parent"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">sfo_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">test_data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">dfop_fit</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">test_data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></span><span class="op">(</span><span class="va">dfop_fit</span>, <span class="va">sfo_fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: DFOP with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: SFO with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 5 -42.453 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 3 -63.954 -2 43.002 4.594e-10 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></span><span class="op">(</span><span class="va">sfo_fit</span>, <span class="va">dfop_fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: DFOP with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: SFO with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 5 -42.453 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 3 -63.954 -2 43.002 4.594e-10 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The following two examples are commented out as they fail during</span></span></span> +<span class="r-in"><span><span class="co"># generation of the static help pages by pkgdown</span></span></span> +<span class="r-in"><span><span class="co">#lrtest(dfop_fit, error_model = "tc")</span></span></span> +<span class="r-in"><span><span class="co">#lrtest(dfop_fit, fixed_parms = c(k2 = 0))</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># However, this equivalent syntax also works for static help pages</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></span><span class="op">(</span><span class="va">dfop_fit</span>, <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">dfop_fit</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: DFOP with error model tc</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: DFOP with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 6 -34.587 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 5 -42.453 -1 15.731 7.302e-05 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></span><span class="op">(</span><span class="va">dfop_fit</span>, <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">dfop_fit</span>, fixed_parms <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k2 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: DFOP with error model const</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: DFOP with error model const and fixed parameter(s) k2</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 5 -42.453 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 4 -57.340 -1 29.776 4.851e-08 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/lrtest.mmkin.html b/docs/dev/reference/lrtest.mmkin.html new file mode 100644 index 00000000..dcefa4aa --- /dev/null +++ b/docs/dev/reference/lrtest.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/lrtest.mkinfit.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/lrtest.mkinfit.html"> + </head> +</html> + diff --git a/docs/dev/reference/max_twa_dfop.html b/docs/dev/reference/max_twa_dfop.html new file mode 100644 index 00000000..47bf3da7 --- /dev/null +++ b/docs/dev/reference/max_twa_dfop.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/max_twa_parent.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/max_twa_parent.html"> + </head> +</html> + diff --git a/docs/dev/reference/max_twa_fomc.html b/docs/dev/reference/max_twa_fomc.html new file mode 100644 index 00000000..47bf3da7 --- /dev/null +++ b/docs/dev/reference/max_twa_fomc.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/max_twa_parent.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/max_twa_parent.html"> + </head> +</html> + diff --git a/docs/dev/reference/max_twa_hs.html b/docs/dev/reference/max_twa_hs.html new file mode 100644 index 00000000..47bf3da7 --- /dev/null +++ b/docs/dev/reference/max_twa_hs.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/max_twa_parent.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/max_twa_parent.html"> + </head> +</html> + diff --git a/docs/dev/reference/max_twa_parent.html b/docs/dev/reference/max_twa_parent.html new file mode 100644 index 00000000..550a2678 --- /dev/null +++ b/docs/dev/reference/max_twa_parent.html @@ -0,0 +1,192 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Function to calculate maximum time weighted average concentrations from kinetic models fitted with mkinfit — max_twa_parent • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to calculate maximum time weighted average concentrations from kinetic models fitted with mkinfit — max_twa_parent"><meta name="description" content="This function calculates maximum moving window time weighted average +concentrations (TWAs) for kinetic models fitted with mkinfit. +Currently, only calculations for the parent are implemented for the SFO, +FOMC, DFOP and HS models, using the analytical formulas given in the PEC +soil section of the FOCUS guidance."><meta property="og:description" content="This function calculates maximum moving window time weighted average +concentrations (TWAs) for kinetic models fitted with mkinfit. +Currently, only calculations for the parent are implemented for the SFO, +FOMC, DFOP and HS models, using the analytical formulas given in the PEC +soil section of the FOCUS guidance."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/max_twa_parent.R" class="external-link"><code>R/max_twa_parent.R</code></a></small> + <div class="d-none name"><code>max_twa_parent.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function calculates maximum moving window time weighted average +concentrations (TWAs) for kinetic models fitted with <code><a href="mkinfit.html">mkinfit</a></code>. +Currently, only calculations for the parent are implemented for the SFO, +FOMC, DFOP and HS models, using the analytical formulas given in the PEC +soil section of the FOCUS guidance.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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> +<span></span> +<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> +<span></span> +<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> +<span></span> +<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> +<span></span> +<span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-fit">fit<a class="anchor" aria-label="anchor" href="#arg-fit"></a></dt> +<dd><p>An object of class <code><a href="mkinfit.html">mkinfit</a></code>.</p></dd> + + +<dt id="arg-windows">windows<a class="anchor" aria-label="anchor" href="#arg-windows"></a></dt> +<dd><p>The width of the time windows for which the TWAs should be +calculated.</p></dd> + + +<dt id="arg-m-">M0<a class="anchor" aria-label="anchor" href="#arg-m-"></a></dt> +<dd><p>The initial concentration for which the maximum time weighted +average over the decline curve should be calculated. The default is to use +a value of 1, which means that a relative maximum time weighted average +factor (f_twa) is calculated.</p></dd> + + +<dt id="arg-k">k<a class="anchor" aria-label="anchor" href="#arg-k"></a></dt> +<dd><p>The rate constant in the case of SFO kinetics.</p></dd> + + +<dt id="arg-t">t<a class="anchor" aria-label="anchor" href="#arg-t"></a></dt> +<dd><p>The width of the time window.</p></dd> + + +<dt id="arg-alpha">alpha<a class="anchor" aria-label="anchor" href="#arg-alpha"></a></dt> +<dd><p>Parameter of the FOMC model.</p></dd> + + +<dt id="arg-beta">beta<a class="anchor" aria-label="anchor" href="#arg-beta"></a></dt> +<dd><p>Parameter of the FOMC model.</p></dd> + + +<dt id="arg-k-">k1<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>The first rate constant of the DFOP or the HS kinetics.</p></dd> + + +<dt id="arg-k-">k2<a class="anchor" aria-label="anchor" href="#arg-k-"></a></dt> +<dd><p>The second rate constant of the DFOP or the HS kinetics.</p></dd> + + +<dt id="arg-g">g<a class="anchor" aria-label="anchor" href="#arg-g"></a></dt> +<dd><p>Parameter of the DFOP model.</p></dd> + + +<dt id="arg-tb">tb<a class="anchor" aria-label="anchor" href="#arg-tb"></a></dt> +<dd><p>Parameter of the HS model.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>For <code>max_twa_parent</code>, a numeric vector, named using the +<code>windows</code> argument. For the other functions, a numeric vector of +length one (also known as 'a number').</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><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">"FOMC"</span>, <span class="va">FOCUS_2006_C</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><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" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> 7 21 </span> +<span class="r-out co"><span class="r-pr">#></span> 34.71343 18.22124 </span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/max_twa_sfo.html b/docs/dev/reference/max_twa_sfo.html new file mode 100644 index 00000000..47bf3da7 --- /dev/null +++ b/docs/dev/reference/max_twa_sfo.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/max_twa_parent.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/max_twa_parent.html"> + </head> +</html> + diff --git a/docs/dev/reference/mccall81_245T-1.png b/docs/dev/reference/mccall81_245T-1.png Binary files differnew file mode 100644 index 00000000..3bb35cbd --- /dev/null +++ b/docs/dev/reference/mccall81_245T-1.png diff --git a/docs/dev/reference/mccall81_245T.html b/docs/dev/reference/mccall81_245T.html new file mode 100644 index 00000000..996e9fc2 --- /dev/null +++ b/docs/dev/reference/mccall81_245T.html @@ -0,0 +1,201 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T"><meta name="description" content="Time course of 2,4,5-trichlorophenoxyacetic acid, and the corresponding + 2,4,5-trichlorophenol and 2,4,5-trichloroanisole as recovered in diethylether + extracts."><meta property="og:description" content="Time course of 2,4,5-trichlorophenoxyacetic acid, and the corresponding + 2,4,5-trichlorophenol and 2,4,5-trichloroanisole as recovered in diethylether + extracts."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Datasets on aerobic soil metabolism of 2,4,5-T in six soils</h1> + + <div class="d-none name"><code>mccall81_245T.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Time course of 2,4,5-trichlorophenoxyacetic acid, and the corresponding + 2,4,5-trichlorophenol and 2,4,5-trichloroanisole as recovered in diethylether + extracts.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">mccall81_245T</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <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 + <code><a href="mkinmod.html">mkinmod</a></code>.</p></dd> + + <dt><code>time</code></dt> +<dd><p>a numeric vector containing sampling times in days after + treatment</p></dd> + + <dt><code>value</code></dt> +<dd><p>a numeric vector containing concentrations in percent of applied radioactivity</p></dd> + + <dt><code>soil</code></dt> +<dd><p>a factor containing the name of the soil</p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>McCall P, Vrona SA, Kelley SS (1981) Fate of uniformly carbon-14 ring labelled 2,4,5-Trichlorophenoxyacetic acid and 2,4-dichlorophenoxyacetic acid. J Agric Chem 29, 100-107 + <a href="https://doi.org/10.1021/jf00103a026" class="external-link">doi:10.1021/jf00103a026</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span> <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" class="external-link">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>,</span></span> +<span class="r-in"><span> phenol <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"anisole"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> anisole <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span> <span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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" class="external-link">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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit.1</span><span class="op">)</span><span class="op">$</span><span class="va">bpar</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t)</span> +<span class="r-out co"><span class="r-pr">#></span> T245_0 1.038550e+02 2.1847074943 47.537272 4.472189e-18</span> +<span class="r-out co"><span class="r-pr">#></span> k_T245 4.337042e-02 0.0018983965 22.845818 2.276911e-13</span> +<span class="r-out co"><span class="r-pr">#></span> k_phenol 4.050581e-01 0.2986993738 1.356073 9.756990e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_anisole 6.678742e-03 0.0008021439 8.326114 2.623177e-07</span> +<span class="r-out co"><span class="r-pr">#></span> f_T245_to_phenol 6.227599e-01 0.3985340721 1.562626 6.949414e-02</span> +<span class="r-out co"><span class="r-pr">#></span> f_phenol_to_anisole 1.000000e+00 0.6718440131 1.488441 7.867790e-02</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.514628e+00 0.4907558973 5.123989 6.233159e-05</span> +<span class="r-out co"><span class="r-pr">#></span> Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> T245_0 99.246061490 1.084640e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k_T245 0.039631621 4.746194e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_phenol 0.218013879 7.525762e-01</span> +<span class="r-out co"><span class="r-pr">#></span> k_anisole 0.005370739 8.305299e-03</span> +<span class="r-out co"><span class="r-pr">#></span> f_T245_to_phenol 0.547559080 6.924813e-01</span> +<span class="r-out co"><span class="r-pr">#></span> f_phenol_to_anisole 0.000000000 1.000000e+00</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.706607296 3.322649e+00</span> +<span class="r-in"><span> <span class="fu"><a href="endpoints.html">endpoints</a></span><span class="op">(</span><span class="va">fit.1</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $ff</span> +<span class="r-out co"><span class="r-pr">#></span> T245_phenol T245_sink phenol_anisole phenol_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 6.227599e-01 3.772401e-01 1.000000e+00 3.072478e-10 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> T245 15.982025 53.09114</span> +<span class="r-out co"><span class="r-pr">#></span> phenol 1.711229 5.68458</span> +<span class="r-out co"><span class="r-pr">#></span> anisole 103.784093 344.76329</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span> <span class="co"># formation fraction from phenol to anisol is practically 1. As we cannot</span></span></span> +<span class="r-in"><span> <span class="co"># fix formation fractions when using the ilr transformation, we can turn of</span></span></span> +<span class="r-in"><span> <span class="co"># the sink in the model generation</span></span></span> +<span class="r-in"><span> <span class="va">SFO_SFO_SFO_2</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" class="external-link">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>,</span></span> +<span class="r-in"><span> phenol <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"anisole"</span>, sink <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> anisole <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span> <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_2</span>, <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">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>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit.2</span><span class="op">)</span><span class="op">$</span><span class="va">bpar</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t) Lower</span> +<span class="r-out co"><span class="r-pr">#></span> T245_0 1.038550e+02 2.1623653059 48.028439 4.993108e-19 99.271020328</span> +<span class="r-out co"><span class="r-pr">#></span> k_T245 4.337042e-02 0.0018343666 23.643268 3.573556e-14 0.039650976</span> +<span class="r-out co"><span class="r-pr">#></span> k_phenol 4.050582e-01 0.1177237651 3.440752 1.679255e-03 0.218746589</span> +<span class="r-out co"><span class="r-pr">#></span> k_anisole 6.678742e-03 0.0006829745 9.778903 1.872894e-08 0.005377083</span> +<span class="r-out co"><span class="r-pr">#></span> f_T245_to_phenol 6.227599e-01 0.0342197873 18.198824 2.039411e-12 0.547975634</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.514628e+00 0.3790944250 6.633250 2.875782e-06 1.710983655</span> +<span class="r-out co"><span class="r-pr">#></span> Upper</span> +<span class="r-out co"><span class="r-pr">#></span> T245_0 108.43904079</span> +<span class="r-out co"><span class="r-pr">#></span> k_T245 0.04743877</span> +<span class="r-out co"><span class="r-pr">#></span> k_phenol 0.75005593</span> +<span class="r-out co"><span class="r-pr">#></span> k_anisole 0.00829550</span> +<span class="r-out co"><span class="r-pr">#></span> f_T245_to_phenol 0.69212307</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 3.31827222</span> +<span class="r-in"><span> <span class="fu"><a href="endpoints.html">endpoints</a></span><span class="op">(</span><span class="va">fit.1</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $ff</span> +<span class="r-out co"><span class="r-pr">#></span> T245_phenol T245_sink phenol_anisole phenol_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 6.227599e-01 3.772401e-01 1.000000e+00 3.072478e-10 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> T245 15.982025 53.09114</span> +<span class="r-out co"><span class="r-pr">#></span> phenol 1.711229 5.68458</span> +<span class="r-out co"><span class="r-pr">#></span> anisole 103.784093 344.76329</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span> <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></span></span> +<span class="r-plt img"><img src="mccall81_245T-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mean_degparms.html b/docs/dev/reference/mean_degparms.html new file mode 100644 index 00000000..41517875 --- /dev/null +++ b/docs/dev/reference/mean_degparms.html @@ -0,0 +1,134 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate mean degradation parameters for an mmkin row object — mean_degparms • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate mean degradation parameters for an mmkin row object — mean_degparms"><meta name="description" content="Calculate mean degradation parameters for an mmkin row object"><meta property="og:description" content="Calculate mean degradation parameters for an mmkin row object"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Calculate mean degradation parameters for an mmkin row object</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mean_degparms.R" class="external-link"><code>R/mean_degparms.R</code></a></small> + <div class="d-none name"><code>mean_degparms.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Calculate mean degradation parameters for an mmkin row object</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mean_degparms</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> random <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> test_log_parms <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> conf.level <span class="op">=</span> <span class="fl">0.6</span>,</span> +<span> default_log_parms <span class="op">=</span> <span class="cn">NA</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An mmkin row object containing several fits of the same model to different datasets</p></dd> + + +<dt id="arg-random">random<a class="anchor" aria-label="anchor" href="#arg-random"></a></dt> +<dd><p>Should a list with fixed and random effects be returned?</p></dd> + + +<dt id="arg-test-log-parms">test_log_parms<a class="anchor" aria-label="anchor" href="#arg-test-log-parms"></a></dt> +<dd><p>If TRUE, log parameters are only considered in +the mean calculations if their untransformed counterparts (most likely +rate constants) pass the t-test for significant difference from zero.</p></dd> + + +<dt id="arg-conf-level">conf.level<a class="anchor" aria-label="anchor" href="#arg-conf-level"></a></dt> +<dd><p>Possibility to adjust the required confidence level +for parameter that are tested if requested by 'test_log_parms'.</p></dd> + + +<dt id="arg-default-log-parms">default_log_parms<a class="anchor" aria-label="anchor" href="#arg-default-log-parms"></a></dt> +<dd><p>If set to a numeric value, this is used +as a default value for the tested log parameters that failed the +t-test.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <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> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mhmkin-1.png b/docs/dev/reference/mhmkin-1.png Binary files differnew file mode 100644 index 00000000..1c99aead --- /dev/null +++ b/docs/dev/reference/mhmkin-1.png diff --git a/docs/dev/reference/mhmkin-2.png b/docs/dev/reference/mhmkin-2.png Binary files differnew file mode 100644 index 00000000..7311206d --- /dev/null +++ b/docs/dev/reference/mhmkin-2.png diff --git a/docs/dev/reference/mhmkin.html b/docs/dev/reference/mhmkin.html new file mode 100644 index 00000000..513fc780 --- /dev/null +++ b/docs/dev/reference/mhmkin.html @@ -0,0 +1,286 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Fit nonlinear mixed-effects models built from one or more kinetic degradation models and one or more error models — mhmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Fit nonlinear mixed-effects models built from one or more kinetic degradation models and one or more error models — mhmkin"><meta name="description" content="The name of the methods expresses that (multiple) hierarchichal +(also known as multilevel) multicompartment kinetic models are +fitted. Our kinetic models are nonlinear, so we can use various nonlinear +mixed-effects model fitting functions."><meta property="og:description" content="The name of the methods expresses that (multiple) hierarchichal +(also known as multilevel) multicompartment kinetic models are +fitted. Our kinetic models are nonlinear, so we can use various nonlinear +mixed-effects model fitting functions."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Fit nonlinear mixed-effects models built from one or more kinetic degradation models and one or more error models</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mhmkin.R" class="external-link"><code>R/mhmkin.R</code></a></small> + <div class="d-none name"><code>mhmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The name of the methods expresses that (<strong>m</strong>ultiple) <strong>h</strong>ierarchichal +(also known as multilevel) <strong>m</strong>ulticompartment <strong>kin</strong>etic models are +fitted. Our kinetic models are nonlinear, so we can use various nonlinear +mixed-effects model fitting functions.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mhmkin</span><span class="op">(</span><span class="va">objects</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu">mhmkin</span><span class="op">(</span><span class="va">objects</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'list'</span></span> +<span><span class="fu">mhmkin</span><span class="op">(</span></span> +<span> <span class="va">objects</span>,</span> +<span> backend <span class="op">=</span> <span class="st">"saemix"</span>,</span> +<span> algorithm <span class="op">=</span> <span class="st">"saem"</span>,</span> +<span> no_random_effect <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> <span class="va">...</span>,</span> +<span> cores <span class="op">=</span> <span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html" class="external-link">Sys.info</a></span><span class="op">(</span><span class="op">)</span><span class="op">[</span><span class="st">"sysname"</span><span class="op">]</span> <span class="op">==</span> <span class="st">"Windows"</span><span class="op">)</span> <span class="fl">1</span> <span class="kw">else</span> <span class="fu">parallel</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/parallel/detectCores.html" class="external-link">detectCores</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> cluster <span class="op">=</span> <span class="cn">NULL</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mhmkin'</span></span> +<span><span class="va">x</span><span class="op">[</span><span class="va">i</span>, <span class="va">j</span>, <span class="va">...</span>, drop <span class="op">=</span> <span class="cn">FALSE</span><span class="op">]</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mhmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-objects">objects<a class="anchor" aria-label="anchor" href="#arg-objects"></a></dt> +<dd><p>A list of <a href="mmkin.html">mmkin</a> objects containing fits of the same +degradation models to the same data, but using different error models. +Alternatively, a single <a href="mmkin.html">mmkin</a> object containing fits of several +degradation models to the same data</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments that will be passed to the nonlinear mixed-effects +model fitting function.</p></dd> + + +<dt id="arg-backend">backend<a class="anchor" aria-label="anchor" href="#arg-backend"></a></dt> +<dd><p>The backend to be used for fitting. Currently, only saemix is +supported</p></dd> + + +<dt id="arg-algorithm">algorithm<a class="anchor" aria-label="anchor" href="#arg-algorithm"></a></dt> +<dd><p>The algorithm to be used for fitting (currently not used)</p></dd> + + +<dt id="arg-no-random-effect">no_random_effect<a class="anchor" aria-label="anchor" href="#arg-no-random-effect"></a></dt> +<dd><p>Default is NULL and will be passed to <a href="saem.html">saem</a>. If a +character vector is supplied, it will be passed to all calls to <a href="saem.html">saem</a>, +which will exclude random effects for all matching parameters. Alternatively, +a list of character vectors or an object of class <a href="illparms.html">illparms.mhmkin</a> can be +specified. They have to have the same dimensions that the return object of +the current call will have, i.e. the number of rows must match the number +of degradation models in the mmkin object(s), and the number of columns must +match the number of error models used in the mmkin object(s).</p></dd> + + +<dt id="arg-cores">cores<a class="anchor" aria-label="anchor" href="#arg-cores"></a></dt> +<dd><p>The number of cores to be used for multicore processing. This +is only used when the <code>cluster</code> argument is <code>NULL</code>. On Windows +machines, cores > 1 is not supported, you need to use the <code>cluster</code> +argument to use multiple logical processors. Per default, all cores detected +by <code><a href="https://rdrr.io/r/parallel/detectCores.html" class="external-link">parallel::detectCores()</a></code> are used, except on Windows where the default +is 1.</p></dd> + + +<dt id="arg-cluster">cluster<a class="anchor" aria-label="anchor" href="#arg-cluster"></a></dt> +<dd><p>A cluster as returned by makeCluster to be used for +parallel execution.</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An mhmkin object.</p></dd> + + +<dt id="arg-i">i<a class="anchor" aria-label="anchor" href="#arg-i"></a></dt> +<dd><p>Row index selecting the fits for specific models</p></dd> + + +<dt id="arg-j">j<a class="anchor" aria-label="anchor" href="#arg-j"></a></dt> +<dd><p>Column index selecting the fits to specific datasets</p></dd> + + +<dt id="arg-drop">drop<a class="anchor" aria-label="anchor" href="#arg-drop"></a></dt> +<dd><p>If FALSE, the method always returns an mhmkin object, otherwise +either a list of fit objects or a single fit object.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A two-dimensional <a href="https://rdrr.io/r/base/array.html" class="external-link">array</a> of fit objects and/or try-errors that can +be indexed using the degradation model names for the first index (row index) +and the error model names for the second index (column index), with class +attribute 'mhmkin'.</p> +<p>An object inheriting from <code>mhmkin</code>.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><code>[.mhmkin</code> for subsetting mhmkin objects</p></div> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="co"># We start with separate evaluations of all the first six datasets with two</span></span></span> +<span class="r-in"><span><span class="co"># degradation models and two error models</span></span></span> +<span class="r-in"><span><span class="va">f_sep_const</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" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"FOMC"</span><span class="op">)</span>, <span class="va">ds_fomc</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">6</span><span class="op">]</span>, cores <span class="op">=</span> <span class="fl">2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_sep_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_sep_const</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># The mhmkin function sets up hierarchical degradation models aka</span></span></span> +<span class="r-in"><span><span class="co"># nonlinear mixed-effects models for all four combinations, specifying</span></span></span> +<span class="r-in"><span><span class="co"># uncorrelated random effects for all degradation parameters</span></span></span> +<span class="r-in"><span><span class="va">f_saem_1</span> <span class="op"><-</span> <span class="fu">mhmkin</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="va">f_sep_const</span>, <span class="va">f_sep_tc</span><span class="op">)</span>, cores <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="status.html">status</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> error</span> +<span class="r-out co"><span class="r-pr">#></span> degradation const tc</span> +<span class="r-out co"><span class="r-pr">#></span> SFO OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> OK: Fit terminated successfully</span> +<span class="r-in"><span><span class="co"># The 'illparms' function shows that in all hierarchical fits, at least</span></span></span> +<span class="r-in"><span><span class="co"># one random effect is ill-defined (the confidence interval for the</span></span></span> +<span class="r-in"><span><span class="co"># random effect expressed as standard deviation includes zero)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> error</span> +<span class="r-out co"><span class="r-pr">#></span> degradation const tc </span> +<span class="r-out co"><span class="r-pr">#></span> SFO sd(parent_0) sd(parent_0) </span> +<span class="r-out co"><span class="r-pr">#></span> FOMC sd(log_beta) sd(parent_0), sd(log_beta)</span> +<span class="r-in"><span><span class="co"># Therefore we repeat the fits, excluding the ill-defined random effects</span></span></span> +<span class="r-in"><span><span class="va">f_saem_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_1</span>, no_random_effect <span class="op">=</span> <span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="status.html">status</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> error</span> +<span class="r-out co"><span class="r-pr">#></span> degradation const tc</span> +<span class="r-out co"><span class="r-pr">#></span> SFO OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> OK: Fit terminated successfully</span> +<span class="r-in"><span><span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> error</span> +<span class="r-out co"><span class="r-pr">#></span> degradation const tc</span> +<span class="r-out co"><span class="r-pr">#></span> SFO </span> +<span class="r-out co"><span class="r-pr">#></span> FOMC </span> +<span class="r-in"><span><span class="co"># Model comparisons show that FOMC with two-component error is preferable,</span></span></span> +<span class="r-in"><span><span class="co"># and confirms our reduction of the default parameter model</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_1</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 95 observations of 1 variable(s) grouped in 6 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik</span> +<span class="r-out co"><span class="r-pr">#></span> SFO const 5 574.40 573.35 -282.20</span> +<span class="r-out co"><span class="r-pr">#></span> SFO tc 6 543.72 542.47 -265.86</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC const 7 489.67 488.22 -237.84</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC tc 8 406.11 404.44 -195.05</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 95 observations of 1 variable(s) grouped in 6 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik</span> +<span class="r-out co"><span class="r-pr">#></span> SFO const 4 572.22 571.39 -282.11</span> +<span class="r-out co"><span class="r-pr">#></span> SFO tc 5 541.63 540.59 -265.81</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC const 6 487.38 486.13 -237.69</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC tc 6 402.12 400.88 -195.06</span> +<span class="r-in"><span><span class="co"># The convergence plot for the selected model looks fine</span></span></span> +<span class="r-in"><span><span class="fu">saemix</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">[[</span><span class="st">"FOMC"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"convergence"</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mhmkin-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># The plot of predictions versus data shows that we have a pretty data-rich</span></span></span> +<span class="r-in"><span><span class="co"># situation with homogeneous distribution of residuals, because we used the</span></span></span> +<span class="r-in"><span><span class="co"># same degradation model, error model and parameter distribution model that</span></span></span> +<span class="r-in"><span><span class="co"># was used in the data generation.</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_2</span><span class="op">[[</span><span class="st">"FOMC"</span>, <span class="st">"tc"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mhmkin-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># We can specify the same parameter model reductions manually</span></span></span> +<span class="r-in"><span><span class="va">no_ranef</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"parent_0"</span>, <span class="st">"log_beta"</span>, <span class="st">"parent_0"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"parent_0"</span>, <span class="st">"log_beta"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/dim.html" class="external-link">dim</a></span><span class="op">(</span><span class="va">no_ranef</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">2</span>, <span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_2m</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_1</span>, no_random_effect <span class="op">=</span> <span class="va">no_ranef</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_2m</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 95 observations of 1 variable(s) grouped in 6 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik</span> +<span class="r-out co"><span class="r-pr">#></span> SFO const 4 572.22 571.39 -282.11</span> +<span class="r-out co"><span class="r-pr">#></span> SFO tc 5 541.63 540.59 -265.81</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC const 6 487.38 486.13 -237.69</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC tc 6 402.12 400.88 -195.06</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mhmkin.list.html b/docs/dev/reference/mhmkin.list.html new file mode 100644 index 00000000..19cc9c91 --- /dev/null +++ b/docs/dev/reference/mhmkin.list.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mhmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mhmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/mhmkin.mmkin.html b/docs/dev/reference/mhmkin.mmkin.html new file mode 100644 index 00000000..19cc9c91 --- /dev/null +++ b/docs/dev/reference/mhmkin.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mhmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mhmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/mixed-1.png b/docs/dev/reference/mixed-1.png Binary files differnew file mode 100644 index 00000000..d46a2485 --- /dev/null +++ b/docs/dev/reference/mixed-1.png diff --git a/docs/dev/reference/mixed.html b/docs/dev/reference/mixed.html new file mode 100644 index 00000000..513fb226 --- /dev/null +++ b/docs/dev/reference/mixed.html @@ -0,0 +1,199 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Create a mixed effects model from an mmkin row object — mixed • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create a mixed effects model from an mmkin row object — mixed"><meta name="description" content="Create a mixed effects model from an mmkin row object"><meta property="og:description" content="Create a mixed effects model from an mmkin row object"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Create a mixed effects model from an mmkin row object</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mixed.mmkin.R" class="external-link"><code>R/mixed.mmkin.R</code></a></small> + <div class="d-none name"><code>mixed.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Create a mixed effects model from an mmkin row object</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mixed</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu">mixed</span><span class="op">(</span><span class="va">object</span>, method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"none"</span><span class="op">)</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mixed.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">max</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An <a href="mmkin.html">mmkin</a> row object</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Currently not used</p></dd> + + +<dt id="arg-method">method<a class="anchor" aria-label="anchor" href="#arg-method"></a></dt> +<dd><p>The method to be used</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>A mixed.mmkin object to print</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>Number of digits to use for printing.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>An object of class 'mixed.mmkin' which has the observed data in a +single dataframe which is convenient for plotting</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><span><span class="va">n_biphasic</span> <span class="op"><-</span> <span class="fl">8</span></span></span> +<span class="r-in"><span><span class="va">err_1</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>const <span class="op">=</span> <span class="fl">1</span>, prop <span class="op">=</span> <span class="fl">0.07</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">DFOP_SFO</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Random.html" class="external-link">set.seed</a></span><span class="op">(</span><span class="fl">123456</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">log_sd</span> <span class="op"><-</span> <span class="fl">0.3</span></span></span> +<span class="r-in"><span><span class="va">syn_biphasic_parms</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/matrix.html" class="external-link">as.matrix</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> k1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Lognormal.html" class="external-link">rlnorm</a></span><span class="op">(</span><span class="va">n_biphasic</span>, <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">0.05</span><span class="op">)</span>, <span class="va">log_sd</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> k2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Lognormal.html" class="external-link">rlnorm</a></span><span class="op">(</span><span class="va">n_biphasic</span>, <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">0.01</span><span class="op">)</span>, <span class="va">log_sd</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> g <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Logistic.html" class="external-link">plogis</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="va">n_biphasic</span>, <span class="fl">0</span>, <span class="va">log_sd</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> f_parent_to_m1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Logistic.html" class="external-link">plogis</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="va">n_biphasic</span>, <span class="fl">0</span>, <span class="va">log_sd</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> k_m1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/stats/Lognormal.html" class="external-link">rlnorm</a></span><span class="op">(</span><span class="va">n_biphasic</span>, <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">0.002</span><span class="op">)</span>, <span class="va">log_sd</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">ds_biphasic_mean</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="fl">1</span><span class="op">:</span><span class="va">n_biphasic</span>,</span></span> +<span class="r-in"><span> <span class="kw">function</span><span class="op">(</span><span class="va">i</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">DFOP_SFO</span>, <span class="va">syn_biphasic_parms</span><span class="op">[</span><span class="va">i</span>, <span class="op">]</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><span> <span class="op">}</span></span></span> +<span class="r-in"><span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Random.html" class="external-link">set.seed</a></span><span class="op">(</span><span class="fl">123456L</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">ds_biphasic</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="va">ds_biphasic_mean</span>, <span class="kw">function</span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="add_err.html">add_err</a></span><span class="op">(</span><span class="va">ds</span>,</span></span> +<span class="r-in"><span> sdfunc <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">value</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html" class="external-link">sqrt</a></span><span class="op">(</span><span class="va">err_1</span><span class="op">$</span><span class="va">const</span><span class="op">^</span><span class="fl">2</span> <span class="op">+</span> <span class="va">value</span><span class="op">^</span><span class="fl">2</span> <span class="op">*</span> <span class="va">err_1</span><span class="op">$</span><span class="va">prop</span><span class="op">^</span><span class="fl">2</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> n <span class="op">=</span> <span class="fl">1</span>, secondary <span class="op">=</span> <span class="st">"m1"</span><span class="op">)</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span></span></span> +<span class="r-in"><span><span class="op">}</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">f_mmkin</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" class="external-link">list</a></span><span class="op">(</span><span class="st">"DFOP-SFO"</span> <span class="op">=</span> <span class="va">DFOP_SFO</span><span class="op">)</span>, <span class="va">ds_biphasic</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">f_mixed</span> <span class="op"><-</span> <span class="fu">mixed</span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">f_mixed</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Kinetic model fitted by nonlinear regression to each dataset</span> +<span class="r-out co"><span class="r-pr">#></span> Structural model:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> +<span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> +<span class="r-out co"><span class="r-pr">#></span> * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_m1/dt = + f_parent_to_m1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)</span> +<span class="r-out co"><span class="r-pr">#></span> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *</span> +<span class="r-out co"><span class="r-pr">#></span> exp(-k2 * time))) * parent - k_m1 * m1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 271 observations of 2 variable(s) grouped in 8 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mmkin> object</span> +<span class="r-out co"><span class="r-pr">#></span> Status of individual fits:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model 1 2 3 4 5 6 7 8 </span> +<span class="r-out co"><span class="r-pr">#></span> DFOP-SFO OK OK OK OK OK C OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> C: Optimisation did not converge:</span> +<span class="r-out co"><span class="r-pr">#></span> iteration limit reached without convergence (10)</span> +<span class="r-out co"><span class="r-pr">#></span> OK: No warnings</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Mean fitted parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 </span> +<span class="r-out co"><span class="r-pr">#></span> 100.605312 -8.758664 -0.001917 -3.350887 -3.990017 </span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis </span> +<span class="r-out co"><span class="r-pr">#></span> -0.091167 </span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_mixed</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mixed-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mixed.mmkin.html b/docs/dev/reference/mixed.mmkin.html new file mode 100644 index 00000000..7b45f95d --- /dev/null +++ b/docs/dev/reference/mixed.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mixed.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mixed.html"> + </head> +</html> + diff --git a/docs/dev/reference/mkin_long_to_wide.html b/docs/dev/reference/mkin_long_to_wide.html new file mode 100644 index 00000000..c8c748a4 --- /dev/null +++ b/docs/dev/reference/mkin_long_to_wide.html @@ -0,0 +1,155 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Convert a dataframe from long to wide format — mkin_long_to_wide • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Convert a dataframe from long to wide format — mkin_long_to_wide"><meta name="description" content="This function takes a dataframe in the long form, i.e. with a row for each +observed value, and converts it into a dataframe with one independent +variable and several dependent variables as columns."><meta property="og:description" content="This function takes a dataframe in the long form, i.e. with a row for each +observed value, and converts it into a dataframe with one independent +variable and several dependent variables as columns."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Convert a dataframe from long to wide format</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkin_long_to_wide.R" class="external-link"><code>R/mkin_long_to_wide.R</code></a></small> + <div class="d-none name"><code>mkin_long_to_wide.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function takes a dataframe in the long form, i.e. with a row for each +observed value, and converts it into a dataframe with one independent +variable and several dependent variables as columns.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkin_long_to_wide</span><span class="op">(</span><span class="va">long_data</span>, time <span class="op">=</span> <span class="st">"time"</span>, outtime <span class="op">=</span> <span class="st">"time"</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-long-data">long_data<a class="anchor" aria-label="anchor" href="#arg-long-data"></a></dt> +<dd><p>The dataframe must contain one variable called "time" with +the time values specified by the <code>time</code> argument, one column called +"name" with the grouping of the observed values, and finally one column of +observed values called "value".</p></dd> + + +<dt id="arg-time">time<a class="anchor" aria-label="anchor" href="#arg-time"></a></dt> +<dd><p>The name of the time variable in the long input data.</p></dd> + + +<dt id="arg-outtime">outtime<a class="anchor" aria-label="anchor" href="#arg-outtime"></a></dt> +<dd><p>The name of the time variable in the wide output data.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>Dataframe in wide format.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="fu">mkin_long_to_wide</span><span class="op">(</span><span class="va">FOCUS_2006_D</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> time parent m1</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0 99.46 0.00</span> +<span class="r-out co"><span class="r-pr">#></span> 2 0 102.04 0.00</span> +<span class="r-out co"><span class="r-pr">#></span> 3 1 93.50 4.84</span> +<span class="r-out co"><span class="r-pr">#></span> 4 1 92.50 5.64</span> +<span class="r-out co"><span class="r-pr">#></span> 5 3 63.23 12.91</span> +<span class="r-out co"><span class="r-pr">#></span> 6 3 68.99 12.96</span> +<span class="r-out co"><span class="r-pr">#></span> 7 7 52.32 22.97</span> +<span class="r-out co"><span class="r-pr">#></span> 8 7 55.13 24.47</span> +<span class="r-out co"><span class="r-pr">#></span> 9 14 27.27 41.69</span> +<span class="r-out co"><span class="r-pr">#></span> 10 14 26.64 33.21</span> +<span class="r-out co"><span class="r-pr">#></span> 11 21 11.50 44.37</span> +<span class="r-out co"><span class="r-pr">#></span> 12 21 11.64 46.44</span> +<span class="r-out co"><span class="r-pr">#></span> 13 35 2.85 41.22</span> +<span class="r-out co"><span class="r-pr">#></span> 14 35 2.91 37.95</span> +<span class="r-out co"><span class="r-pr">#></span> 15 50 0.69 41.19</span> +<span class="r-out co"><span class="r-pr">#></span> 16 50 0.63 40.01</span> +<span class="r-out co"><span class="r-pr">#></span> 17 75 0.05 40.09</span> +<span class="r-out co"><span class="r-pr">#></span> 18 75 0.06 33.85</span> +<span class="r-out co"><span class="r-pr">#></span> 19 100 NA 31.04</span> +<span class="r-out co"><span class="r-pr">#></span> 20 100 NA 33.13</span> +<span class="r-out co"><span class="r-pr">#></span> 21 120 NA 25.15</span> +<span class="r-out co"><span class="r-pr">#></span> 22 120 NA 33.31</span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkin_wide_to_long.html b/docs/dev/reference/mkin_wide_to_long.html new file mode 100644 index 00000000..98a9e7e6 --- /dev/null +++ b/docs/dev/reference/mkin_wide_to_long.html @@ -0,0 +1,135 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Convert a dataframe with observations over time into long format — mkin_wide_to_long • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Convert a dataframe with observations over time into long format — mkin_wide_to_long"><meta name="description" content="This function simply takes a dataframe with one independent variable and +several dependent variable and converts it into the long form as required by +mkinfit."><meta property="og:description" content="This function simply takes a dataframe with one independent variable and +several dependent variable and converts it into the long form as required by +mkinfit."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Convert a dataframe with observations over time into long format</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkin_wide_to_long.R" class="external-link"><code>R/mkin_wide_to_long.R</code></a></small> + <div class="d-none name"><code>mkin_wide_to_long.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function simply takes a dataframe with one independent variable and +several dependent variable and converts it into the long form as required by +<code><a href="mkinfit.html">mkinfit</a></code>.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkin_wide_to_long</span><span class="op">(</span><span class="va">wide_data</span>, time <span class="op">=</span> <span class="st">"t"</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-wide-data">wide_data<a class="anchor" aria-label="anchor" href="#arg-wide-data"></a></dt> +<dd><p>The dataframe must contain one variable with the time +values specified by the <code>time</code> argument and usually more than one +column of observed values.</p></dd> + + +<dt id="arg-time">time<a class="anchor" aria-label="anchor" href="#arg-time"></a></dt> +<dd><p>The name of the time variable.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>Dataframe in long format as needed for <code><a href="mkinfit.html">mkinfit</a></code>.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">wide</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span>t <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>,<span class="fl">2</span>,<span class="fl">3</span><span class="op">)</span>, x <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>,<span class="fl">4</span>,<span class="fl">7</span><span class="op">)</span>, y <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">3</span>,<span class="fl">4</span>,<span class="fl">5</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">mkin_wide_to_long</span><span class="op">(</span><span class="va">wide</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> name time value</span> +<span class="r-out co"><span class="r-pr">#></span> 1 x 1 1</span> +<span class="r-out co"><span class="r-pr">#></span> 2 x 2 4</span> +<span class="r-out co"><span class="r-pr">#></span> 3 x 3 7</span> +<span class="r-out co"><span class="r-pr">#></span> 4 y 1 3</span> +<span class="r-out co"><span class="r-pr">#></span> 5 y 2 4</span> +<span class="r-out co"><span class="r-pr">#></span> 6 y 3 5</span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinds.html b/docs/dev/reference/mkinds.html new file mode 100644 index 00000000..a0387d78 --- /dev/null +++ b/docs/dev/reference/mkinds.html @@ -0,0 +1,219 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>A dataset class for mkin — mkinds • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="A dataset class for mkin — mkinds"><meta name="description" content="At the moment this dataset class is hardly used in mkin. For example, +mkinfit does not take mkinds datasets as argument, but works with dataframes +such as the on contained in the data field of mkinds objects. Some datasets +provided by this package come as mkinds objects nevertheless."><meta property="og:description" content="At the moment this dataset class is hardly used in mkin. For example, +mkinfit does not take mkinds datasets as argument, but works with dataframes +such as the on contained in the data field of mkinds objects. Some datasets +provided by this package come as mkinds objects nevertheless."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>A dataset class for mkin</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkinds.R" class="external-link"><code>R/mkinds.R</code></a></small> + <div class="d-none name"><code>mkinds.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>At the moment this dataset class is hardly used in mkin. For example, +mkinfit does not take mkinds datasets as argument, but works with dataframes +such as the on contained in the data field of mkinds objects. Some datasets +provided by this package come as mkinds objects nevertheless.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinds'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, data <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An mkinds object.</p></dd> + + +<dt id="arg-data">data<a class="anchor" aria-label="anchor" href="#arg-data"></a></dt> +<dd><p>Should the data be printed?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="public-fields">Public fields<a class="anchor" aria-label="anchor" href="#public-fields"></a></h2> + <p></p><div class="r6-fields"><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> + + +<dt><code>time_unit</code></dt> +<dd><p>The time unit</p></dd> + + +<dt><code>observed</code></dt> +<dd><p>Names of the observed variables</p></dd> + + +<dt><code>unit</code></dt> +<dd><p>The unit of the observations</p></dd> + + +<dt><code>replicates</code></dt> +<dd><p>The maximum number of replicates per sampling time</p></dd> + + +<dt><code>data</code></dt> +<dd><p>A data frame with at least the columns name, time +and value in order to be compatible with mkinfit</p></dd> + + +</dl><p></p></div> + </div> + <div class="section level2"> + <h2 id="methods">Methods<a class="anchor" aria-label="anchor" href="#methods"></a></h2> + +<div class="section"> +<h3 id="public-methods">Public methods<a class="anchor" aria-label="anchor" href="#public-methods"></a></h3> + +<ul><li><p><a href="#method-mkinds-new"><code>mkinds$new()</code></a></p></li> +<li><p><a href="#method-mkinds-clone"><code>mkinds$clone()</code></a></p></li> +</ul></div><p></p><hr><a id="method-mkinds-new"></a><div class="section"> +<h3 id="method-new-">Method <code>new()</code><a class="anchor" aria-label="anchor" href="#method-new-"></a></h3> +<p>Create a new mkinds object</p><div class="section"> +<h4 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a></h4> +<p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va"><a href="../reference/mkinds.html">mkinds</a></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></span></code></pre></div><p></p></div> +</div> + +<div class="section"> +<h4 id="arguments-1">Arguments<a class="anchor" aria-label="anchor" href="#arguments-1"></a></h4> +<p></p><div class="arguments"><dl><dt><code>title</code></dt> +<dd><p>The dataset title</p></dd> + + +<dt><code>data</code></dt> +<dd><p>The data</p></dd> + + +<dt><code>time_unit</code></dt> +<dd><p>The time unit</p></dd> + + +<dt><code>unit</code></dt> +<dd><p>The unit of the observations</p></dd> + + +</dl><p></p></div> +</div> + +</div><p></p><hr><a id="method-mkinds-clone"></a><div class="section"> +<h3 id="method-clone-">Method <code>clone()</code><a class="anchor" aria-label="anchor" href="#method-clone-"></a></h3> +<p>The objects of this class are cloneable with this method.</p><div class="section"> +<h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> +<p></p><div class="r"><div class="sourceCode"><pre><code><span><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></span></code></pre></div><p></p></div> +</div> + +<div class="section"> +<h4 id="arguments-2">Arguments<a class="anchor" aria-label="anchor" href="#arguments-2"></a></h4> +<p></p><div class="arguments"><dl><dt><code>deep</code></dt> +<dd><p>Whether to make a deep clone.</p></dd> + + +</dl><p></p></div> +</div> + +</div> + + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">mds</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: FOCUS A </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 3, 7, 14, 30, 62, 90, 118 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 1 replicates</span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkindsg.html b/docs/dev/reference/mkindsg.html new file mode 100644 index 00000000..fec3f4be --- /dev/null +++ b/docs/dev/reference/mkindsg.html @@ -0,0 +1,407 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>A class for dataset groups for mkin — mkindsg • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="A class for dataset groups for mkin — mkindsg"><meta name="description" content="A container for working with datasets that share at least one compound, +so that combined evaluations are desirable. +Time normalisation factors are initialised with a value of 1 for each +dataset if no data are supplied."><meta property="og:description" content="A container for working with datasets that share at least one compound, +so that combined evaluations are desirable. +Time normalisation factors are initialised with a value of 1 for each +dataset if no data are supplied."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>A class for dataset groups for mkin</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkinds.R" class="external-link"><code>R/mkinds.R</code></a></small> + <div class="d-none name"><code>mkindsg.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>A container for working with datasets that share at least one compound, +so that combined evaluations are desirable.</p> +<p>Time normalisation factors are initialised with a value of 1 for each +dataset if no data are supplied.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkindsg'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, data <span class="op">=</span> <span class="cn">FALSE</span>, verbose <span class="op">=</span> <span class="va">data</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An mkindsg object.</p></dd> + + +<dt id="arg-data">data<a class="anchor" aria-label="anchor" href="#arg-data"></a></dt> +<dd><p>Should the mkinds objects be printed with their data?</p></dd> + + +<dt id="arg-verbose">verbose<a class="anchor" aria-label="anchor" href="#arg-verbose"></a></dt> +<dd><p>Should the mkinds objects be printed?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="public-fields">Public fields<a class="anchor" aria-label="anchor" href="#public-fields"></a></h2> + <p></p><div class="r6-fields"><dl><dt><code>title</code></dt> +<dd><p>A title for the dataset group</p></dd> + + +<dt><code>ds</code></dt> +<dd><p>A list of mkinds objects</p></dd> + + +<dt><code>observed_n</code></dt> +<dd><p>Occurrence counts of compounds in datasets</p></dd> + + +<dt><code>f_time_norm</code></dt> +<dd><p>Time normalisation factors</p></dd> + + +<dt><code>meta</code></dt> +<dd><p>A data frame with a row for each dataset, +containing additional information in the form +of categorical data (factors) or numerical data +(e.g. temperature, moisture, +or covariates like soil pH).</p></dd> + + +</dl><p></p></div> + </div> + <div class="section level2"> + <h2 id="methods">Methods<a class="anchor" aria-label="anchor" href="#methods"></a></h2> + +<div class="section"> +<h3 id="public-methods">Public methods<a class="anchor" aria-label="anchor" href="#public-methods"></a></h3> + +<ul><li><p><a href="#method-mkindsg-new"><code>mkindsg$new()</code></a></p></li> +<li><p><a href="#method-mkindsg-clone"><code>mkindsg$clone()</code></a></p></li> +</ul></div><p></p><hr><a id="method-mkindsg-new"></a><div class="section"> +<h3 id="method-new-">Method <code>new()</code><a class="anchor" aria-label="anchor" href="#method-new-"></a></h3> +<p>Create a new mkindsg object</p><div class="section"> +<h4 id="usage">Usage<a class="anchor" aria-label="anchor" href="#usage"></a></h4> +<p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va"><a href="../reference/mkindsg.html">mkindsg</a></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">ds</span>, f_time_norm <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span><span class="op">)</span>, <span class="va">meta</span><span class="op">)</span></span></code></pre></div><p></p></div> +</div> + +<div class="section"> +<h4 id="arguments-1">Arguments<a class="anchor" aria-label="anchor" href="#arguments-1"></a></h4> +<p></p><div class="arguments"><dl><dt><code>title</code></dt> +<dd><p>The title</p></dd> + + +<dt><code>ds</code></dt> +<dd><p>A list of mkinds objects</p></dd> + + +<dt><code>f_time_norm</code></dt> +<dd><p>Time normalisation factors</p></dd> + + +<dt><code>meta</code></dt> +<dd><p>The meta data</p></dd> + + +</dl><p></p></div> +</div> + +</div><p></p><hr><a id="method-mkindsg-clone"></a><div class="section"> +<h3 id="method-clone-">Method <code>clone()</code><a class="anchor" aria-label="anchor" href="#method-clone-"></a></h3> +<p>The objects of this class are cloneable with this method.</p><div class="section"> +<h4 id="usage-1">Usage<a class="anchor" aria-label="anchor" href="#usage-1"></a></h4> +<p></p><div class="r"><div class="sourceCode"><pre><code><span><span class="va">mkindsg</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></span></code></pre></div><p></p></div> +</div> + +<div class="section"> +<h4 id="arguments-2">Arguments<a class="anchor" aria-label="anchor" href="#arguments-2"></a></h4> +<p></p><div class="arguments"><dl><dt><code>deep</code></dt> +<dd><p>Whether to make a deep clone.</p></dd> + + +</dl><p></p></div> +</div> + +</div> + + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">mdsg</span> <span class="op"><-</span> <span class="va">mkindsg</span><span class="op">$</span><span class="fu">new</span><span class="op">(</span><span class="st">"Experimental X"</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="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">mdsg</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkindsg> holding 5 mkinds objects</span> +<span class="r-out co"><span class="r-pr">#></span> Title $title: Experimental X </span> +<span class="r-out co"><span class="r-pr">#></span> Occurrence of observed compounds $observed_n:</span> +<span class="r-out co"><span class="r-pr">#></span> parent A1 </span> +<span class="r-out co"><span class="r-pr">#></span> 5 5 </span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">mdsg</span>, verbose <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkindsg> holding 5 mkinds objects</span> +<span class="r-out co"><span class="r-pr">#></span> Title $title: Experimental X </span> +<span class="r-out co"><span class="r-pr">#></span> Occurrence of observed compounds $observed_n:</span> +<span class="r-out co"><span class="r-pr">#></span> parent A1 </span> +<span class="r-out co"><span class="r-pr">#></span> 5 5 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Datasets $ds:</span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 6 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 3, 6, 10, 20, 34, 55, 90, 112, 132 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 7 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 3, 7, 14, 30, 60, 90, 120, 180 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 8 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 1, 3, 8, 14, 27, 48, 70 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 9 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 1, 3, 8, 14, 27, 48, 70, 91, 120 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 10 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 8, 14, 21, 41, 63, 91, 120 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">mdsg</span>, verbose <span class="op">=</span> <span class="cn">TRUE</span>, data <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkindsg> holding 5 mkinds objects</span> +<span class="r-out co"><span class="r-pr">#></span> Title $title: Experimental X </span> +<span class="r-out co"><span class="r-pr">#></span> Occurrence of observed compounds $observed_n:</span> +<span class="r-out co"><span class="r-pr">#></span> parent A1 </span> +<span class="r-out co"><span class="r-pr">#></span> 5 5 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Datasets $ds:</span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 6 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 3, 6, 10, 20, 34, 55, 90, 112, 132 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> time parent A1</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0 97.2 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 2 0 96.4 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 3 3 71.1 4.3</span> +<span class="r-out co"><span class="r-pr">#></span> 4 3 69.2 4.6</span> +<span class="r-out co"><span class="r-pr">#></span> 5 6 58.1 7.0</span> +<span class="r-out co"><span class="r-pr">#></span> 6 6 56.6 7.2</span> +<span class="r-out co"><span class="r-pr">#></span> 7 10 44.4 8.2</span> +<span class="r-out co"><span class="r-pr">#></span> 8 10 43.4 8.0</span> +<span class="r-out co"><span class="r-pr">#></span> 9 20 33.3 11.0</span> +<span class="r-out co"><span class="r-pr">#></span> 10 20 29.2 13.7</span> +<span class="r-out co"><span class="r-pr">#></span> 11 34 17.6 11.5</span> +<span class="r-out co"><span class="r-pr">#></span> 12 34 18.0 12.7</span> +<span class="r-out co"><span class="r-pr">#></span> 13 55 10.5 14.9</span> +<span class="r-out co"><span class="r-pr">#></span> 14 55 9.3 14.5</span> +<span class="r-out co"><span class="r-pr">#></span> 15 90 4.5 12.1</span> +<span class="r-out co"><span class="r-pr">#></span> 16 90 4.7 12.3</span> +<span class="r-out co"><span class="r-pr">#></span> 17 112 3.0 9.9</span> +<span class="r-out co"><span class="r-pr">#></span> 18 112 3.4 10.2</span> +<span class="r-out co"><span class="r-pr">#></span> 19 132 2.3 8.8</span> +<span class="r-out co"><span class="r-pr">#></span> 20 132 2.7 7.8</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 7 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 3, 7, 14, 30, 60, 90, 120, 180 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> time parent A1</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0 93.6 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 2 0 92.3 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 3 3 87.0 3.9</span> +<span class="r-out co"><span class="r-pr">#></span> 4 3 82.2 3.1</span> +<span class="r-out co"><span class="r-pr">#></span> 5 7 74.0 6.9</span> +<span class="r-out co"><span class="r-pr">#></span> 6 7 73.9 6.6</span> +<span class="r-out co"><span class="r-pr">#></span> 7 14 64.2 10.4</span> +<span class="r-out co"><span class="r-pr">#></span> 8 14 69.5 8.3</span> +<span class="r-out co"><span class="r-pr">#></span> 9 30 54.0 14.4</span> +<span class="r-out co"><span class="r-pr">#></span> 10 30 54.6 13.7</span> +<span class="r-out co"><span class="r-pr">#></span> 11 60 41.1 22.1</span> +<span class="r-out co"><span class="r-pr">#></span> 12 60 38.4 22.3</span> +<span class="r-out co"><span class="r-pr">#></span> 13 90 32.5 27.5</span> +<span class="r-out co"><span class="r-pr">#></span> 14 90 35.5 25.4</span> +<span class="r-out co"><span class="r-pr">#></span> 15 120 28.1 28.0</span> +<span class="r-out co"><span class="r-pr">#></span> 16 120 29.0 26.6</span> +<span class="r-out co"><span class="r-pr">#></span> 17 180 26.5 25.8</span> +<span class="r-out co"><span class="r-pr">#></span> 18 180 27.6 25.3</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 8 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 1, 3, 8, 14, 27, 48, 70 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> time parent A1</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0 91.9 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 2 0 90.8 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 3 1 64.9 9.6</span> +<span class="r-out co"><span class="r-pr">#></span> 4 1 66.2 7.7</span> +<span class="r-out co"><span class="r-pr">#></span> 5 3 43.5 15.0</span> +<span class="r-out co"><span class="r-pr">#></span> 6 3 44.1 15.1</span> +<span class="r-out co"><span class="r-pr">#></span> 7 8 18.3 21.2</span> +<span class="r-out co"><span class="r-pr">#></span> 8 8 18.1 21.1</span> +<span class="r-out co"><span class="r-pr">#></span> 9 14 10.2 19.7</span> +<span class="r-out co"><span class="r-pr">#></span> 10 14 10.8 18.9</span> +<span class="r-out co"><span class="r-pr">#></span> 11 27 4.9 17.5</span> +<span class="r-out co"><span class="r-pr">#></span> 12 27 3.3 15.9</span> +<span class="r-out co"><span class="r-pr">#></span> 13 48 1.6 9.5</span> +<span class="r-out co"><span class="r-pr">#></span> 14 48 1.5 9.8</span> +<span class="r-out co"><span class="r-pr">#></span> 15 70 1.1 6.2</span> +<span class="r-out co"><span class="r-pr">#></span> 16 70 0.9 6.1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 9 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 1, 3, 8, 14, 27, 48, 70, 91, 120 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> time parent A1</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0 99.8 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 2 0 98.3 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 3 1 77.1 4.2</span> +<span class="r-out co"><span class="r-pr">#></span> 4 1 77.2 3.9</span> +<span class="r-out co"><span class="r-pr">#></span> 5 3 59.0 7.4</span> +<span class="r-out co"><span class="r-pr">#></span> 6 3 58.1 7.9</span> +<span class="r-out co"><span class="r-pr">#></span> 7 8 27.4 14.5</span> +<span class="r-out co"><span class="r-pr">#></span> 8 8 29.2 13.7</span> +<span class="r-out co"><span class="r-pr">#></span> 9 14 19.1 14.2</span> +<span class="r-out co"><span class="r-pr">#></span> 10 14 29.6 12.2</span> +<span class="r-out co"><span class="r-pr">#></span> 11 27 10.1 13.7</span> +<span class="r-out co"><span class="r-pr">#></span> 12 27 18.2 13.2</span> +<span class="r-out co"><span class="r-pr">#></span> 13 48 4.5 13.6</span> +<span class="r-out co"><span class="r-pr">#></span> 14 48 9.1 15.4</span> +<span class="r-out co"><span class="r-pr">#></span> 15 70 2.3 10.4</span> +<span class="r-out co"><span class="r-pr">#></span> 16 70 2.9 11.6</span> +<span class="r-out co"><span class="r-pr">#></span> 17 91 2.0 10.0</span> +<span class="r-out co"><span class="r-pr">#></span> 18 91 1.8 9.5</span> +<span class="r-out co"><span class="r-pr">#></span> 19 120 2.0 9.1</span> +<span class="r-out co"><span class="r-pr">#></span> 20 120 2.2 9.0</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> <mkinds> with $title: Soil 10 </span> +<span class="r-out co"><span class="r-pr">#></span> Observed compounds $observed: parent, A1 </span> +<span class="r-out co"><span class="r-pr">#></span> Sampling times $sampling_times:</span> +<span class="r-out co"><span class="r-pr">#></span> 0, 8, 14, 21, 41, 63, 91, 120 </span> +<span class="r-out co"><span class="r-pr">#></span> With a maximum of 2 replicates</span> +<span class="r-out co"><span class="r-pr">#></span> Time unit: days </span> +<span class="r-out co"><span class="r-pr">#></span> Observation unit: \%AR </span> +<span class="r-out co"><span class="r-pr">#></span> time parent A1</span> +<span class="r-out co"><span class="r-pr">#></span> 1 0 96.1 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 2 0 94.3 NA</span> +<span class="r-out co"><span class="r-pr">#></span> 3 8 73.9 3.3</span> +<span class="r-out co"><span class="r-pr">#></span> 4 8 73.9 3.4</span> +<span class="r-out co"><span class="r-pr">#></span> 5 14 69.4 3.9</span> +<span class="r-out co"><span class="r-pr">#></span> 6 14 73.1 2.9</span> +<span class="r-out co"><span class="r-pr">#></span> 7 21 65.6 6.4</span> +<span class="r-out co"><span class="r-pr">#></span> 8 21 65.3 7.2</span> +<span class="r-out co"><span class="r-pr">#></span> 9 41 55.9 9.1</span> +<span class="r-out co"><span class="r-pr">#></span> 10 41 54.4 8.5</span> +<span class="r-out co"><span class="r-pr">#></span> 11 63 47.0 11.7</span> +<span class="r-out co"><span class="r-pr">#></span> 12 63 49.3 12.0</span> +<span class="r-out co"><span class="r-pr">#></span> 13 91 44.7 13.3</span> +<span class="r-out co"><span class="r-pr">#></span> 14 91 46.7 13.2</span> +<span class="r-out co"><span class="r-pr">#></span> 15 120 42.1 14.3</span> +<span class="r-out co"><span class="r-pr">#></span> 16 120 41.3 12.1</span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinerrmin.html b/docs/dev/reference/mkinerrmin.html new file mode 100644 index 00000000..14e4e187 --- /dev/null +++ b/docs/dev/reference/mkinerrmin.html @@ -0,0 +1,163 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Calculate the minimum error to assume in order to pass the variance test — mkinerrmin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate the minimum error to assume in order to pass the variance test — mkinerrmin"><meta name="description" content="This function finds the smallest relative error still resulting in passing +the chi-squared test as defined in the FOCUS kinetics report from 2006."><meta property="og:description" content="This function finds the smallest relative error still resulting in passing +the chi-squared test as defined in the FOCUS kinetics report from 2006."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Calculate the minimum error to assume in order to pass the variance test</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkinerrmin.R" class="external-link"><code>R/mkinerrmin.R</code></a></small> + <div class="d-none name"><code>mkinerrmin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function finds the smallest relative error still resulting in passing +the chi-squared test as defined in the FOCUS kinetics report from 2006.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinerrmin</span><span class="op">(</span><span class="va">fit</span>, alpha <span class="op">=</span> <span class="fl">0.05</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-fit">fit<a class="anchor" aria-label="anchor" href="#arg-fit"></a></dt> +<dd><p>an object of class <code><a href="mkinfit.html">mkinfit</a></code>.</p></dd> + + +<dt id="arg-alpha">alpha<a class="anchor" aria-label="anchor" href="#arg-alpha"></a></dt> +<dd><p>The confidence level chosen for the chi-squared test.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A dataframe with the following components:</p> +<dl><dt>err.min</dt> +<dd><p>The +relative error, expressed as a fraction.</p></dd> + <dt>n.optim</dt> +<dd><p>The number of +optimised parameters attributed to the data series.</p></dd> + <dt>df</dt> +<dd><p>The number of +remaining degrees of freedom for the chi2 error level calculations. Note +that mean values are used for the chi2 statistic and therefore every time +point with observed values in the series only counts one time.</p></dd> +</dl><p>The +dataframe has one row for the total dataset and one further row for each +observed state variable in the model.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>This function is used internally by <code><a href="summary.mkinfit.html">summary.mkinfit</a></code>.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><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="mkinmod.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>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> use_of_ff <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">fit_FOCUS_D</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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="fu">mkinerrmin</span><span class="op">(</span><span class="va">fit_FOCUS_D</span><span class="op">)</span>, <span class="fl">4</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> err.min n.optim df</span> +<span class="r-out co"><span class="r-pr">#></span> All data 0.0640 4 15</span> +<span class="r-out co"><span class="r-pr">#></span> parent 0.0646 2 7</span> +<span class="r-out co"><span class="r-pr">#></span> m1 0.0469 2 8</span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <span class="va">fit_FOCUS_E</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_E</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">round</a></span><span class="op">(</span><span class="fu">mkinerrmin</span><span class="op">(</span><span class="va">fit_FOCUS_E</span><span class="op">)</span>, <span class="fl">4</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> err.min n.optim df</span> +<span class="r-out co"><span class="r-pr">#></span> All data 0.1544 4 13</span> +<span class="r-out co"><span class="r-pr">#></span> parent 0.1659 2 7</span> +<span class="r-out co"><span class="r-pr">#></span> m1 0.1095 2 6</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinerrplot-1.png b/docs/dev/reference/mkinerrplot-1.png Binary files differnew file mode 100644 index 00000000..03a054c8 --- /dev/null +++ b/docs/dev/reference/mkinerrplot-1.png diff --git a/docs/dev/reference/mkinerrplot.html b/docs/dev/reference/mkinerrplot.html new file mode 100644 index 00000000..01adc052 --- /dev/null +++ b/docs/dev/reference/mkinerrplot.html @@ -0,0 +1,201 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Function to plot squared residuals and the error model for an mkin object — mkinerrplot • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to plot squared residuals and the error model for an mkin object — mkinerrplot"><meta name="description" content="This function plots the squared residuals for the specified subset of the +observed variables from an mkinfit object. In addition, one or more dashed +line(s) show the fitted error model. A combined plot of the fitted model +and this error model plot can be obtained with plot.mkinfit +using the argument show_errplot = TRUE."><meta property="og:description" content="This function plots the squared residuals for the specified subset of the +observed variables from an mkinfit object. In addition, one or more dashed +line(s) show the fitted error model. A combined plot of the fitted model +and this error model plot can be obtained with plot.mkinfit +using the argument show_errplot = TRUE."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/mkinerrplot.R" class="external-link"><code>R/mkinerrplot.R</code></a></small> + <div class="d-none name"><code>mkinerrplot.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function plots the squared residuals for the specified subset of the +observed variables from an mkinfit object. In addition, one or more dashed +line(s) show the fitted error model. A combined plot of the fitted model +and this error model plot can be obtained with <code><a href="plot.mkinfit.html">plot.mkinfit</a></code> +using the argument <code>show_errplot = TRUE</code>.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinerrplot</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> obs_vars <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">object</span><span class="op">$</span><span class="va">mkinmod</span><span class="op">$</span><span class="va">map</span><span class="op">)</span>,</span> +<span> xlim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">1.1</span> <span class="op">*</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">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>,</span> +<span> xlab <span class="op">=</span> <span class="st">"Predicted"</span>,</span> +<span> ylab <span class="op">=</span> <span class="st">"Squared residual"</span>,</span> +<span> maxy <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> legend <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> lpos <span class="op">=</span> <span class="st">"topright"</span>,</span> +<span> col_obs <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> pch_obs <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> frame <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>A fit represented in an <code><a href="mkinfit.html">mkinfit</a></code> object.</p></dd> + + +<dt id="arg-obs-vars">obs_vars<a class="anchor" aria-label="anchor" href="#arg-obs-vars"></a></dt> +<dd><p>A character vector of names of the observed variables for +which residuals should be plotted. Defaults to all observed variables in +the model</p></dd> + + +<dt id="arg-xlim">xlim<a class="anchor" aria-label="anchor" href="#arg-xlim"></a></dt> +<dd><p>plot range in x direction.</p></dd> + + +<dt id="arg-xlab">xlab<a class="anchor" aria-label="anchor" href="#arg-xlab"></a></dt> +<dd><p>Label for the x axis.</p></dd> + + +<dt id="arg-ylab">ylab<a class="anchor" aria-label="anchor" href="#arg-ylab"></a></dt> +<dd><p>Label for the y axis.</p></dd> + + +<dt id="arg-maxy">maxy<a class="anchor" aria-label="anchor" href="#arg-maxy"></a></dt> +<dd><p>Maximum value of the residuals. This is used for the scaling of +the y axis and defaults to "auto".</p></dd> + + +<dt id="arg-legend">legend<a class="anchor" aria-label="anchor" href="#arg-legend"></a></dt> +<dd><p>Should a legend be plotted?</p></dd> + + +<dt id="arg-lpos">lpos<a class="anchor" aria-label="anchor" href="#arg-lpos"></a></dt> +<dd><p>Where should the legend be placed? Default is "topright". Will +be passed on to <code><a href="https://rdrr.io/r/graphics/legend.html" class="external-link">legend</a></code>.</p></dd> + + +<dt id="arg-col-obs">col_obs<a class="anchor" aria-label="anchor" href="#arg-col-obs"></a></dt> +<dd><p>Colors for the observed variables.</p></dd> + + +<dt id="arg-pch-obs">pch_obs<a class="anchor" aria-label="anchor" href="#arg-pch-obs"></a></dt> +<dd><p>Symbols to be used for the observed variables.</p></dd> + + +<dt id="arg-frame">frame<a class="anchor" aria-label="anchor" href="#arg-frame"></a></dt> +<dd><p>Should a frame be drawn around the plots?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>further arguments passed to <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>Nothing is returned by this function, as it is called for its side +effect, namely to produce a plot.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <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> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="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="mkinmod.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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><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="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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span><span class="fu">mkinerrplot</span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mkinerrplot-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinfit-1.png b/docs/dev/reference/mkinfit-1.png Binary files differnew file mode 100644 index 00000000..77f6e65c --- /dev/null +++ b/docs/dev/reference/mkinfit-1.png diff --git a/docs/dev/reference/mkinfit.html b/docs/dev/reference/mkinfit.html new file mode 100644 index 00000000..1c84b9b2 --- /dev/null +++ b/docs/dev/reference/mkinfit.html @@ -0,0 +1,679 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Fit a kinetic model to data with one or more state variables — mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Fit a kinetic model to data with one or more state variables — mkinfit"><meta name="description" content="This function maximises the likelihood of the observed data using the Port +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(), 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."><meta property="og:description" content="This function maximises the likelihood of the observed data using the Port +algorithm stats::nlminb(), and the specified initial or fixed +parameters and starting values. In each step of the optimisation, the +kinetic model is solved using the function mkinpredict(), except +if an analytical solution is implemented, in which case the model is solved +using the degradation function in the mkinmod object. The +parameters of the selected error model are fitted simultaneously with the +degradation model parameters, as both of them are arguments of the +likelihood function."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/mkinfit.R" class="external-link"><code>R/mkinfit.R</code></a></small> + <div class="d-none name"><code>mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function maximises the likelihood of the observed data using the Port +algorithm <code><a href="https://rdrr.io/r/stats/nlminb.html" class="external-link">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>, 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> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinfit</span><span class="op">(</span></span> +<span> <span class="va">mkinmod</span>,</span> +<span> <span class="va">observed</span>,</span> +<span> parms.ini <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> state.ini <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> err.ini <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> fixed_parms <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> fixed_initials <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">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>,</span> +<span> from_max_mean <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> solution_type <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"auto"</span>, <span class="st">"analytical"</span>, <span class="st">"eigen"</span>, <span class="st">"deSolve"</span><span class="op">)</span>,</span> +<span> method.ode <span class="op">=</span> <span class="st">"lsoda"</span>,</span> +<span> use_compiled <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> control <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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>,</span> +<span> transform_rates <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> transform_fractions <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> quiet <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> atol <span class="op">=</span> <span class="fl">1e-08</span>,</span> +<span> rtol <span class="op">=</span> <span class="fl">1e-10</span>,</span> +<span> error_model <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"const"</span>, <span class="st">"obs"</span>, <span class="st">"tc"</span><span class="op">)</span>,</span> +<span> error_model_algorithm <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"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> +<span> <span class="st">"IRLS"</span>, <span class="st">"OLS"</span><span class="op">)</span>,</span> +<span> reweight.tol <span class="op">=</span> <span class="fl">1e-08</span>,</span> +<span> reweight.max.iter <span class="op">=</span> <span class="fl">10</span>,</span> +<span> trace_parms <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> test_residuals <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-mkinmod">mkinmod<a class="anchor" aria-label="anchor" href="#arg-mkinmod"></a></dt> +<dd><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 +highest value in <code>observed</code>.</p></dd> + + +<dt id="arg-observed">observed<a class="anchor" aria-label="anchor" href="#arg-observed"></a></dt> +<dd><p>A dataframe or an object coercible to a dataframe +(e.g. a <code>tibble</code>) with the observed data. The first column called +"name" must contain the name of the observed variable for each data point. +The second column must contain the times of observation, named "time". +The third column must be named "value" and contain the observed values. +Zero values in the "value" column will be removed, with a warning, in +order to avoid problems with fitting the two-component error model. This +is not expected to be a problem, because in general, values of zero are +not observed in degradation data, because there is a lower limit of +detection.</p></dd> + + +<dt id="arg-parms-ini">parms.ini<a class="anchor" aria-label="anchor" href="#arg-parms-ini"></a></dt> +<dd><p>A named vector of initial values for the parameters, +including parameters to be optimised and potentially also fixed parameters +as indicated by <code>fixed_parms</code>. If set to "auto", initial values for +rate constants are set to default values. Using parameter names that are +not in the model gives an error.</p> +<p>It is possible to only specify a subset of the parameters that the model +needs. You can use the parameter lists "bparms.ode" from a previously +fitted model, which contains the differential equation parameters from +this model. This works nicely if the models are nested. An example is +given below.</p></dd> + + +<dt id="arg-state-ini">state.ini<a class="anchor" aria-label="anchor" href="#arg-state-ini"></a></dt> +<dd><p>A named vector of initial values for the state variables of +the model. In case the observed variables are represented by more than one +model variable, the names will differ from the names of the observed +variables (see <code>map</code> component of <a href="mkinmod.html">mkinmod</a>). The default +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 +value is set to 100.</p></dd> + + +<dt id="arg-err-ini">err.ini<a class="anchor" aria-label="anchor" href="#arg-err-ini"></a></dt> +<dd><p>A named vector of initial values for the error model +parameters to be optimised. If set to "auto", initial values are set to +default values. Otherwise, inital values for all error model parameters +must be given.</p></dd> + + +<dt id="arg-fixed-parms">fixed_parms<a class="anchor" aria-label="anchor" href="#arg-fixed-parms"></a></dt> +<dd><p>The names of parameters that should not be optimised but +rather kept at the values specified in <code>parms.ini</code>. Alternatively, +a named numeric vector of parameters to be fixed, regardless of the values +in parms.ini.</p></dd> + + +<dt id="arg-fixed-initials">fixed_initials<a class="anchor" aria-label="anchor" href="#arg-fixed-initials"></a></dt> +<dd><p>The names of model variables for which the initial +state at time 0 should be excluded from the optimisation. Defaults to all +state variables except for the first one.</p></dd> + + +<dt id="arg-from-max-mean">from_max_mean<a class="anchor" aria-label="anchor" href="#arg-from-max-mean"></a></dt> +<dd><p>If this is set to TRUE, and the model has only one +observed variable, then data before the time of the maximum observed value +(after averaging for each sampling time) are discarded, and this time is +subtracted from all remaining time values, so the time of the maximum +observed mean value is the new time zero.</p></dd> + + +<dt id="arg-solution-type">solution_type<a class="anchor" aria-label="anchor" href="#arg-solution-type"></a></dt> +<dd><p>If set to "eigen", the solution of the system of +differential equations is based on the spectral decomposition of the +coefficient matrix in cases that this is possible. If set to "deSolve", a +numerical <a href="https://rdrr.io/pkg/deSolve/man/ode.html" class="external-link">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></dd> + + +<dt id="arg-method-ode">method.ode<a class="anchor" aria-label="anchor" href="#arg-method-ode"></a></dt> +<dd><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" class="external-link">deSolve::ode()</a></code> in case the solution type is "deSolve". The default +"lsoda" is performant, but sometimes fails to converge.</p></dd> + + +<dt id="arg-use-compiled">use_compiled<a class="anchor" aria-label="anchor" href="#arg-use-compiled"></a></dt> +<dd><p>If set to <code>FALSE</code>, no compiled version of the +<a href="mkinmod.html">mkinmod</a> model is used in the calls to <code><a href="mkinpredict.html">mkinpredict()</a></code> even if a compiled +version is present.</p></dd> + + +<dt id="arg-control">control<a class="anchor" aria-label="anchor" href="#arg-control"></a></dt> +<dd><p>A list of control arguments passed to <code><a href="https://rdrr.io/r/stats/nlminb.html" class="external-link">stats::nlminb()</a></code>.</p></dd> + + +<dt id="arg-transform-rates">transform_rates<a class="anchor" aria-label="anchor" href="#arg-transform-rates"></a></dt> +<dd><p>Boolean specifying if kinetic rate constants should +be transformed in the model specification used in the fitting for better +compliance with the assumption of normal distribution of the estimator. If +TRUE, also alpha and beta parameters of the FOMC model are +log-transformed, as well as k1 and k2 rate constants for the DFOP and HS +models and the break point tb of the HS model. If FALSE, zero is used as +a lower bound for the rates in the optimisation.</p></dd> + + +<dt id="arg-transform-fractions">transform_fractions<a class="anchor" aria-label="anchor" href="#arg-transform-fractions"></a></dt> +<dd><p>Boolean specifying if formation fractions +should be transformed in the model specification used in the 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 model is also transformed. Transformations +are described in <a href="transform_odeparms.html">transform_odeparms</a>.</p></dd> + + +<dt id="arg-quiet">quiet<a class="anchor" aria-label="anchor" href="#arg-quiet"></a></dt> +<dd><p>Suppress printing out the current value of the negative +log-likelihood after each improvement?</p></dd> + + +<dt id="arg-atol">atol<a class="anchor" aria-label="anchor" href="#arg-atol"></a></dt> +<dd><p>Absolute error tolerance, passed to <code><a href="https://rdrr.io/pkg/deSolve/man/ode.html" class="external-link">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" class="external-link">deSolve::lsoda()</a></code> +function which is used per default.</p></dd> + + +<dt id="arg-rtol">rtol<a class="anchor" aria-label="anchor" href="#arg-rtol"></a></dt> +<dd><p>Absolute error tolerance, passed to <code><a href="https://rdrr.io/pkg/deSolve/man/ode.html" class="external-link">deSolve::ode()</a></code>. Default +is 1e-10, much lower than in <code><a href="https://rdrr.io/pkg/deSolve/man/lsoda.html" class="external-link">deSolve::lsoda()</a></code>.</p></dd> + + +<dt id="arg-error-model">error_model<a class="anchor" aria-label="anchor" href="#arg-error-model"></a></dt> +<dd><p>If the error model is "const", a constant standard +deviation is assumed.</p> +<p>If the error model is "obs", each observed variable is assumed to have its +own variance.</p> +<p>If the error model is "tc" (two-component error model), a two component +error model similar to the one described by Rocke and Lorenzato (1995) is +used for setting up the likelihood function. Note that this model +deviates from the model by Rocke and Lorenzato, as their model implies +that the errors follow a lognormal distribution for large values, not a +normal distribution as assumed by this method.</p></dd> + + +<dt id="arg-error-model-algorithm">error_model_algorithm<a class="anchor" aria-label="anchor" href="#arg-error-model-algorithm"></a></dt> +<dd><p>If "auto", the selected algorithm depends on +the error model. If the error model is "const", unweighted nonlinear +least squares fitting ("OLS") is selected. If the error model is "obs", or +"tc", the "d_3" algorithm is selected.</p> +<p>The algorithm "d_3" will directly minimize the negative log-likelihood +and independently also use the three step algorithm described below. +The fit with the higher likelihood is returned.</p> +<p>The algorithm "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> +<p>The algorithm "threestep" starts with unweighted least squares, then +optimizes only the error model using the degradation model parameters +found, and then minimizes the negative log-likelihood with free +degradation and error model parameters.</p> +<p>The algorithm "fourstep" starts with unweighted least squares, then +optimizes only the error model using the degradation model parameters +found, then optimizes the degradation model again with fixed error model +parameters, and finally minimizes the negative log-likelihood with free +degradation and error model parameters.</p> +<p>The algorithm "IRLS" (Iteratively Reweighted Least Squares) starts with +unweighted least squares, and then iterates optimization of the error +model parameters and subsequent optimization of the degradation model +using those error model parameters, until the error model parameters +converge.</p></dd> + + +<dt id="arg-reweight-tol">reweight.tol<a class="anchor" aria-label="anchor" href="#arg-reweight-tol"></a></dt> +<dd><p>Tolerance for the convergence criterion calculated from +the error model parameters in IRLS fits.</p></dd> + + +<dt id="arg-reweight-max-iter">reweight.max.iter<a class="anchor" aria-label="anchor" href="#arg-reweight-max-iter"></a></dt> +<dd><p>Maximum number of iterations in IRLS fits.</p></dd> + + +<dt id="arg-trace-parms">trace_parms<a class="anchor" aria-label="anchor" href="#arg-trace-parms"></a></dt> +<dd><p>Should a trace of the parameter values be listed?</p></dd> + + +<dt id="arg-test-residuals">test_residuals<a class="anchor" aria-label="anchor" href="#arg-test-residuals"></a></dt> +<dd><p>Should the residuals be tested for normal distribution?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments that will be passed on to +<code><a href="https://rdrr.io/pkg/deSolve/man/ode.html" class="external-link">deSolve::ode()</a></code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A list with "mkinfit" in the class attribute.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>Per default, parameters in the kinetic models are internally transformed in +order to better satisfy the assumption of a normal distribution of their +estimators.</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>When using the "IORE" submodel for metabolites, fitting with +"transform_rates = TRUE" (the default) often leads to failures of the +numerical ODE solver. In this situation it may help to switch off the +internal rate transformation.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Rocke DM and Lorenzato S (1995) A two-component model +for measurement error in analytical chemistry. <em>Technometrics</em> 37(2), 176-184.</p> +<p>Ranke J and Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical +Degradation Data. <em>Environments</em> 6(12) 124 +<a href="https://doi.org/10.3390/environments6120124" class="external-link">doi:10.3390/environments6120124</a> +.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><a href="summary.mkinfit.html">summary.mkinfit</a>, <a href="plot.mkinfit.html">plot.mkinfit</a>, <a href="parms.html">parms</a> and <a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">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" class="external-link">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> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Use shorthand notation for parent only degradation</span></span></span> +<span class="r-in"><span><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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> mkin version used for fitting: 1.2.10 </span> +<span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.4.2 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of fit: Fri Feb 14 07:30:02 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of summary: Fri Feb 14 07:30:02 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type analytical </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted using 222 model solutions performed in 0.014 s</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error model: Constant variance </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error model algorithm: OLS </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for parameters to be optimised:</span> +<span class="r-out co"><span class="r-pr">#></span> value type</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 85.1 state</span> +<span class="r-out co"><span class="r-pr">#></span> alpha 1.0 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> beta 10.0 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for the transformed parameters actually optimised:</span> +<span class="r-out co"><span class="r-pr">#></span> value lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 85.100000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_alpha 0.000000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_beta 2.302585 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed parameter values:</span> +<span class="r-out co"><span class="r-pr">#></span> None</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Results:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 44.68652 45.47542 -18.34326</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Optimised, transformed parameters with symmetric confidence intervals:</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 85.87000 1.8070 81.23000 90.5200</span> +<span class="r-out co"><span class="r-pr">#></span> log_alpha 0.05192 0.1353 -0.29580 0.3996</span> +<span class="r-out co"><span class="r-pr">#></span> log_beta 0.65100 0.2287 0.06315 1.2390</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.85700 0.4378 0.73200 2.9830</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Parameter correlation:</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_alpha log_beta sigma</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.681e-08</span> +<span class="r-out co"><span class="r-pr">#></span> log_alpha -1.565e-01 1.000e+00 9.564e-01 1.013e-07</span> +<span class="r-out co"><span class="r-pr">#></span> log_beta -3.142e-01 9.564e-01 1.000e+00 8.637e-08</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 4.681e-08 1.013e-07 8.637e-08 1.000e+00</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> Confidence intervals for internally transformed parameters are asymmetric.</span> +<span class="r-out co"><span class="r-pr">#></span> t-test (unrealistically) based on the assumption of normal distribution</span> +<span class="r-out co"><span class="r-pr">#></span> for estimators of untransformed parameters.</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate t value Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 85.870 47.530 3.893e-08 81.2300 90.520</span> +<span class="r-out co"><span class="r-pr">#></span> alpha 1.053 7.393 3.562e-04 0.7439 1.491</span> +<span class="r-out co"><span class="r-pr">#></span> beta 1.917 4.373 3.601e-03 1.0650 3.451</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.857 4.243 4.074e-03 0.7320 2.983</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> FOCUS Chi2 error levels in percent:</span> +<span class="r-out co"><span class="r-pr">#></span> err.min n.optim df</span> +<span class="r-out co"><span class="r-pr">#></span> All data 6.657 3 6</span> +<span class="r-out co"><span class="r-pr">#></span> parent 6.657 3 6</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back</span> +<span class="r-out co"><span class="r-pr">#></span> parent 1.785 15.15 4.56</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> time variable observed predicted residual</span> +<span class="r-out co"><span class="r-pr">#></span> 0 parent 85.1 85.875 -0.7749</span> +<span class="r-out co"><span class="r-pr">#></span> 1 parent 57.9 55.191 2.7091</span> +<span class="r-out co"><span class="r-pr">#></span> 3 parent 29.9 31.845 -1.9452</span> +<span class="r-out co"><span class="r-pr">#></span> 7 parent 14.6 17.012 -2.4124</span> +<span class="r-out co"><span class="r-pr">#></span> 14 parent 9.7 9.241 0.4590</span> +<span class="r-out co"><span class="r-pr">#></span> 28 parent 6.6 4.754 1.8460</span> +<span class="r-out co"><span class="r-pr">#></span> 63 parent 4.0 2.102 1.8977</span> +<span class="r-out co"><span class="r-pr">#></span> 91 parent 3.9 1.441 2.4590</span> +<span class="r-out co"><span class="r-pr">#></span> 119 parent 0.6 1.092 -0.4919</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># One parent compound, one metabolite, both single first order.</span></span></span> +<span class="r-in"><span><span class="co"># We remove zero values from FOCUS dataset D in order to avoid warnings</span></span></span> +<span class="r-in"><span><span class="va">FOCUS_D</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">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></span> +<span class="r-in"><span><span class="co"># Use mkinsub for convenience in model formulation. Pathway to sink included per default.</span></span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Fit the model quietly to the FOCUS example dataset D using defaults</span></span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_sep</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mkinfit-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># As lower parent values appear to have lower variance, we try an alternative error model</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="co"># This avoids the warning, and the likelihood ratio test confirms it is preferable</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></span><span class="op">(</span><span class="va">fit.tc</span>, <span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: SFO_SFO with error model tc and fixed parameter(s) m1_0</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: SFO_SFO with error model const and fixed parameter(s) m1_0</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 6 -64.983 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 5 -97.224 -1 64.483 9.737e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="co"># We can also allow for different variances of parent and metabolite as error model</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="co"># The two-component error model has significantly higher likelihood</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></span><span class="op">(</span><span class="va">fit.obs</span>, <span class="va">fit.tc</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: SFO_SFO with error model tc and fixed parameter(s) m1_0</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: SFO_SFO with error model obs and fixed parameter(s) m1_0</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> 1 6 -64.983 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 6 -96.936 0 63.907 < 2.2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="fu"><a href="parms.html">parms</a></span><span class="op">(</span><span class="va">fit.tc</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 k_parent k_m1 f_parent_to_m1 sigma_low </span> +<span class="r-out co"><span class="r-pr">#></span> 1.007343e+02 1.005562e-01 5.166712e-03 5.083933e-01 3.049883e-03 </span> +<span class="r-out co"><span class="r-pr">#></span> rsd_high </span> +<span class="r-out co"><span class="r-pr">#></span> 7.928118e-02 </span> +<span class="r-in"><span><span class="fu"><a href="endpoints.html">endpoints</a></span><span class="op">(</span><span class="va">fit.tc</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_m1 parent_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 0.5083933 0.4916067 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> parent 6.89313 22.89848</span> +<span class="r-out co"><span class="r-pr">#></span> m1 134.15634 445.65771</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># We can show a quick (only one replication) benchmark for this case, as we</span></span></span> +<span class="r-in"><span><span class="co"># have several alternative solution methods for the model. We skip</span></span></span> +<span class="r-in"><span><span class="co"># uncompiled deSolve, as it is so slow. More benchmarks are found in the</span></span></span> +<span class="r-in"><span><span class="co"># benchmark vignette</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="kw">if</span><span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="va"><a href="http://rbenchmark.googlecode.com" class="external-link">rbenchmark</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> solution_type <span class="op">=</span> <span class="st">"eigen"</span><span class="op">)</span>,</span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> solution_type <span class="op">=</span> <span class="st">"analytical"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> test relative elapsed</span> +<span class="r-out co"><span class="r-pr">#></span> 3 analytical 1.000 0.242</span> +<span class="r-out co"><span class="r-pr">#></span> 2 eigen 1.913 0.463</span> +<span class="r-out co"><span class="r-pr">#></span> 1 deSolve_compiled 1.917 0.464</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Use stepwise fitting, using optimised parameters from parent only fit, FOMC-SFO</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">FOMC_SFO</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"FOMC"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><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><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># Again, we get a warning and try a more sophisticated error model</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="co"># This model has a higher likelihood, but not significantly so</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model 1: FOMC_SFO with error model tc and fixed parameter(s) m1_0</span> +<span class="r-out co"><span class="r-pr">#></span> Model 2: SFO_SFO with error model tc and fixed parameter(s) m1_0</span> +<span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq)</span> +<span class="r-out co"><span class="r-pr">#></span> 1 7 -64.829 </span> +<span class="r-out co"><span class="r-pr">#></span> 2 6 -64.983 -1 0.3075 0.5792</span> +<span class="r-in"><span><span class="co"># Also, the missing standard error for log_beta and the t-tests for alpha</span></span></span> +<span class="r-in"><span><span class="co"># and beta indicate overparameterisation</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit.FOMC_SFO.tc</span>, data <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>NaNs produced</span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>diag(V) had non-positive or NA entries; the non-finite result may be dubious</span> +<span class="r-out co"><span class="r-pr">#></span> mkin version used for fitting: 1.2.10 </span> +<span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.4.2 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of fit: Fri Feb 14 07:30:07 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of summary: Fri Feb 14 07:30:07 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_m1/dt = + f_parent_to_m1 * (alpha/beta) * 1/((time/beta) + 1) *</span> +<span class="r-out co"><span class="r-pr">#></span> parent - k_m1 * m1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type deSolve </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted using 4062 model solutions performed in 0.77 s</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error model: Two-component variance function </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error model algorithm: d_3 </span> +<span class="r-out co"><span class="r-pr">#></span> Direct fitting and three-step fitting yield approximately the same likelihood </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for parameters to be optimised:</span> +<span class="r-out co"><span class="r-pr">#></span> value type</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 100.75 state</span> +<span class="r-out co"><span class="r-pr">#></span> alpha 1.00 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> beta 10.00 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.10 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.50 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> sigma_low 0.10 error</span> +<span class="r-out co"><span class="r-pr">#></span> rsd_high 0.10 error</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for the transformed parameters actually optimised:</span> +<span class="r-out co"><span class="r-pr">#></span> value lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 100.750000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 -2.302585 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis 0.000000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_alpha 0.000000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_beta 2.302585 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> sigma_low 0.100000 0 Inf</span> +<span class="r-out co"><span class="r-pr">#></span> rsd_high 0.100000 0 Inf</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed parameter values:</span> +<span class="r-out co"><span class="r-pr">#></span> value type</span> +<span class="r-out co"><span class="r-pr">#></span> m1_0 0 state</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Results:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 143.658 155.1211 -64.82902</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Optimised, transformed parameters with symmetric confidence intervals:</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 101.600000 2.6400000 96.240000 107.000000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 -5.284000 0.0929100 -5.474000 -5.095000</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis 0.001426 0.0766900 -0.155000 0.157800</span> +<span class="r-out co"><span class="r-pr">#></span> log_alpha 5.522000 0.0077320 5.506000 5.538000</span> +<span class="r-out co"><span class="r-pr">#></span> log_beta 7.806000 NaN NaN NaN</span> +<span class="r-out co"><span class="r-pr">#></span> sigma_low 0.002488 0.0002431 0.001992 0.002984</span> +<span class="r-out co"><span class="r-pr">#></span> rsd_high 0.079210 0.0093280 0.060180 0.098230</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Parameter correlation:</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_m1 f_parent_qlogis log_alpha log_beta</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 1.000000 -0.095161 -0.76675 0.70542 NaN</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 -0.095161 1.000000 0.51429 -0.14382 NaN</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.766750 0.514286 1.00000 -0.61393 NaN</span> +<span class="r-out co"><span class="r-pr">#></span> log_alpha 0.705417 -0.143821 -0.61393 1.00000 NaN</span> +<span class="r-out co"><span class="r-pr">#></span> log_beta NaN NaN NaN NaN 1</span> +<span class="r-out co"><span class="r-pr">#></span> sigma_low 0.016086 0.001583 0.01547 5.87036 NaN</span> +<span class="r-out co"><span class="r-pr">#></span> rsd_high 0.006618 -0.011695 -0.05356 0.04848 NaN</span> +<span class="r-out co"><span class="r-pr">#></span> sigma_low rsd_high</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 0.016086 0.006618</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 0.001583 -0.011695</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis 0.015466 -0.053560</span> +<span class="r-out co"><span class="r-pr">#></span> log_alpha 5.870361 0.048483</span> +<span class="r-out co"><span class="r-pr">#></span> log_beta NaN NaN</span> +<span class="r-out co"><span class="r-pr">#></span> sigma_low 1.000000 -0.652545</span> +<span class="r-out co"><span class="r-pr">#></span> rsd_high -0.652545 1.000000</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> Confidence intervals for internally transformed parameters are asymmetric.</span> +<span class="r-out co"><span class="r-pr">#></span> t-test (unrealistically) based on the assumption of normal distribution</span> +<span class="r-out co"><span class="r-pr">#></span> for estimators of untransformed parameters.</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate t value Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 1.016e+02 32.7800 6.310e-26 9.624e+01 1.070e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 5.072e-03 10.1200 1.216e-11 4.196e-03 6.130e-03</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 5.004e-01 20.8300 4.316e-20 4.613e-01 5.394e-01</span> +<span class="r-out co"><span class="r-pr">#></span> alpha 2.502e+02 0.5624 2.889e-01 2.463e+02 2.542e+02</span> +<span class="r-out co"><span class="r-pr">#></span> beta 2.455e+03 0.5549 2.915e-01 NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> sigma_low 2.488e-03 0.4843 3.158e-01 1.992e-03 2.984e-03</span> +<span class="r-out co"><span class="r-pr">#></span> rsd_high 7.921e-02 8.4300 8.001e-10 6.018e-02 9.823e-02</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> FOCUS Chi2 error levels in percent:</span> +<span class="r-out co"><span class="r-pr">#></span> err.min n.optim df</span> +<span class="r-out co"><span class="r-pr">#></span> All data 6.781 5 14</span> +<span class="r-out co"><span class="r-pr">#></span> parent 7.141 3 6</span> +<span class="r-out co"><span class="r-pr">#></span> m1 4.640 2 8</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Resulting formation fractions:</span> +<span class="r-out co"><span class="r-pr">#></span> ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_m1 0.5004</span> +<span class="r-out co"><span class="r-pr">#></span> parent_sink 0.4996</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back</span> +<span class="r-out co"><span class="r-pr">#></span> parent 6.812 22.7 6.834</span> +<span class="r-out co"><span class="r-pr">#></span> m1 136.661 454.0 NA</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># We can easily use starting parameters from the parent only fit (only for illustration)</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinmod.html b/docs/dev/reference/mkinmod.html new file mode 100644 index 00000000..d26086eb --- /dev/null +++ b/docs/dev/reference/mkinmod.html @@ -0,0 +1,382 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Function to set up a kinetic model with one or more state variables — mkinmod • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to set up a kinetic model with one or more state variables — mkinmod"><meta name="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). +Print mkinmod objects in a way that the user finds his way to get to its +components."><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). +Print mkinmod objects in a way that the user finds his way to get to its +components."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/mkinmod.R" class="external-link"><code>R/mkinmod.R</code></a>, <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkinsub.R" class="external-link"><code>R/mkinsub.R</code></a></small> + <div class="d-none name"><code>mkinmod.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function is usually called using a call to <code>mkinsub()</code> for each observed +variable, specifying the corresponding submodel as well as outgoing pathways +(see examples).</p> +<p>Print mkinmod objects in a way that the user finds his way to get to its +components.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinmod</span><span class="op">(</span></span> +<span> <span class="va">...</span>,</span> +<span> use_of_ff <span class="op">=</span> <span class="st">"max"</span>,</span> +<span> name <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> speclist <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> quiet <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> dll_dir <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> unload <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> overwrite <span class="op">=</span> <span class="cn">FALSE</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mkinmod'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>For each observed variable, a list as obtained by <code>mkinsub()</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>mkinsub()</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" +and the model for the compartment is "SFO" or "SFORB", an +additional <code>mkinsub()</code> argument can be <code>sink = FALSE</code>, effectively +fixing the flux to sink to zero. +In print.mkinmod, this argument is currently not used.</p></dd> + + +<dt id="arg-use-of-ff">use_of_ff<a class="anchor" aria-label="anchor" href="#arg-use-of-ff"></a></dt> +<dd><p>Specification of the use of formation fractions in the +model equations and, if applicable, the coefficient matrix. If "max", +formation fractions are always used (default). If "min", a minimum use of +formation fractions is made, i.e. each first-order pathway to a metabolite +has its own rate constant.</p></dd> + + +<dt id="arg-name">name<a class="anchor" aria-label="anchor" href="#arg-name"></a></dt> +<dd><p>A name for the model. Should be a valid R object name.</p></dd> + + +<dt id="arg-speclist">speclist<a class="anchor" aria-label="anchor" href="#arg-speclist"></a></dt> +<dd><p>The specification of the observed variables and their +submodel types and pathways can be given as a single list using this +argument. Default is NULL.</p></dd> + + +<dt id="arg-quiet">quiet<a class="anchor" aria-label="anchor" href="#arg-quiet"></a></dt> +<dd><p>Should messages be suppressed?</p></dd> + + +<dt id="arg-verbose">verbose<a class="anchor" aria-label="anchor" href="#arg-verbose"></a></dt> +<dd><p>If <code>TRUE</code>, passed to <code><a href="https://rdrr.io/pkg/inline/man/cfunction.html" class="external-link">inline::cfunction()</a></code> if +applicable to give detailed information about the C function being built.</p></dd> + + +<dt id="arg-dll-dir">dll_dir<a class="anchor" aria-label="anchor" href="#arg-dll-dir"></a></dt> +<dd><p>Directory where an DLL object, if generated internally by +<code><a href="https://rdrr.io/pkg/inline/man/cfunction.html" class="external-link">inline::cfunction()</a></code>, should be saved. The DLL will only be stored in a +permanent location for use in future sessions, if 'dll_dir' and 'name' +are specified. This is helpful if fit objects are cached e.g. by knitr, +as the cache remains functional across sessions if the DLL is stored in +a user defined location.</p></dd> + + +<dt id="arg-unload">unload<a class="anchor" aria-label="anchor" href="#arg-unload"></a></dt> +<dd><p>If a DLL from the target location in 'dll_dir' is already +loaded, should that be unloaded first?</p></dd> + + +<dt id="arg-overwrite">overwrite<a class="anchor" aria-label="anchor" href="#arg-overwrite"></a></dt> +<dd><p>If a file exists at the target DLL location in 'dll_dir', +should this be overwritten?</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An <code>mkinmod</code> object.</p></dd> + + +<dt id="arg-submodel">submodel<a class="anchor" aria-label="anchor" href="#arg-submodel"></a></dt> +<dd><p>Character vector of length one to specify the submodel type. +See <code>mkinmod</code> for the list of allowed submodel names.</p></dd> + + +<dt id="arg-to">to<a class="anchor" aria-label="anchor" href="#arg-to"></a></dt> +<dd><p>Vector of the names of the state variable to which a +transformation shall be included in the model.</p></dd> + + +<dt id="arg-sink">sink<a class="anchor" aria-label="anchor" href="#arg-sink"></a></dt> +<dd><p>Should a pathway to sink be included in the model in addition to +the pathways to other state variables?</p></dd> + + +<dt id="arg-full-name">full_name<a class="anchor" aria-label="anchor" href="#arg-full-name"></a></dt> +<dd><p>An optional name to be used e.g. for plotting fits +performed with the model. You can use non-ASCII characters here, but then +your R code will not be portable, <em>i.e.</em> may produce unintended plot +results on other operating systems or system configurations.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A list of class <code>mkinmod</code> for use with <code><a href="mkinfit.html">mkinfit()</a></code>, +containing, among others,</p> +<dl><dt>diffs</dt> +<dd><p>A vector of string representations of differential equations, one for +each modelling variable.</p></dd> + +<dt>map</dt> +<dd><p>A list containing named character vectors for each observed variable, +specifying the modelling variables by which it is represented.</p></dd> + +<dt>use_of_ff</dt> +<dd><p>The content of <code>use_of_ff</code> is passed on in this list component.</p></dd> + +<dt>deg_func</dt> +<dd><p>If generated, a function containing the solution of the degradation +model.</p></dd> + +<dt>coefmat</dt> +<dd><p>The coefficient matrix, if the system of differential equations can be +represented by one.</p></dd> + +<dt>cf</dt> +<dd><p>If generated, a compiled function calculating the derivatives as +returned by cfunction.</p></dd> + + +</dl><p>A list for use with <code>mkinmod</code>.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <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://pkgbuild.r-lib.org/reference/has_compiler.html" class="external-link">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" class="external-link">inline::cfunction()</a></code> and added to the resulting mkinmod object.</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>The IORE submodel is not well tested for metabolites. When using this +model for metabolites, you may want to read the note in the help +page to <a href="mkinfit.html">mkinfit</a>.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">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> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Specify the SFO model (this is not needed any more, as we can now mkinfit("SFO", ...)</span></span></span> +<span class="r-in"><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">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># One parent compound, one metabolite, both single first order</span></span></span> +<span class="r-in"><span><span class="va">SFO_SFO</span> <span class="op"><-</span> <span class="fu">mkinmod</span><span class="op">(</span></span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">SFO_SFO</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mkinmod> model generated with</span> +<span class="r-out co"><span class="r-pr">#></span> Use of formation fractions $use_of_ff: max </span> +<span class="r-out co"><span class="r-pr">#></span> Specification $spec:</span> +<span class="r-out co"><span class="r-pr">#></span> $parent</span> +<span class="r-out co"><span class="r-pr">#></span> $type: SFO; $to: m1; $sink: TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> $m1</span> +<span class="r-out co"><span class="r-pr">#></span> $type: SFO; $sink: TRUE</span> +<span class="r-out co"><span class="r-pr">#></span> Coefficient matrix $coefmat available</span> +<span class="r-out co"><span class="r-pr">#></span> Compiled model $cf available</span> +<span class="r-out co"><span class="r-pr">#></span> Differential equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - k_parent * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <span class="va">fit_sfo_sfo</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>, solution_type <span class="op">=</span> <span class="st">"deSolve"</span><span class="op">)</span></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># Now supplying compound names used for plotting, and write to user defined location</span></span></span> +<span class="r-in"><span> <span class="co"># We need to choose a path outside the session tempdir because this gets removed</span></span></span> +<span class="r-in"><span> <span class="va">DLL_dir</span> <span class="op"><-</span> <span class="st">"~/.local/share/mkin"</span></span></span> +<span class="r-in"><span> <span class="kw">if</span> <span class="op">(</span><span class="op">!</span><span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.exists</a></span><span class="op">(</span><span class="va">DLL_dir</span><span class="op">)</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/files2.html" class="external-link">dir.create</a></span><span class="op">(</span><span class="va">DLL_dir</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">SFO_SFO.2</span> <span class="op"><-</span> <span class="fu">mkinmod</span><span class="op">(</span></span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> name <span class="op">=</span> <span class="st">"SFO_SFO"</span>, dll_dir <span class="op">=</span> <span class="va">DLL_dir</span>, unload <span class="op">=</span> <span class="cn">TRUE</span>, overwrite <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-msg co"><span class="r-pr">#></span> Copied DLL from /tmp/RtmpSeNGYy/file226312370605e2.so to /home/jranke/.local/share/mkin/SFO_SFO.so</span> +<span class="r-in"><span><span class="co"># Now we can save the model and restore it in a new session</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">saveRDS</a></span><span class="op">(</span><span class="va">SFO_SFO.2</span>, file <span class="op">=</span> <span class="st">"~/SFO_SFO.rds"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># Terminate the R session here if you would like to check, and then do</span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/mkin/">mkin</a></span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">SFO_SFO.3</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/readRDS.html" class="external-link">readRDS</a></span><span class="op">(</span><span class="st">"~/SFO_SFO.rds"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">fit_sfo_sfo</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">SFO_SFO.3</span>, <span class="va">FOCUS_2006_D</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></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Show details of creating the C function</span></span></span> +<span class="r-in"><span><span class="va">SFO_SFO</span> <span class="op"><-</span> <span class="fu">mkinmod</span><span class="op">(</span></span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu">mkinsub</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></span></span> +<span class="r-out co"><span class="r-pr">#></span> Program source:</span> +<span class="r-out co"><span class="r-pr">#></span> 1: #include <R.h></span> +<span class="r-out co"><span class="r-pr">#></span> 2: </span> +<span class="r-out co"><span class="r-pr">#></span> 3: </span> +<span class="r-out co"><span class="r-pr">#></span> 4: static double parms [3];</span> +<span class="r-out co"><span class="r-pr">#></span> 5: #define k_parent parms[0]</span> +<span class="r-out co"><span class="r-pr">#></span> 6: #define f_parent_to_m1 parms[1]</span> +<span class="r-out co"><span class="r-pr">#></span> 7: #define k_m1 parms[2]</span> +<span class="r-out co"><span class="r-pr">#></span> 8: </span> +<span class="r-out co"><span class="r-pr">#></span> 9: void initpar(void (* odeparms)(int *, double *)) {</span> +<span class="r-out co"><span class="r-pr">#></span> 10: int N = 3;</span> +<span class="r-out co"><span class="r-pr">#></span> 11: odeparms(&N, parms);</span> +<span class="r-out co"><span class="r-pr">#></span> 12: }</span> +<span class="r-out co"><span class="r-pr">#></span> 13: </span> +<span class="r-out co"><span class="r-pr">#></span> 14: </span> +<span class="r-out co"><span class="r-pr">#></span> 15: void diffs ( int * n, double * t, double * y, double * f, double * rpar, int * ipar ) {</span> +<span class="r-out co"><span class="r-pr">#></span> 16: </span> +<span class="r-out co"><span class="r-pr">#></span> 17: f[0] = - k_parent * y[0];</span> +<span class="r-out co"><span class="r-pr">#></span> 18: f[1] = + f_parent_to_m1 * k_parent * y[0] - k_m1 * y[1];</span> +<span class="r-out co"><span class="r-pr">#></span> 19: }</span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The symbolic solution which is available in this case is not</span></span></span> +<span class="r-in"><span><span class="co"># made for human reading but for speed of computation</span></span></span> +<span class="r-in"><span><span class="va">SFO_SFO</span><span class="op">$</span><span class="va">deg_func</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> function (observed, odeini, odeparms) </span> +<span class="r-out co"><span class="r-pr">#></span> {</span> +<span class="r-out co"><span class="r-pr">#></span> predicted <- numeric(0)</span> +<span class="r-out co"><span class="r-pr">#></span> with(as.list(odeparms), {</span> +<span class="r-out co"><span class="r-pr">#></span> t <- observed[observed$name == "parent", "time"]</span> +<span class="r-out co"><span class="r-pr">#></span> predicted <<- c(predicted, SFO.solution(t, odeini["parent"], </span> +<span class="r-out co"><span class="r-pr">#></span> k_parent))</span> +<span class="r-out co"><span class="r-pr">#></span> t <- observed[observed$name == "m1", "time"]</span> +<span class="r-out co"><span class="r-pr">#></span> predicted <<- c(predicted, (((k_m1 - k_parent) * odeini["m1"] - </span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 * k_parent * odeini["parent"]) * exp(-k_m1 * </span> +<span class="r-out co"><span class="r-pr">#></span> t) + f_parent_to_m1 * k_parent * odeini["parent"] * </span> +<span class="r-out co"><span class="r-pr">#></span> exp(-k_parent * t))/(k_m1 - k_parent))</span> +<span class="r-out co"><span class="r-pr">#></span> })</span> +<span class="r-out co"><span class="r-pr">#></span> return(predicted)</span> +<span class="r-out co"><span class="r-pr">#></span> }</span> +<span class="r-out co"><span class="r-pr">#></span> <environment: 0x5555577ec6d0></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># If we have several parallel metabolites</span></span></span> +<span class="r-in"><span><span class="co"># (compare tests/testthat/test_synthetic_data_for_UBA_2014.R)</span></span></span> +<span class="r-in"><span><span class="va">m_synth_DFOP_par</span> <span class="op"><-</span> <span class="fu">mkinmod</span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu">mkinsub</span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinparplot-1.png b/docs/dev/reference/mkinparplot-1.png Binary files differnew file mode 100644 index 00000000..8d34b451 --- /dev/null +++ b/docs/dev/reference/mkinparplot-1.png diff --git a/docs/dev/reference/mkinparplot.html b/docs/dev/reference/mkinparplot.html new file mode 100644 index 00000000..e3f85961 --- /dev/null +++ b/docs/dev/reference/mkinparplot.html @@ -0,0 +1,128 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Function to plot the confidence intervals obtained using mkinfit — mkinparplot • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to plot the confidence intervals obtained using mkinfit — mkinparplot"><meta name="description" content="This function plots the confidence intervals for the parameters fitted using +mkinfit."><meta property="og:description" content="This function plots the confidence intervals for the parameters fitted using +mkinfit."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Function to plot the confidence intervals obtained using mkinfit</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkinparplot.R" class="external-link"><code>R/mkinparplot.R</code></a></small> + <div class="d-none name"><code>mkinparplot.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function plots the confidence intervals for the parameters fitted using +<code><a href="mkinfit.html">mkinfit</a></code>.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinparplot</span><span class="op">(</span><span class="va">object</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>A fit represented in an <code><a href="mkinfit.html">mkinfit</a></code> object.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>Nothing is returned by this function, as it is called for its side +effect, namely to produce a plot.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">model</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> T245 <span class="op">=</span> <span class="fu"><a href="mkinmod.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" class="external-link">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>,</span></span> +<span class="r-in"><span> phenol <span class="op">=</span> <span class="fu"><a href="mkinmod.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" class="external-link">c</a></span><span class="op">(</span><span class="st">"anisole"</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> anisole <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, use_of_ff <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><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="va">model</span>, <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span><span class="fu">mkinparplot</span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mkinparplot-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinplot.html b/docs/dev/reference/mkinplot.html new file mode 100644 index 00000000..2505b060 --- /dev/null +++ b/docs/dev/reference/mkinplot.html @@ -0,0 +1,115 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot the observed data and the fitted model of an mkinfit object — mkinplot • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot the observed data and the fitted model of an mkinfit object — mkinplot"><meta name="description" content="Deprecated function. It now only calls the plot method +plot.mkinfit."><meta property="og:description" content="Deprecated function. It now only calls the plot method +plot.mkinfit."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/plot.mkinfit.R" class="external-link"><code>R/plot.mkinfit.R</code></a></small> + <div class="d-none name"><code>mkinplot.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Deprecated function. It now only calls the plot method +<code><a href="plot.mkinfit.html">plot.mkinfit</a></code>.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinplot</span><span class="op">(</span><span class="va">fit</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-fit">fit<a class="anchor" aria-label="anchor" href="#arg-fit"></a></dt> +<dd><p>an object of class <code><a href="mkinfit.html">mkinfit</a></code>.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>further arguments passed to <code><a href="plot.mkinfit.html">plot.mkinfit</a></code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The function is called for its side effect.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinpredict.html b/docs/dev/reference/mkinpredict.html new file mode 100644 index 00000000..e11dacdf --- /dev/null +++ b/docs/dev/reference/mkinpredict.html @@ -0,0 +1,390 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Produce predictions from a kinetic model using specific parameters — mkinpredict • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Produce predictions from a kinetic model using specific parameters — mkinpredict"><meta name="description" content="This function produces a time series for all the observed variables in a +kinetic model as specified by mkinmod, using a specific set of +kinetic parameters and initial values for the state variables."><meta property="og:description" content="This function produces a time series for all the observed variables in a +kinetic model as specified by mkinmod, using a specific set of +kinetic parameters and initial values for the state variables."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Produce predictions from a kinetic model using specific parameters</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkinpredict.R" class="external-link"><code>R/mkinpredict.R</code></a></small> + <div class="d-none name"><code>mkinpredict.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function produces a time series for all the observed variables in a +kinetic model as specified by <a href="mkinmod.html">mkinmod</a>, using a specific set of +kinetic parameters and initial values for the state variables.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinpredict</span><span class="op">(</span><span class="va">x</span>, <span class="va">odeparms</span>, <span class="va">odeini</span>, <span class="va">outtimes</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mkinmod'</span></span> +<span><span class="fu">mkinpredict</span><span class="op">(</span></span> +<span> <span class="va">x</span>,</span> +<span> odeparms <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent_sink <span class="op">=</span> <span class="fl">0.1</span><span class="op">)</span>,</span> +<span> odeini <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>,</span> +<span> outtimes <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">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>,</span> +<span> solution_type <span class="op">=</span> <span class="st">"deSolve"</span>,</span> +<span> use_compiled <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> use_symbols <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> method.ode <span class="op">=</span> <span class="st">"lsoda"</span>,</span> +<span> atol <span class="op">=</span> <span class="fl">1e-08</span>,</span> +<span> rtol <span class="op">=</span> <span class="fl">1e-10</span>,</span> +<span> maxsteps <span class="op">=</span> <span class="fl">20000L</span>,</span> +<span> map_output <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> na_stop <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu">mkinpredict</span><span class="op">(</span></span> +<span> <span class="va">x</span>,</span> +<span> odeparms <span class="op">=</span> <span class="va">x</span><span class="op">$</span><span class="va">bparms.ode</span>,</span> +<span> odeini <span class="op">=</span> <span class="va">x</span><span class="op">$</span><span class="va">bparms.state</span>,</span> +<span> outtimes <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">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>,</span> +<span> solution_type <span class="op">=</span> <span class="st">"deSolve"</span>,</span> +<span> use_compiled <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> method.ode <span class="op">=</span> <span class="st">"lsoda"</span>,</span> +<span> atol <span class="op">=</span> <span class="fl">1e-08</span>,</span> +<span> rtol <span class="op">=</span> <span class="fl">1e-10</span>,</span> +<span> map_output <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>A kinetic model as produced by <a href="mkinmod.html">mkinmod</a>, or a kinetic fit as +fitted by <a href="mkinfit.html">mkinfit</a>. In the latter case, the fitted parameters are used for +the prediction.</p></dd> + + +<dt id="arg-odeparms">odeparms<a class="anchor" aria-label="anchor" href="#arg-odeparms"></a></dt> +<dd><p>A numeric vector specifying the parameters used in the +kinetic model, which is generally defined as a set of ordinary differential +equations.</p></dd> + + +<dt id="arg-odeini">odeini<a class="anchor" aria-label="anchor" href="#arg-odeini"></a></dt> +<dd><p>A numeric vector containing the initial values of the state +variables of the model. Note that the state variables can differ from the +observed variables, for example in the case of the SFORB model.</p></dd> + + +<dt id="arg-outtimes">outtimes<a class="anchor" aria-label="anchor" href="#arg-outtimes"></a></dt> +<dd><p>A numeric vector specifying the time points for which model +predictions should be generated.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments passed to the ode solver in case such a +solver is used.</p></dd> + + +<dt id="arg-solution-type">solution_type<a class="anchor" aria-label="anchor" href="#arg-solution-type"></a></dt> +<dd><p>The method that should be used for producing the +predictions. This should generally be "analytical" if there is only one +observed variable, and usually "deSolve" in the case of several observed +variables. The third possibility "eigen" is fast in comparison to uncompiled +ODE models, but not applicable to some models, e.g. using FOMC for the +parent compound.</p></dd> + + +<dt id="arg-use-compiled">use_compiled<a class="anchor" aria-label="anchor" href="#arg-use-compiled"></a></dt> +<dd><p>If set to <code>FALSE</code>, no compiled version of the +<a href="mkinmod.html">mkinmod</a> model is used, even if is present.</p></dd> + + +<dt id="arg-use-symbols">use_symbols<a class="anchor" aria-label="anchor" href="#arg-use-symbols"></a></dt> +<dd><p>If set to <code>TRUE</code> (default), symbol info present in +the <a href="mkinmod.html">mkinmod</a> object is used if available for accessing compiled code</p></dd> + + +<dt id="arg-method-ode">method.ode<a class="anchor" aria-label="anchor" href="#arg-method-ode"></a></dt> +<dd><p>The solution method passed via mkinpredict to <code><a href="https://rdrr.io/pkg/deSolve/man/ode.html" class="external-link">deSolve::ode()</a></code> in +case the solution type is "deSolve" and we are not using compiled code. +When using compiled code, only lsoda is supported.</p></dd> + + +<dt id="arg-atol">atol<a class="anchor" aria-label="anchor" href="#arg-atol"></a></dt> +<dd><p>Absolute error tolerance, passed to the ode solver.</p></dd> + + +<dt id="arg-rtol">rtol<a class="anchor" aria-label="anchor" href="#arg-rtol"></a></dt> +<dd><p>Absolute error tolerance, passed to the ode solver.</p></dd> + + +<dt id="arg-maxsteps">maxsteps<a class="anchor" aria-label="anchor" href="#arg-maxsteps"></a></dt> +<dd><p>Maximum number of steps, passed to the ode solver.</p></dd> + + +<dt id="arg-map-output">map_output<a class="anchor" aria-label="anchor" href="#arg-map-output"></a></dt> +<dd><p>Boolean to specify if the output should list values for +the observed variables (default) or for all state variables (if set to +FALSE). Setting this to FALSE has no effect for analytical solutions, +as these always return mapped output.</p></dd> + + +<dt id="arg-na-stop">na_stop<a class="anchor" aria-label="anchor" href="#arg-na-stop"></a></dt> +<dd><p>Should it be an error if <code><a href="https://rdrr.io/pkg/deSolve/man/ode.html" class="external-link">deSolve::ode()</a></code> returns NaN values</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A matrix with the numeric solution in wide format</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># Compare solution types</span></span></span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><span> solution_type <span class="op">=</span> <span class="st">"analytical"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol</span> +<span class="r-out co"><span class="r-pr">#></span> 0 0 100.0000000</span> +<span class="r-out co"><span class="r-pr">#></span> 1 1 74.0818221</span> +<span class="r-out co"><span class="r-pr">#></span> 2 2 54.8811636</span> +<span class="r-out co"><span class="r-pr">#></span> 3 3 40.6569660</span> +<span class="r-out co"><span class="r-pr">#></span> 4 4 30.1194212</span> +<span class="r-out co"><span class="r-pr">#></span> 5 5 22.3130160</span> +<span class="r-out co"><span class="r-pr">#></span> 6 6 16.5298888</span> +<span class="r-out co"><span class="r-pr">#></span> 7 7 12.2456428</span> +<span class="r-out co"><span class="r-pr">#></span> 8 8 9.0717953</span> +<span class="r-out co"><span class="r-pr">#></span> 9 9 6.7205513</span> +<span class="r-out co"><span class="r-pr">#></span> 10 10 4.9787068</span> +<span class="r-out co"><span class="r-pr">#></span> 11 11 3.6883167</span> +<span class="r-out co"><span class="r-pr">#></span> 12 12 2.7323722</span> +<span class="r-out co"><span class="r-pr">#></span> 13 13 2.0241911</span> +<span class="r-out co"><span class="r-pr">#></span> 14 14 1.4995577</span> +<span class="r-out co"><span class="r-pr">#></span> 15 15 1.1108997</span> +<span class="r-out co"><span class="r-pr">#></span> 16 16 0.8229747</span> +<span class="r-out co"><span class="r-pr">#></span> 17 17 0.6096747</span> +<span class="r-out co"><span class="r-pr">#></span> 18 18 0.4516581</span> +<span class="r-out co"><span class="r-pr">#></span> 19 19 0.3345965</span> +<span class="r-out co"><span class="r-pr">#></span> 20 20 0.2478752</span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><span> solution_type <span class="op">=</span> <span class="st">"deSolve"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol</span> +<span class="r-out co"><span class="r-pr">#></span> 0 0 100.0000000</span> +<span class="r-out co"><span class="r-pr">#></span> 1 1 74.0818221</span> +<span class="r-out co"><span class="r-pr">#></span> 2 2 54.8811636</span> +<span class="r-out co"><span class="r-pr">#></span> 3 3 40.6569660</span> +<span class="r-out co"><span class="r-pr">#></span> 4 4 30.1194212</span> +<span class="r-out co"><span class="r-pr">#></span> 5 5 22.3130160</span> +<span class="r-out co"><span class="r-pr">#></span> 6 6 16.5298888</span> +<span class="r-out co"><span class="r-pr">#></span> 7 7 12.2456428</span> +<span class="r-out co"><span class="r-pr">#></span> 8 8 9.0717953</span> +<span class="r-out co"><span class="r-pr">#></span> 9 9 6.7205513</span> +<span class="r-out co"><span class="r-pr">#></span> 10 10 4.9787068</span> +<span class="r-out co"><span class="r-pr">#></span> 11 11 3.6883167</span> +<span class="r-out co"><span class="r-pr">#></span> 12 12 2.7323722</span> +<span class="r-out co"><span class="r-pr">#></span> 13 13 2.0241911</span> +<span class="r-out co"><span class="r-pr">#></span> 14 14 1.4995577</span> +<span class="r-out co"><span class="r-pr">#></span> 15 15 1.1108996</span> +<span class="r-out co"><span class="r-pr">#></span> 16 16 0.8229747</span> +<span class="r-out co"><span class="r-pr">#></span> 17 17 0.6096747</span> +<span class="r-out co"><span class="r-pr">#></span> 18 18 0.4516581</span> +<span class="r-out co"><span class="r-pr">#></span> 19 19 0.3345965</span> +<span class="r-out co"><span class="r-pr">#></span> 20 20 0.2478752</span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><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></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol</span> +<span class="r-out co"><span class="r-pr">#></span> 0 0 100.0000000</span> +<span class="r-out co"><span class="r-pr">#></span> 1 1 74.0818221</span> +<span class="r-out co"><span class="r-pr">#></span> 2 2 54.8811636</span> +<span class="r-out co"><span class="r-pr">#></span> 3 3 40.6569660</span> +<span class="r-out co"><span class="r-pr">#></span> 4 4 30.1194212</span> +<span class="r-out co"><span class="r-pr">#></span> 5 5 22.3130160</span> +<span class="r-out co"><span class="r-pr">#></span> 6 6 16.5298888</span> +<span class="r-out co"><span class="r-pr">#></span> 7 7 12.2456428</span> +<span class="r-out co"><span class="r-pr">#></span> 8 8 9.0717953</span> +<span class="r-out co"><span class="r-pr">#></span> 9 9 6.7205513</span> +<span class="r-out co"><span class="r-pr">#></span> 10 10 4.9787068</span> +<span class="r-out co"><span class="r-pr">#></span> 11 11 3.6883167</span> +<span class="r-out co"><span class="r-pr">#></span> 12 12 2.7323722</span> +<span class="r-out co"><span class="r-pr">#></span> 13 13 2.0241911</span> +<span class="r-out co"><span class="r-pr">#></span> 14 14 1.4995577</span> +<span class="r-out co"><span class="r-pr">#></span> 15 15 1.1108996</span> +<span class="r-out co"><span class="r-pr">#></span> 16 16 0.8229747</span> +<span class="r-out co"><span class="r-pr">#></span> 17 17 0.6096747</span> +<span class="r-out co"><span class="r-pr">#></span> 18 18 0.4516581</span> +<span class="r-out co"><span class="r-pr">#></span> 19 19 0.3345965</span> +<span class="r-out co"><span class="r-pr">#></span> 20 20 0.2478752</span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><span> solution_type <span class="op">=</span> <span class="st">"eigen"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol</span> +<span class="r-out co"><span class="r-pr">#></span> 0 0 100.0000000</span> +<span class="r-out co"><span class="r-pr">#></span> 1 1 74.0818221</span> +<span class="r-out co"><span class="r-pr">#></span> 2 2 54.8811636</span> +<span class="r-out co"><span class="r-pr">#></span> 3 3 40.6569660</span> +<span class="r-out co"><span class="r-pr">#></span> 4 4 30.1194212</span> +<span class="r-out co"><span class="r-pr">#></span> 5 5 22.3130160</span> +<span class="r-out co"><span class="r-pr">#></span> 6 6 16.5298888</span> +<span class="r-out co"><span class="r-pr">#></span> 7 7 12.2456428</span> +<span class="r-out co"><span class="r-pr">#></span> 8 8 9.0717953</span> +<span class="r-out co"><span class="r-pr">#></span> 9 9 6.7205513</span> +<span class="r-out co"><span class="r-pr">#></span> 10 10 4.9787068</span> +<span class="r-out co"><span class="r-pr">#></span> 11 11 3.6883167</span> +<span class="r-out co"><span class="r-pr">#></span> 12 12 2.7323722</span> +<span class="r-out co"><span class="r-pr">#></span> 13 13 2.0241911</span> +<span class="r-out co"><span class="r-pr">#></span> 14 14 1.4995577</span> +<span class="r-out co"><span class="r-pr">#></span> 15 15 1.1108997</span> +<span class="r-out co"><span class="r-pr">#></span> 16 16 0.8229747</span> +<span class="r-out co"><span class="r-pr">#></span> 17 17 0.6096747</span> +<span class="r-out co"><span class="r-pr">#></span> 18 18 0.4516581</span> +<span class="r-out co"><span class="r-pr">#></span> 19 19 0.3345965</span> +<span class="r-out co"><span class="r-pr">#></span> 20 20 0.2478752</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Compare integration methods to analytical solution</span></span></span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol </span> +<span class="r-out co"><span class="r-pr">#></span> 20.0000000 0.2478752 </span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><span> method <span class="op">=</span> <span class="st">"lsoda"</span>, use_compiled <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span><span class="op">[</span><span class="fl">21</span>,<span class="op">]</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol </span> +<span class="r-out co"><span class="r-pr">#></span> 20.0000000 0.2478752 </span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><span> method <span class="op">=</span> <span class="st">"ode45"</span>, use_compiled <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span><span class="op">[</span><span class="fl">21</span>,<span class="op">]</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol </span> +<span class="r-out co"><span class="r-pr">#></span> 20.0000000 0.2478752 </span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><span> method <span class="op">=</span> <span class="st">"rk4"</span>, use_compiled <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span><span class="op">[</span><span class="fl">21</span>,<span class="op">]</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol </span> +<span class="r-out co"><span class="r-pr">#></span> 20.0000000 0.2480043 </span> +<span class="r-in"><span><span class="co"># rk4 is not as precise here</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The number of output times used to make a lot of difference until the</span></span></span> +<span class="r-in"><span><span class="co"># default for atol was adjusted</span></span></span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">c</a></span><span class="op">(</span>degradinol <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol </span> +<span class="r-out co"><span class="r-pr">#></span> 20.0000000 0.2478752 </span> +<span class="r-in"><span><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" class="external-link">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" class="external-link">c</a></span><span class="op">(</span>degradinol <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">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></span></span> +<span class="r-out co"><span class="r-pr">#></span> time degradinol </span> +<span class="r-out co"><span class="r-pr">#></span> 20.0000000 0.2478752 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Comparison of the performance of solution types</span></span></span> +<span class="r-in"><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="https://rdrr.io/r/base/list.html" class="external-link">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>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="kw">if</span><span class="op">(</span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">require</a></span><span class="op">(</span><span class="va"><a href="http://rbenchmark.googlecode.com" class="external-link">rbenchmark</a></span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html" class="external-link">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" class="external-link">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>,</span></span> +<span class="r-in"><span> eigen <span class="op">=</span> <span class="fu">mkinpredict</span><span class="op">(</span><span class="va">SFO_SFO</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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" class="external-link">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></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> deSolve_compiled <span class="op">=</span> <span class="fu">mkinpredict</span><span class="op">(</span><span class="va">SFO_SFO</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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" class="external-link">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></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> deSolve <span class="op">=</span> <span class="fu">mkinpredict</span><span class="op">(</span><span class="va">SFO_SFO</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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" class="external-link">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></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> analytical <span class="op">=</span> <span class="fu">mkinpredict</span><span class="op">(</span><span class="va">SFO_SFO</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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" class="external-link">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></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> test relative elapsed</span> +<span class="r-out co"><span class="r-pr">#></span> 2 deSolve_compiled 1.0 0.002</span> +<span class="r-out co"><span class="r-pr">#></span> 4 analytical 1.0 0.002</span> +<span class="r-out co"><span class="r-pr">#></span> 1 eigen 4.0 0.008</span> +<span class="r-out co"><span class="r-pr">#></span> 3 deSolve 30.5 0.061</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <span class="co"># Predict from a fitted model</span></span></span> +<span class="r-in"><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><span class="op">)</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">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></span></span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in !is.null(x$symbols) & use_symbols:</span> operations are possible only for numeric, logical or complex types</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinpredict.mkinfit.html b/docs/dev/reference/mkinpredict.mkinfit.html new file mode 100644 index 00000000..5f03c04c --- /dev/null +++ b/docs/dev/reference/mkinpredict.mkinfit.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mkinpredict.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mkinpredict.html"> + </head> +</html> + diff --git a/docs/dev/reference/mkinpredict.mkinmod.html b/docs/dev/reference/mkinpredict.mkinmod.html new file mode 100644 index 00000000..5f03c04c --- /dev/null +++ b/docs/dev/reference/mkinpredict.mkinmod.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mkinpredict.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mkinpredict.html"> + </head> +</html> + diff --git a/docs/dev/reference/mkinresplot-1.png b/docs/dev/reference/mkinresplot-1.png Binary files differnew file mode 100644 index 00000000..29da1fda --- /dev/null +++ b/docs/dev/reference/mkinresplot-1.png diff --git a/docs/dev/reference/mkinresplot.html b/docs/dev/reference/mkinresplot.html new file mode 100644 index 00000000..b9de393d --- /dev/null +++ b/docs/dev/reference/mkinresplot.html @@ -0,0 +1,203 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Function to plot residuals stored in an mkin object — mkinresplot • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function to plot residuals stored in an mkin object — mkinresplot"><meta name="description" content="This function plots the residuals for the specified subset of the observed +variables from an mkinfit object. A combined plot of the fitted model and +the residuals can be obtained using plot.mkinfit using the +argument show_residuals = TRUE."><meta property="og:description" content="This function plots the residuals for the specified subset of the observed +variables from an mkinfit object. A combined plot of the fitted model and +the residuals can be obtained using plot.mkinfit using the +argument show_residuals = TRUE."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Function to plot residuals stored in an mkin object</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/mkinresplot.R" class="external-link"><code>R/mkinresplot.R</code></a></small> + <div class="d-none name"><code>mkinresplot.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function plots the residuals for the specified subset of the observed +variables from an mkinfit object. A combined plot of the fitted model and +the residuals can be obtained using <code><a href="plot.mkinfit.html">plot.mkinfit</a></code> using the +argument <code>show_residuals = TRUE</code>.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mkinresplot</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> obs_vars <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">object</span><span class="op">$</span><span class="va">mkinmod</span><span class="op">$</span><span class="va">map</span><span class="op">)</span>,</span> +<span> xlim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">1.1</span> <span class="op">*</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">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>,</span> +<span> standardized <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> xlab <span class="op">=</span> <span class="st">"Time"</span>,</span> +<span> ylab <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">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>,</span> +<span> maxabs <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> legend <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> lpos <span class="op">=</span> <span class="st">"topright"</span>,</span> +<span> col_obs <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> pch_obs <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> frame <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>A fit represented in an <code><a href="mkinfit.html">mkinfit</a></code> object.</p></dd> + + +<dt id="arg-obs-vars">obs_vars<a class="anchor" aria-label="anchor" href="#arg-obs-vars"></a></dt> +<dd><p>A character vector of names of the observed variables for +which residuals should be plotted. Defaults to all observed variables in +the model</p></dd> + + +<dt id="arg-xlim">xlim<a class="anchor" aria-label="anchor" href="#arg-xlim"></a></dt> +<dd><p>plot range in x direction.</p></dd> + + +<dt id="arg-standardized">standardized<a class="anchor" aria-label="anchor" href="#arg-standardized"></a></dt> +<dd><p>Should the residuals be standardized by dividing by the +standard deviation given by the error model of the fit?</p></dd> + + +<dt id="arg-xlab">xlab<a class="anchor" aria-label="anchor" href="#arg-xlab"></a></dt> +<dd><p>Label for the x axis.</p></dd> + + +<dt id="arg-ylab">ylab<a class="anchor" aria-label="anchor" href="#arg-ylab"></a></dt> +<dd><p>Label for the y axis.</p></dd> + + +<dt id="arg-maxabs">maxabs<a class="anchor" aria-label="anchor" href="#arg-maxabs"></a></dt> +<dd><p>Maximum absolute value of the residuals. This is used for the +scaling of the y axis and defaults to "auto".</p></dd> + + +<dt id="arg-legend">legend<a class="anchor" aria-label="anchor" href="#arg-legend"></a></dt> +<dd><p>Should a legend be plotted?</p></dd> + + +<dt id="arg-lpos">lpos<a class="anchor" aria-label="anchor" href="#arg-lpos"></a></dt> +<dd><p>Where should the legend be placed? Default is "topright". Will +be passed on to <code><a href="https://rdrr.io/r/graphics/legend.html" class="external-link">legend</a></code>.</p></dd> + + +<dt id="arg-col-obs">col_obs<a class="anchor" aria-label="anchor" href="#arg-col-obs"></a></dt> +<dd><p>Colors for the observed variables.</p></dd> + + +<dt id="arg-pch-obs">pch_obs<a class="anchor" aria-label="anchor" href="#arg-pch-obs"></a></dt> +<dd><p>Symbols to be used for the observed variables.</p></dd> + + +<dt id="arg-frame">frame<a class="anchor" aria-label="anchor" href="#arg-frame"></a></dt> +<dd><p>Should a frame be drawn around the plots?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>further arguments passed to <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>Nothing is returned by this function, as it is called for its side +effect, namely to produce a plot.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <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> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke and Katrin Lindenberger</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><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="mkinmod.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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><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="va">model</span>, <span class="va">FOCUS_2006_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span><span class="fu">mkinresplot</span><span class="op">(</span><span class="va">fit</span>, <span class="st">"m1"</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mkinresplot-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/mkinsub.html b/docs/dev/reference/mkinsub.html new file mode 100644 index 00000000..0ffb4f23 --- /dev/null +++ b/docs/dev/reference/mkinsub.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mkinmod.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mkinmod.html"> + </head> +</html> + diff --git a/docs/dev/reference/mmkin-1.png b/docs/dev/reference/mmkin-1.png Binary files differnew file mode 100644 index 00000000..060775ff --- /dev/null +++ b/docs/dev/reference/mmkin-1.png diff --git a/docs/dev/reference/mmkin-2.png b/docs/dev/reference/mmkin-2.png Binary files differnew file mode 100644 index 00000000..242a50fa --- /dev/null +++ b/docs/dev/reference/mmkin-2.png diff --git a/docs/dev/reference/mmkin-3.png b/docs/dev/reference/mmkin-3.png Binary files differnew file mode 100644 index 00000000..ef013dea --- /dev/null +++ b/docs/dev/reference/mmkin-3.png diff --git a/docs/dev/reference/mmkin-4.png b/docs/dev/reference/mmkin-4.png Binary files differnew file mode 100644 index 00000000..c08d231d --- /dev/null +++ b/docs/dev/reference/mmkin-4.png diff --git a/docs/dev/reference/mmkin-5.png b/docs/dev/reference/mmkin-5.png Binary files differnew file mode 100644 index 00000000..fe5797b4 --- /dev/null +++ b/docs/dev/reference/mmkin-5.png diff --git a/docs/dev/reference/mmkin.html b/docs/dev/reference/mmkin.html new file mode 100644 index 00000000..c2bbd3c4 --- /dev/null +++ b/docs/dev/reference/mmkin.html @@ -0,0 +1,239 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Fit one or more kinetic models with one or more state variables to one or more datasets — mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Fit one or more kinetic models with one or more state variables to one or more datasets — mmkin"><meta name="description" content="This function calls mkinfit on all combinations of models and +datasets specified in its first two arguments."><meta property="og:description" content="This function calls mkinfit on all combinations of models and +datasets specified in its first two arguments."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/mmkin.R" class="external-link"><code>R/mmkin.R</code></a></small> + <div class="d-none name"><code>mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function calls <code><a href="mkinfit.html">mkinfit</a></code> on all combinations of models and +datasets specified in its first two arguments.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">mmkin</span><span class="op">(</span></span> +<span> models <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span><span class="op">)</span>,</span> +<span> <span class="va">datasets</span>,</span> +<span> cores <span class="op">=</span> <span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html" class="external-link">Sys.info</a></span><span class="op">(</span><span class="op">)</span><span class="op">[</span><span class="st">"sysname"</span><span class="op">]</span> <span class="op">==</span> <span class="st">"Windows"</span><span class="op">)</span> <span class="fl">1</span> <span class="kw">else</span> <span class="fu">parallel</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/parallel/detectCores.html" class="external-link">detectCores</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> cluster <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-models">models<a class="anchor" aria-label="anchor" href="#arg-models"></a></dt> +<dd><p>Either a character vector of shorthand names like +<code>c("SFO", "FOMC", "DFOP", "HS", "SFORB")</code>, or an optionally named +list of <code><a href="mkinmod.html">mkinmod</a></code> objects.</p></dd> + + +<dt id="arg-datasets">datasets<a class="anchor" aria-label="anchor" href="#arg-datasets"></a></dt> +<dd><p>An optionally named list of datasets suitable as observed +data for <code><a href="mkinfit.html">mkinfit</a></code>.</p></dd> + + +<dt id="arg-cores">cores<a class="anchor" aria-label="anchor" href="#arg-cores"></a></dt> +<dd><p>The number of cores to be used for multicore processing. This +is only used when the <code>cluster</code> argument is <code>NULL</code>. On Windows +machines, cores > 1 is not supported, you need to use the <code>cluster</code> +argument to use multiple logical processors. Per default, all cores +detected by <code><a href="https://rdrr.io/r/parallel/detectCores.html" class="external-link">parallel::detectCores()</a></code> are used, except on Windows where +the default is 1.</p></dd> + + +<dt id="arg-cluster">cluster<a class="anchor" aria-label="anchor" href="#arg-cluster"></a></dt> +<dd><p>A cluster as returned by <code>makeCluster</code> to be used +for parallel execution.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used.</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An mmkin object.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A two-dimensional <code><a href="https://rdrr.io/r/base/array.html" class="external-link">array</a></code> of <code><a href="mkinfit.html">mkinfit</a></code> +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> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></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 +plotting.</p></div> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, use_of_ff <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"FOMC"</span>, <span class="st">"M1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, use_of_ff <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">models</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span> +<span class="r-in"><span><span class="va">datasets</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">datasets</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">time_default</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html" class="external-link">system.time</a></span><span class="op">(</span><span 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></span> +<span class="r-in"><span><span class="va">time_1</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html" class="external-link">system.time</a></span><span class="op">(</span><span 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></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">time_default</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> user system elapsed </span> +<span class="r-out co"><span class="r-pr">#></span> 1.522 0.957 0.720 </span> +<span class="r-in"><span><span class="va">time_1</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> user system elapsed </span> +<span class="r-out co"><span class="r-pr">#></span> 1.991 0.024 2.015 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><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></span></span> +<span class="r-out co"><span class="r-pr">#></span> $ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_M1 parent_sink M1_M2 M1_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 0.7340481 0.2659519 0.7505690 0.2494310 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> parent 0.8777689 2.915885</span> +<span class="r-out co"><span class="r-pr">#></span> M1 2.3257403 7.725942</span> +<span class="r-out co"><span class="r-pr">#></span> M2 33.7201060 112.015767</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># plot.mkinfit handles rows or columns of mmkin result objects</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">fits.0</span><span class="op">[</span><span class="fl">1</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mmkin-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">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" class="external-link">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></span></span> +<span class="r-plt img"><img src="mmkin-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">fits.0</span><span class="op">[</span>, <span class="fl">1</span><span class="op">]</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="mmkin-3.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># Use double brackets to extract a single mkinfit object, which will be plotted</span></span></span> +<span class="r-in"><span><span class="co"># by plot.mkinfit and can be plotted using plot_sep</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">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></span></span> +<span class="r-plt img"><img src="mmkin-4.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><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></span> +<span class="r-in"><span><span class="co"># Plotting with mmkin (single brackets, extracting an mmkin object) does not</span></span></span> +<span class="r-in"><span><span class="co"># allow to plot the observed variables separately</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">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></span> +<span class="r-plt img"><img src="mmkin-5.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># On Windows, we can use multiple cores by making a cluster first</span></span></span> +<span class="r-in"><span><span class="va">cl</span> <span class="op"><-</span> <span class="fu">parallel</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makePSOCKcluster</a></span><span class="op">(</span><span class="fl">12</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f</span> <span class="op"><-</span> <span class="fu">mmkin</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>A <span class="op">=</span> <span class="va">FOCUS_2006_A</span>, B <span class="op">=</span> <span class="va">FOCUS_2006_B</span>, C <span class="op">=</span> <span class="va">FOCUS_2006_C</span>, D <span class="op">=</span> <span class="va">FOCUS_2006_D</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> cluster <span class="op">=</span> <span class="va">cl</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">f</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> <mmkin> object</span> +<span class="r-out co"><span class="r-pr">#></span> Status of individual fits:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model A B C D </span> +<span class="r-out co"><span class="r-pr">#></span> SFO OK OK OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> FOMC C OK OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP OK OK OK OK</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> C: Optimisation did not converge:</span> +<span class="r-out co"><span class="r-pr">#></span> false convergence (8)</span> +<span class="r-out co"><span class="r-pr">#></span> OK: No warnings</span> +<span class="r-in"><span><span class="co"># We get false convergence for the FOMC fit to FOCUS_2006_A because this</span></span></span> +<span class="r-in"><span><span class="co"># dataset is really SFO, and the FOMC fit is overparameterised</span></span></span> +<span class="r-in"><span><span class="fu">parallel</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">stopCluster</a></span><span class="op">(</span><span class="va">cl</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/multistart-1.png b/docs/dev/reference/multistart-1.png Binary files differnew file mode 100644 index 00000000..d326b0c4 --- /dev/null +++ b/docs/dev/reference/multistart-1.png diff --git a/docs/dev/reference/multistart-2.png b/docs/dev/reference/multistart-2.png Binary files differnew file mode 100644 index 00000000..b6ae3051 --- /dev/null +++ b/docs/dev/reference/multistart-2.png diff --git a/docs/dev/reference/multistart.html b/docs/dev/reference/multistart.html new file mode 100644 index 00000000..3db38d97 --- /dev/null +++ b/docs/dev/reference/multistart.html @@ -0,0 +1,212 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Perform a hierarchical model fit with multiple starting values — multistart • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Perform a hierarchical model fit with multiple starting values — multistart"><meta name="description" content="The purpose of this method is to check if a certain algorithm for fitting +nonlinear hierarchical models (also known as nonlinear mixed-effects models) +will reliably yield results that are sufficiently similar to each other, if +started with a certain range of reasonable starting parameters. It is +inspired by the article on practical identifiabiliy in the frame of nonlinear +mixed-effects models by Duchesne et al (2021)."><meta property="og:description" content="The purpose of this method is to check if a certain algorithm for fitting +nonlinear hierarchical models (also known as nonlinear mixed-effects models) +will reliably yield results that are sufficiently similar to each other, if +started with a certain range of reasonable starting parameters. It is +inspired by the article on practical identifiabiliy in the frame of nonlinear +mixed-effects models by Duchesne et al (2021)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Perform a hierarchical model fit with multiple starting values</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/multistart.R" class="external-link"><code>R/multistart.R</code></a></small> + <div class="d-none name"><code>multistart.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The purpose of this method is to check if a certain algorithm for fitting +nonlinear hierarchical models (also known as nonlinear mixed-effects models) +will reliably yield results that are sufficiently similar to each other, if +started with a certain range of reasonable starting parameters. It is +inspired by the article on practical identifiabiliy in the frame of nonlinear +mixed-effects models by Duchesne et al (2021).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">multistart</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> n <span class="op">=</span> <span class="fl">50</span>,</span> +<span> cores <span class="op">=</span> <span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.info.html" class="external-link">Sys.info</a></span><span class="op">(</span><span class="op">)</span><span class="op">[</span><span class="st">"sysname"</span><span class="op">]</span> <span class="op">==</span> <span class="st">"Windows"</span><span class="op">)</span> <span class="fl">1</span> <span class="kw">else</span> <span class="fu">parallel</span><span class="fu">::</span><span class="fu"><a href="https://rdrr.io/r/parallel/detectCores.html" class="external-link">detectCores</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> cluster <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'saem.mmkin'</span></span> +<span><span class="fu">multistart</span><span class="op">(</span><span class="va">object</span>, n <span class="op">=</span> <span class="fl">50</span>, cores <span class="op">=</span> <span class="fl">1</span>, cluster <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'multistart'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="fu">best</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># Default S3 method</span></span> +<span><span class="fu">best</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="fu">which.best</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># Default S3 method</span></span> +<span><span class="fu">which.best</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>The fit object to work with</p></dd> + + +<dt id="arg-n">n<a class="anchor" aria-label="anchor" href="#arg-n"></a></dt> +<dd><p>How many different combinations of starting parameters should be +used?</p></dd> + + +<dt id="arg-cores">cores<a class="anchor" aria-label="anchor" href="#arg-cores"></a></dt> +<dd><p>How many fits should be run in parallel (only on posix platforms)?</p></dd> + + +<dt id="arg-cluster">cluster<a class="anchor" aria-label="anchor" href="#arg-cluster"></a></dt> +<dd><p>A cluster as returned by <a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">parallel::makeCluster</a> to be used +for parallel execution.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Passed to the update function.</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>The multistart object to print</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A list of <a href="saem.html">saem.mmkin</a> objects, with class attributes +'multistart.saem.mmkin' and 'multistart'.</p> +<p>The object with the highest likelihood</p> +<p>The index of the object with the highest likelihood</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Duchesne R, Guillemin A, Gandrillon O, Crauste F. Practical +identifiability in the frame of nonlinear mixed effects models: the example +of the in vitro erythropoiesis. BMC Bioinformatics. 2021 Oct 4;22(1):478. +doi: 10.1186/s12859-021-04373-4.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><a href="parplot.html">parplot</a>, <a href="llhist.html">llhist</a></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://pkgdown.jrwb.de/mkin/">mkin</a></span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">dmta_ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="fl">1</span><span class="op">:</span><span class="fl">7</span>, <span class="kw">function</span><span class="op">(</span><span class="va">i</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="va">ds_i</span> <span class="op"><-</span> <span class="va">dimethenamid_2018</span><span class="op">$</span><span class="va">ds</span><span class="op">[[</span><span class="va">i</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">data</span></span></span> +<span class="r-in"><span> <span class="va">ds_i</span><span class="op">[</span><span class="va">ds_i</span><span class="op">$</span><span class="va">name</span> <span class="op">==</span> <span class="st">"DMTAP"</span>, <span class="st">"name"</span><span class="op">]</span> <span class="op"><-</span> <span class="st">"DMTA"</span></span></span> +<span class="r-in"><span> <span class="va">ds_i</span><span class="op">$</span><span class="va">time</span> <span class="op"><-</span> <span class="va">ds_i</span><span class="op">$</span><span class="va">time</span> <span class="op">*</span> <span class="va">dimethenamid_2018</span><span class="op">$</span><span class="va">f_time_norm</span><span class="op">[</span><span class="va">i</span><span class="op">]</span></span></span> +<span class="r-in"><span> <span class="va">ds_i</span></span></span> +<span class="r-in"><span><span class="op">}</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">dmta_ds</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">sapply</a></span><span class="op">(</span><span class="va">dimethenamid_2018</span><span class="op">$</span><span class="va">ds</span>, <span class="kw">function</span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="va">ds</span><span class="op">$</span><span class="va">title</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/cbind.html" class="external-link">rbind</a></span><span class="op">(</span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 1"</span><span class="op">]</span><span class="op">]</span>, <span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 2"</span><span class="op">]</span><span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 1"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="va">dmta_ds</span><span class="op">[[</span><span class="st">"Elliot 2"</span><span class="op">]</span><span class="op">]</span> <span class="op"><-</span> <span class="cn">NULL</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">f_mmkin</span> <span class="op"><-</span> <span class="fu"><a href="mmkin.html">mmkin</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="va">dmta_ds</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, cores <span class="op">=</span> <span class="fl">7</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_full</span> <span class="op"><-</span> <span class="fu"><a href="saem.html">saem</a></span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_full_multi</span> <span class="op"><-</span> <span class="fu">multistart</span><span class="op">(</span><span class="va">f_saem_full</span>, n <span class="op">=</span> <span class="fl">16</span>, cores <span class="op">=</span> <span class="fl">16</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="parplot.html">parplot</a></span><span class="op">(</span><span class="va">f_saem_full_multi</span>, lpos <span class="op">=</span> <span class="st">"topleft"</span>, las <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="multistart-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_full</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] "sd(log_k2)"</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">f_saem_reduced</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_full</span>, no_random_effect <span class="op">=</span> <span class="st">"log_k2"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_reduced</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># On Windows, we need to create a PSOCK cluster first and refer to it</span></span></span> +<span class="r-in"><span><span class="co"># in the call to multistart()</span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">parallel</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">cl</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">makePSOCKcluster</a></span><span class="op">(</span><span class="fl">12</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_reduced_multi</span> <span class="op"><-</span> <span class="fu">multistart</span><span class="op">(</span><span class="va">f_saem_reduced</span>, n <span class="op">=</span> <span class="fl">16</span>, cluster <span class="op">=</span> <span class="va">cl</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="parplot.html">parplot</a></span><span class="op">(</span><span class="va">f_saem_reduced_multi</span>, lpos <span class="op">=</span> <span class="st">"topright"</span>, ylim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.5</span>, <span class="fl">2</span><span class="op">)</span>, las <span class="op">=</span> <span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="multistart-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/parallel/makeCluster.html" class="external-link">stopCluster</a></span><span class="op">(</span><span class="va">cl</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/multistart.saem.mmkin.html b/docs/dev/reference/multistart.saem.mmkin.html new file mode 100644 index 00000000..06f15f0c --- /dev/null +++ b/docs/dev/reference/multistart.saem.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html"> + </head> +</html> + diff --git a/docs/dev/reference/nafta-1.png b/docs/dev/reference/nafta-1.png Binary files differnew file mode 100644 index 00000000..98d4246c --- /dev/null +++ b/docs/dev/reference/nafta-1.png diff --git a/docs/dev/reference/nafta.html b/docs/dev/reference/nafta.html new file mode 100644 index 00000000..f7b018e5 --- /dev/null +++ b/docs/dev/reference/nafta.html @@ -0,0 +1,215 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Evaluate parent kinetics using the NAFTA guidance — nafta • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Evaluate parent kinetics using the NAFTA guidance — nafta"><meta name="description" content="The function fits the SFO, IORE and DFOP models using mmkin +and returns an object of class nafta that has methods for printing +and plotting. +Print nafta objects. The results for the three models are printed in the +order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP."><meta property="og:description" content="The function fits the SFO, IORE and DFOP models using mmkin +and returns an object of class nafta that has methods for printing +and plotting. +Print nafta objects. The results for the three models are printed in the +order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Evaluate parent kinetics using the NAFTA guidance</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/nafta.R" class="external-link"><code>R/nafta.R</code></a></small> + <div class="d-none name"><code>nafta.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The function fits the SFO, IORE and DFOP models using <code><a href="mmkin.html">mmkin</a></code> +and returns an object of class <code>nafta</code> that has methods for printing +and plotting.</p> +<p>Print nafta objects. The results for the three models are printed in the +order of increasing model complexity, i.e. SFO, then IORE, and finally DFOP.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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> +<span></span> +<span><span class="co"># S3 method for class 'nafta'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>NAFTA (2011) Guidance for evaluating and calculating degradation +kinetics in environmental media. NAFTA Technical Working Group on +Pesticides +<a href="https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/guidance-evaluating-and-calculating-degradation" class="external-link">https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/guidance-evaluating-and-calculating-degradation</a> +accessed 2019-02-22</p> +<p>US EPA (2015) Standard Operating Procedure for Using the NAFTA Guidance to +Calculate Representative Half-life Values and Characterizing Pesticide +Degradation +<a href="https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance" class="external-link">https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance</a></p> + </div> + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-ds">ds<a class="anchor" aria-label="anchor" href="#arg-ds"></a></dt> +<dd><p>A dataframe that must contain one variable called "time" with the +time values specified by the <code>time</code> argument, one column called +"name" with the grouping of the observed values, and finally one column of +observed values called "value".</p></dd> + + +<dt id="arg-title">title<a class="anchor" aria-label="anchor" href="#arg-title"></a></dt> +<dd><p>Optional title of the dataset</p></dd> + + +<dt id="arg-quiet">quiet<a class="anchor" aria-label="anchor" href="#arg-quiet"></a></dt> +<dd><p>Should the evaluation text be shown?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments passed to <code><a href="mmkin.html">mmkin</a></code> (not for the +printing method).</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An <code>nafta</code> object.</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>Number of digits to be used for printing parameters and +dissipation times.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>An list of class <code>nafta</code>. The list element named "mmkin" is the +<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> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</span> +<span class="r-msg co"><span class="r-pr">#></span> The representative half-life of the IORE model is longer than the one corresponding</span> +<span class="r-msg co"><span class="r-pr">#></span> to the terminal degradation rate found with the DFOP model.</span> +<span class="r-msg co"><span class="r-pr">#></span> The representative half-life obtained from the DFOP model may be used</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">nafta_evaluation</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Sums of squares:</span> +<span class="r-out co"><span class="r-pr">#></span> SFO IORE DFOP </span> +<span class="r-out co"><span class="r-pr">#></span> 1378.6832 615.7730 517.8836 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Critical sum of squares for checking the SFO model:</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 717.4598</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> $SFO</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 83.7558 1.80e-14 77.18268 90.3288</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.0017 7.43e-05 0.00112 0.0026</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 8.7518 1.22e-05 5.64278 11.8608</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $IORE</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 9.69e+01 NA 8.88e+01 1.05e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k__iore_parent 8.40e-14 NA 1.79e-18 3.94e-09</span> +<span class="r-out co"><span class="r-pr">#></span> N_parent 6.68e+00 NA 4.19e+00 9.17e+00</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.85e+00 NA 3.76e+00 7.94e+00</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $DFOP</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 9.76e+01 1.94e-13 9.02e+01 1.05e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k1 4.24e-02 5.92e-03 2.03e-02 8.88e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k2 8.24e-04 6.48e-03 3.89e-04 1.75e-03</span> +<span class="r-out co"><span class="r-pr">#></span> g 2.88e-01 2.47e-05 1.95e-01 4.03e-01</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.36e+00 2.22e-05 3.43e+00 7.30e+00</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> DTx values:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50_rep</span> +<span class="r-out co"><span class="r-pr">#></span> SFO 407 1350 407</span> +<span class="r-out co"><span class="r-pr">#></span> IORE 541 5190000 1560000</span> +<span class="r-out co"><span class="r-pr">#></span> DFOP 429 2380 841</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Representative half-life:</span> +<span class="r-out co"><span class="r-pr">#></span> [1] 841.41</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">nafta_evaluation</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="nafta-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/nlme-1.png b/docs/dev/reference/nlme-1.png Binary files differnew file mode 100644 index 00000000..9583da2a --- /dev/null +++ b/docs/dev/reference/nlme-1.png diff --git a/docs/dev/reference/nlme-2.png b/docs/dev/reference/nlme-2.png Binary files differnew file mode 100644 index 00000000..08e3b642 --- /dev/null +++ b/docs/dev/reference/nlme-2.png diff --git a/docs/dev/reference/nlme.html b/docs/dev/reference/nlme.html new file mode 100644 index 00000000..e3c13f48 --- /dev/null +++ b/docs/dev/reference/nlme.html @@ -0,0 +1,197 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Helper functions to create nlme models from mmkin row objects — nlme_function • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Helper functions to create nlme models from mmkin row objects — nlme_function"><meta name="description" content="These functions facilitate setting up a nonlinear mixed effects model for +an mmkin row object. An mmkin row object is essentially a list of mkinfit +objects that have been obtained by fitting the same model to a list of +datasets. They are used internally by the nlme.mmkin() method."><meta property="og:description" content="These functions facilitate setting up a nonlinear mixed effects model for +an mmkin row object. An mmkin row object is essentially a list of mkinfit +objects that have been obtained by fitting the same model to a list of +datasets. They are used internally by the nlme.mmkin() method."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Helper functions to create nlme models from mmkin row objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/nlme.R" class="external-link"><code>R/nlme.R</code></a></small> + <div class="d-none name"><code>nlme.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>These functions facilitate setting up a nonlinear mixed effects model for +an mmkin row object. An mmkin row object is essentially a list of mkinfit +objects that have been obtained by fitting the same model to a list of +datasets. They are used internally by the <code><a href="nlme.mmkin.html">nlme.mmkin()</a></code> method.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">nlme_function</span><span class="op">(</span><span class="va">object</span><span class="op">)</span></span> +<span></span> +<span><span class="fu">nlme_data</span><span class="op">(</span><span class="va">object</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An mmkin row object containing several fits of the same model to different datasets</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A function that can be used with nlme</p> +<p>A <code><a href="https://rdrr.io/pkg/nlme/man/groupedData.html" class="external-link">nlme::groupedData</a></code> object</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><code><a href="nlme.mmkin.html">nlme.mmkin</a></code></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="fl">0.1</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="fl">0.05</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="fl">0.02</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="va">ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="va">mean_dp</span> <span class="op"><-</span> <span class="fu"><a href="mean_degparms.html">mean_degparms</a></span><span class="op">(</span><span class="va">f</span><span class="op">)</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="co"># These assignments are necessary for these objects to be</span></span></span> +<span class="r-in"><span><span class="co"># visible to nlme and augPred when evaluation is done by</span></span></span> +<span class="r-in"><span><span class="co"># pkgdown to generate the html docs.</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/assign.html" class="external-link">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" class="external-link">globalenv</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/assign.html" class="external-link">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" class="external-link">globalenv</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://svn.r-project.org/R-packages/trunk/nlme/" class="external-link">nlme</a></span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">m_nlme</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">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>,</span></span> +<span class="r-in"><span> data <span class="op">=</span> <span class="va">grouped_data</span>,</span></span> +<span class="r-in"><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>,</span></span> +<span class="r-in"><span> random <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/pdDiag.html" class="external-link">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>,</span></span> +<span class="r-in"><span> start <span class="op">=</span> <span class="va">mean_dp</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">m_nlme</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Nonlinear mixed-effects model fit by maximum likelihood</span> +<span class="r-out co"><span class="r-pr">#></span> Model: value ~ nlme_f(name, time, parent_0, log_k_parent_sink) </span> +<span class="r-out co"><span class="r-pr">#></span> Data: grouped_data </span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 266.6428 275.8935 -128.3214</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1)</span> +<span class="r-out co"><span class="r-pr">#></span> Level: ds</span> +<span class="r-out co"><span class="r-pr">#></span> Structure: Diagonal</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent_sink Residual</span> +<span class="r-out co"><span class="r-pr">#></span> StdDev: 0.0003775775 0.7058039 3.065183</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed effects: parent_0 + log_k_parent_sink ~ 1 </span> +<span class="r-out co"><span class="r-pr">#></span> Value Std.Error DF t-value p-value</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 101.18323 0.7900461 43 128.07257 0</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent_sink -3.08708 0.4171755 43 -7.39995 0</span> +<span class="r-out co"><span class="r-pr">#></span> Correlation: </span> +<span class="r-out co"><span class="r-pr">#></span> prnt_0</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent_sink 0.031 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Standardized Within-Group Residuals:</span> +<span class="r-out co"><span class="r-pr">#></span> Min Q1 Med Q3 Max </span> +<span class="r-out co"><span class="r-pr">#></span> -2.38427070 -0.52059848 0.03593021 0.39987268 2.73188969 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Number of Observations: 47</span> +<span class="r-out co"><span class="r-pr">#></span> Number of Groups: 3 </span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/pkg/nlme/man/augPred.html" class="external-link">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" class="external-link">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></span></span> +<span class="r-plt img"><img src="nlme-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># augPred does not work on fits with more than one state</span></span></span> +<span class="r-in"><span><span class="co"># variable</span></span></span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># The procedure is greatly simplified by the nlme.mmkin function</span></span></span> +<span class="r-in"><span><span class="va">f_nlme</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_nlme</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="nlme-2.png" alt="" width="700" height="433"></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/nlme.mmkin-1.png b/docs/dev/reference/nlme.mmkin-1.png Binary files differnew file mode 100644 index 00000000..a940da0c --- /dev/null +++ b/docs/dev/reference/nlme.mmkin-1.png diff --git a/docs/dev/reference/nlme.mmkin-2.png b/docs/dev/reference/nlme.mmkin-2.png Binary files differnew file mode 100644 index 00000000..b12ddb73 --- /dev/null +++ b/docs/dev/reference/nlme.mmkin-2.png diff --git a/docs/dev/reference/nlme.mmkin-3.png b/docs/dev/reference/nlme.mmkin-3.png Binary files differnew file mode 100644 index 00000000..629fe7d2 --- /dev/null +++ b/docs/dev/reference/nlme.mmkin-3.png diff --git a/docs/dev/reference/nlme.mmkin.html b/docs/dev/reference/nlme.mmkin.html new file mode 100644 index 00000000..40fb16d3 --- /dev/null +++ b/docs/dev/reference/nlme.mmkin.html @@ -0,0 +1,415 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Create an nlme model for an mmkin row object — nlme.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Create an nlme model for an mmkin row object — nlme.mmkin"><meta name="description" content="This functions sets 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."><meta property="og:description" content="This functions sets 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."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Create an nlme model for an mmkin row object</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/nlme.mmkin.R" class="external-link"><code>R/nlme.mmkin.R</code></a></small> + <div class="d-none name"><code>nlme.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This functions sets 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> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span></span> +<span> <span class="va">model</span>,</span> +<span> data <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> fixed <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">as.list</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="fu"><a href="mean_degparms.html">mean_degparms</a></span><span class="op">(</span><span class="va">model</span><span class="op">)</span><span class="op">)</span><span class="op">)</span>, <span class="kw">function</span><span class="op">(</span><span class="va">el</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/eval.html" class="external-link">eval</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/parse.html" class="external-link">parse</a></span><span class="op">(</span>text <span class="op">=</span></span> +<span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste</a></span><span class="op">(</span><span class="va">el</span>, <span class="fl">1</span>, sep <span class="op">=</span> <span class="st">"~"</span><span class="op">)</span><span class="op">)</span><span class="op">)</span><span class="op">)</span>,</span> +<span> random <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/pdDiag.html" class="external-link">pdDiag</a></span><span class="op">(</span><span class="va">fixed</span><span class="op">)</span>,</span> +<span> <span class="va">groups</span>,</span> +<span> start <span class="op">=</span> <span class="fu"><a href="mean_degparms.html">mean_degparms</a></span><span class="op">(</span><span class="va">model</span>, random <span class="op">=</span> <span class="cn">TRUE</span>, test_log_parms <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>,</span> +<span> correlation <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> weights <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> <span class="va">subset</span>,</span> +<span> method <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"ML"</span>, <span class="st">"REML"</span><span class="op">)</span>,</span> +<span> na.action <span class="op">=</span> <span class="va">na.fail</span>,</span> +<span> <span class="va">naPattern</span>,</span> +<span> control <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> verbose <span class="op">=</span> <span class="cn">FALSE</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'nlme.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">max</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">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></span> +<span></span> +<span><span class="co"># S3 method for class 'nlme.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-model">model<a class="anchor" aria-label="anchor" href="#arg-model"></a></dt> +<dd><p>An <a href="mmkin.html">mmkin</a> row object.</p></dd> + + +<dt id="arg-data">data<a class="anchor" aria-label="anchor" href="#arg-data"></a></dt> +<dd><p>Ignored, data are taken from the mmkin model</p></dd> + + +<dt id="arg-fixed">fixed<a class="anchor" aria-label="anchor" href="#arg-fixed"></a></dt> +<dd><p>Ignored, all degradation parameters fitted in the +mmkin model are used as fixed parameters</p></dd> + + +<dt id="arg-random">random<a class="anchor" aria-label="anchor" href="#arg-random"></a></dt> +<dd><p>If not specified, no correlations between random effects are +set up for the optimised degradation model parameters. This is +achieved by using the <a href="https://rdrr.io/pkg/nlme/man/pdDiag.html" class="external-link">nlme::pdDiag</a> method.</p></dd> + + +<dt id="arg-groups">groups<a class="anchor" aria-label="anchor" href="#arg-groups"></a></dt> +<dd><p>See the documentation of nlme</p></dd> + + +<dt id="arg-start">start<a class="anchor" aria-label="anchor" href="#arg-start"></a></dt> +<dd><p>If not specified, mean values of the fitted degradation +parameters taken from the mmkin object are used</p></dd> + + +<dt id="arg-correlation">correlation<a class="anchor" aria-label="anchor" href="#arg-correlation"></a></dt> +<dd><p>See the documentation of nlme</p></dd> + + +<dt id="arg-weights">weights<a class="anchor" aria-label="anchor" href="#arg-weights"></a></dt> +<dd><p>passed to nlme</p></dd> + + +<dt id="arg-subset">subset<a class="anchor" aria-label="anchor" href="#arg-subset"></a></dt> +<dd><p>passed to nlme</p></dd> + + +<dt id="arg-method">method<a class="anchor" aria-label="anchor" href="#arg-method"></a></dt> +<dd><p>passed to nlme</p></dd> + + +<dt id="arg-na-action">na.action<a class="anchor" aria-label="anchor" href="#arg-na-action"></a></dt> +<dd><p>passed to nlme</p></dd> + + +<dt id="arg-napattern">naPattern<a class="anchor" aria-label="anchor" href="#arg-napattern"></a></dt> +<dd><p>passed to nlme</p></dd> + + +<dt id="arg-control">control<a class="anchor" aria-label="anchor" href="#arg-control"></a></dt> +<dd><p>passed to nlme</p></dd> + + +<dt id="arg-verbose">verbose<a class="anchor" aria-label="anchor" href="#arg-verbose"></a></dt> +<dd><p>passed to nlme</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An nlme.mmkin object to print</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>Number of digits to use for printing</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Update specifications passed to update.nlme</p></dd> + + +<dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An nlme.mmkin object to update</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>Upon success, a fitted 'nlme.mmkin' object, which is an nlme object +with additional elements. It also inherits from 'mixed.mmkin'.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>Note that the convergence of the nlme algorithms depends on the quality +of the data. In degradation kinetics, we often only have few datasets +(e.g. data for few soils) and complicated degradation models, which may +make it impossible to obtain convergence with nlme.</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>As the object inherits from <a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme::nlme</a>, there is a wealth of +methods that will automatically work on 'nlme.mmkin' objects, such as +<code><a href="https://rdrr.io/pkg/nlme/man/intervals.html" class="external-link">nlme::intervals()</a></code>, <code><a href="https://rdrr.io/pkg/nlme/man/anova.lme.html" class="external-link">nlme::anova.lme()</a></code> and <code><a href="https://rdrr.io/pkg/nlme/man/coef.lme.html" class="external-link">nlme::coef.lme()</a></code>.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><code><a href="nlme.html">nlme_function()</a></code>, <a href="plot.mixed.mmkin.html">plot.mixed.mmkin</a>, <a href="summary.nlme.mmkin.html">summary.nlme.mmkin</a></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><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" class="external-link">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" class="external-link">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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <span class="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" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</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></span></span> +<span class="r-in"><span> <span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://svn.r-project.org/R-packages/trunk/nlme/" class="external-link">nlme</a></span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">f_nlme_sfo</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f</span><span class="op">[</span><span class="st">"SFO"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">f_nlme_dfop</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f</span><span class="op">[</span><span class="st">"DFOP"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_nlme_sfo</span>, <span class="va">f_nlme_dfop</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Model df AIC BIC logLik Test L.Ratio p-value</span> +<span class="r-out co"><span class="r-pr">#></span> f_nlme_sfo 1 5 625.0539 637.5529 -307.5269 </span> +<span class="r-out co"><span class="r-pr">#></span> f_nlme_dfop 2 9 495.1270 517.6253 -238.5635 1 vs 2 137.9269 <.0001</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">f_nlme_dfop</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Kinetic nonlinear mixed-effects model fit by maximum likelihood</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Structural model:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> +<span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> +<span class="r-out co"><span class="r-pr">#></span> * parent</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 90 observations of 1 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Log-likelihood: -238.6</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed effects:</span> +<span class="r-out co"><span class="r-pr">#></span> list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) </span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k1 log_k2 g_qlogis </span> +<span class="r-out co"><span class="r-pr">#></span> 94.1702 -1.8002 -4.1474 0.0324 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> Formula: list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1)</span> +<span class="r-out co"><span class="r-pr">#></span> Level: ds</span> +<span class="r-out co"><span class="r-pr">#></span> Structure: Diagonal</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k1 log_k2 g_qlogis Residual</span> +<span class="r-out co"><span class="r-pr">#></span> StdDev: 2.488 0.8447 1.33 0.4652 2.321</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_nlme_dfop</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="nlme.mmkin-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="fu"><a href="endpoints.html">endpoints</a></span><span class="op">(</span><span class="va">f_nlme_dfop</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back DT50_k1 DT50_k2</span> +<span class="r-out co"><span class="r-pr">#></span> parent 10.79857 100.7937 30.34192 4.193937 43.85442</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="va">ds_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><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" class="external-link">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></span> +<span class="r-in"><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, 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></span> +<span class="r-in"><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, 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></span> +<span class="r-in"><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><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" class="external-link">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></span> +<span class="r-in"><span> <span class="st">"SFO-SFO-ff"</span> <span class="op">=</span> <span class="va">m_sfo_sfo_ff</span>,</span></span> +<span class="r-in"><span> <span class="st">"DFOP-SFO"</span> <span class="op">=</span> <span class="va">m_dfop_sfo</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">ds_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <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" class="external-link">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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_nlme_sfo_sfo</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="nlme.mmkin-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># With formation fractions this does not coverge with defaults</span></span></span> +<span class="r-in"><span> <span class="co"># f_nlme_sfo_sfo_ff <- nlme(f_2["SFO-SFO-ff", ])</span></span></span> +<span class="r-in"><span> <span class="co">#plot(f_nlme_sfo_sfo_ff)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># For the following, we need to increase pnlsMaxIter and the tolerance</span></span></span> +<span class="r-in"><span> <span class="co"># to get convergence</span></span></span> +<span class="r-in"><span> <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" class="external-link">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>,</span></span> +<span class="r-in"><span> control <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_nlme_dfop_sfo</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="nlme.mmkin-3.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_nlme_dfop_sfo</span>, <span class="va">f_nlme_sfo_sfo</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Model df AIC BIC logLik Test L.Ratio p-value</span> +<span class="r-out co"><span class="r-pr">#></span> f_nlme_dfop_sfo 1 13 843.8547 884.620 -408.9273 </span> +<span class="r-out co"><span class="r-pr">#></span> f_nlme_sfo_sfo 2 9 1085.1821 1113.404 -533.5910 1 vs 2 249.3274 <.0001</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <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></span></span> +<span class="r-out co"><span class="r-pr">#></span> $ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_sink parent_A1 A1_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 0.5912432 0.4087568 1.0000000 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> parent 19.13518 63.5657</span> +<span class="r-out co"><span class="r-pr">#></span> A1 66.02155 219.3189</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span> <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></span></span> +<span class="r-out co"><span class="r-pr">#></span> $ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_A1 parent_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 0.2768574 0.7231426 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back DT50_k1 DT50_k2</span> +<span class="r-out co"><span class="r-pr">#></span> parent 11.07091 104.6320 31.49737 4.462383 46.20825</span> +<span class="r-out co"><span class="r-pr">#></span> A1 162.30550 539.1672 NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="fu">findFunction</span><span class="op">(</span><span class="st">"varConstProp"</span><span class="op">)</span><span class="op">)</span> <span class="op">></span> <span class="fl">0</span><span class="op">)</span> <span class="op">{</span> <span class="co"># tc error model for nlme available</span></span></span> +<span class="r-in"><span> <span class="co"># Attempts to fit metabolite kinetics with the tc error model are possible,</span></span></span> +<span class="r-in"><span> <span class="co"># but need tweeking of control values and sometimes do not converge</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="va">f_tc</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" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</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>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">f_nlme_sfo_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f_tc</span><span class="op">[</span><span class="st">"SFO"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">f_nlme_dfop_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f_tc</span><span class="op">[</span><span class="st">"DFOP"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">AIC</a></span><span class="op">(</span><span class="va">f_nlme_sfo</span>, <span class="va">f_nlme_sfo_tc</span>, <span class="va">f_nlme_dfop</span>, <span class="va">f_nlme_dfop_tc</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">f_nlme_dfop_tc</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="op">}</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Kinetic nonlinear mixed-effects model fit by maximum likelihood</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Structural model:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> +<span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> +<span class="r-out co"><span class="r-pr">#></span> * parent</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 90 observations of 1 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Log-likelihood: -238.4</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed effects:</span> +<span class="r-out co"><span class="r-pr">#></span> list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1) </span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k1 log_k2 g_qlogis </span> +<span class="r-out co"><span class="r-pr">#></span> 94.04774 -1.82340 -4.16716 0.05685 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> Formula: list(parent_0 ~ 1, log_k1 ~ 1, log_k2 ~ 1, g_qlogis ~ 1)</span> +<span class="r-out co"><span class="r-pr">#></span> Level: ds</span> +<span class="r-out co"><span class="r-pr">#></span> Structure: Diagonal</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k1 log_k2 g_qlogis Residual</span> +<span class="r-out co"><span class="r-pr">#></span> StdDev: 2.474 0.85 1.337 0.4659 1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance function:</span> +<span class="r-out co"><span class="r-pr">#></span> Structure: Constant plus proportion of variance covariate</span> +<span class="r-out co"><span class="r-pr">#></span> Formula: ~fitted(.) </span> +<span class="r-out co"><span class="r-pr">#></span> Parameter estimates:</span> +<span class="r-out co"><span class="r-pr">#></span> const prop </span> +<span class="r-out co"><span class="r-pr">#></span> 2.23222933 0.01262399 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="va">f_2_obs</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_2</span>, error_model <span class="op">=</span> <span class="st">"obs"</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">f_nlme_sfo_sfo_obs</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f_2_obs</span><span class="op">[</span><span class="st">"SFO-SFO"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">f_nlme_sfo_sfo_obs</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Kinetic nonlinear mixed-effects model fit by maximum likelihood</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Structural model:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - k_parent_sink * parent - k_parent_A1 * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_A1/dt = + k_parent_A1 * parent - k_A1_sink * A1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 170 observations of 2 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Log-likelihood: -473</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed effects:</span> +<span class="r-out co"><span class="r-pr">#></span> list(parent_0 ~ 1, log_k_parent_sink ~ 1, log_k_parent_A1 ~ 1, log_k_A1_sink ~ 1) </span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent_sink log_k_parent_A1 log_k_A1_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 87.976 -3.670 -4.164 -4.645 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1, log_k_parent_A1 ~ 1, log_k_A1_sink ~ 1)</span> +<span class="r-out co"><span class="r-pr">#></span> Level: ds</span> +<span class="r-out co"><span class="r-pr">#></span> Structure: Diagonal</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent_sink log_k_parent_A1 log_k_A1_sink Residual</span> +<span class="r-out co"><span class="r-pr">#></span> StdDev: 3.992 1.777 1.055 0.4821 6.483</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance function:</span> +<span class="r-out co"><span class="r-pr">#></span> Structure: Different standard deviations per stratum</span> +<span class="r-out co"><span class="r-pr">#></span> Formula: ~1 | name </span> +<span class="r-out co"><span class="r-pr">#></span> Parameter estimates:</span> +<span class="r-out co"><span class="r-pr">#></span> parent A1 </span> +<span class="r-out co"><span class="r-pr">#></span> 1.0000000 0.2050005 </span> +<span class="r-in"><span> <span class="va">f_nlme_dfop_sfo_obs</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f_2_obs</span><span class="op">[</span><span class="st">"DFOP-SFO"</span>, <span class="op">]</span>,</span></span> +<span class="r-in"><span> control <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="va">f_2_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_2</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="co"># f_nlme_sfo_sfo_tc <- nlme(f_2_tc["SFO-SFO", ]) # No convergence with 50 iterations</span></span></span> +<span class="r-in"><span> <span class="co"># f_nlme_dfop_sfo_tc <- nlme(f_2_tc["DFOP-SFO", ],</span></span></span> +<span class="r-in"><span> <span class="co"># control = list(pnlsMaxIter = 120, tolerance = 5e-4)) # Error in X[, fmap[[nm]]] <- gradnm</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_nlme_dfop_sfo</span>, <span class="va">f_nlme_dfop_sfo_obs</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Model df AIC BIC logLik Test L.Ratio p-value</span> +<span class="r-out co"><span class="r-pr">#></span> f_nlme_dfop_sfo 1 13 843.8547 884.620 -408.9273 </span> +<span class="r-out co"><span class="r-pr">#></span> f_nlme_dfop_sfo_obs 2 14 817.5338 861.435 -394.7669 1 vs 2 28.32084 <.0001</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/nlme_data.html b/docs/dev/reference/nlme_data.html new file mode 100644 index 00000000..c1e64a4a --- /dev/null +++ b/docs/dev/reference/nlme_data.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/nlme.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/nlme.html"> + </head> +</html> + diff --git a/docs/dev/reference/nobs.mkinfit.html b/docs/dev/reference/nobs.mkinfit.html new file mode 100644 index 00000000..809dafaf --- /dev/null +++ b/docs/dev/reference/nobs.mkinfit.html @@ -0,0 +1,109 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Number of observations on which an mkinfit object was fitted — nobs.mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Number of observations on which an mkinfit object was fitted — nobs.mkinfit"><meta name="description" content="Number of observations on which an mkinfit object was fitted"><meta property="og:description" content="Number of observations on which an mkinfit object was fitted"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Number of observations on which an mkinfit object was fitted</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/nobs.mkinfit.R" class="external-link"><code>R/nobs.mkinfit.R</code></a></small> + <div class="d-none name"><code>nobs.mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Number of observations on which an mkinfit object was fitted</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/nobs.html" class="external-link">nobs</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An mkinfit object</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>For compatibility with the generic method</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The number of rows in the data included in the mkinfit object</p> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/parms.html b/docs/dev/reference/parms.html new file mode 100644 index 00000000..71a8737f --- /dev/null +++ b/docs/dev/reference/parms.html @@ -0,0 +1,250 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Extract model parameters — parms • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Extract model parameters — parms"><meta name="description" content="This function returns degradation model parameters as well as error +model parameters per default, in order to avoid working with a fitted model +without considering the error structure that was assumed for the fit."><meta property="og:description" content="This function returns degradation model parameters as well as error +model parameters per default, in order to avoid working with a fitted model +without considering the error structure that was assumed for the fit."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Extract model parameters</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parms.R" class="external-link"><code>R/parms.R</code></a>, <a href="https://github.com/jranke/mkin/blob/HEAD/R/saem.R" class="external-link"><code>R/saem.R</code></a></small> + <div class="d-none name"><code>parms.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function returns degradation model parameters as well as error +model parameters per default, in order to avoid working with a fitted model +without considering the error structure that was assumed for the fit.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">parms</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mkinfit'</span></span> +<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>, errparms <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<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>, errparms <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'multistart'</span></span> +<span><span class="fu">parms</span><span class="op">(</span><span class="va">object</span>, exclude_failed <span class="op">=</span> <span class="cn">TRUE</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'saem.mmkin'</span></span> +<span><span class="fu">parms</span><span class="op">(</span><span class="va">object</span>, ci <span class="op">=</span> <span class="cn">FALSE</span>, covariates <span class="op">=</span> <span class="cn">NULL</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>A fitted model object.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used</p></dd> + + +<dt id="arg-transformed">transformed<a class="anchor" aria-label="anchor" href="#arg-transformed"></a></dt> +<dd><p>Should the parameters be returned as used internally +during the optimisation?</p></dd> + + +<dt id="arg-errparms">errparms<a class="anchor" aria-label="anchor" href="#arg-errparms"></a></dt> +<dd><p>Should the error model parameters be returned +in addition to the degradation parameters?</p></dd> + + +<dt id="arg-exclude-failed">exclude_failed<a class="anchor" aria-label="anchor" href="#arg-exclude-failed"></a></dt> +<dd><p>For <a href="multistart.html">multistart</a> objects, should rows for failed fits +be removed from the returned parameter matrix?</p></dd> + + +<dt id="arg-ci">ci<a class="anchor" aria-label="anchor" href="#arg-ci"></a></dt> +<dd><p>Should a matrix with estimates and confidence interval boundaries +be returned? If FALSE (default), a vector of estimates is returned if no +covariates are given, otherwise a matrix of estimates is returned, with +each column corresponding to a row of the data frame holding the covariates</p></dd> + + +<dt id="arg-covariates">covariates<a class="anchor" aria-label="anchor" href="#arg-covariates"></a></dt> +<dd><p>A data frame holding covariate values for which to +return parameter values. Only has an effect if 'ci' is FALSE.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>Depending on the object, a numeric vector of fitted model parameters, +a matrix (e.g. for mmkin row objects), or a list of matrices (e.g. for +mmkin objects with more than one row).</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><a href="saem.html">saem</a>, <a href="multistart.html">multistart</a></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># mkinfit objects</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="fu">parms</span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 k_parent sigma </span> +<span class="r-out co"><span class="r-pr">#></span> 82.4921598 0.3060633 4.6730124 </span> +<span class="r-in"><span><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></span></span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent sigma </span> +<span class="r-out co"><span class="r-pr">#></span> 82.492160 -1.183963 4.673012 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># mmkin objects</span></span></span> +<span class="r-in"><span><span class="va">ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><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" class="external-link">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" class="external-link">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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">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></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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" class="external-link">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></span></span> +<span class="r-in"><span><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></span></span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673</span> +<span class="r-in"><span><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></span></span> +<span class="r-out co"><span class="r-pr">#></span> $SFO</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 82.666781678</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.009647805</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 7.040168584</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $FOMC</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 92.6837649</span> +<span class="r-out co"><span class="r-pr">#></span> alpha 0.4967832</span> +<span class="r-out co"><span class="r-pr">#></span> beta 14.1451255</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.9167519</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $DFOP</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 91.058971584</span> +<span class="r-out co"><span class="r-pr">#></span> k1 0.044946770</span> +<span class="r-out co"><span class="r-pr">#></span> k2 0.002868336</span> +<span class="r-out co"><span class="r-pr">#></span> g 0.526942414</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.221302196</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span><span class="fu">parms</span><span class="op">(</span><span class="va">fits</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $SFO</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $FOMC</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481458</span> +<span class="r-out co"><span class="r-pr">#></span> alpha 1.338667 0.4967832 1.639099 1.074460 0.2805272</span> +<span class="r-out co"><span class="r-pr">#></span> beta 13.033315 14.1451255 5.007077 4.397126 6.9052224</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.847671 1.9167519 1.066063 3.146056 1.6222778</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $DFOP</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 96.55213663 91.058971584 90.34509493 98.14858820 94.311323735</span> +<span class="r-out co"><span class="r-pr">#></span> k1 0.21954588 0.044946770 0.41232288 0.31697588 0.080663857</span> +<span class="r-out co"><span class="r-pr">#></span> k2 0.02957934 0.002868336 0.07581766 0.03260384 0.003425417</span> +<span class="r-out co"><span class="r-pr">#></span> g 0.44845068 0.526942414 0.66091967 0.65322767 0.342652880</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.35690468 2.221302196 1.34169076 2.87159846 1.942067831</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span><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></span></span> +<span class="r-out co"><span class="r-pr">#></span> $SFO</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 88.522754 82.666782 86.854731 91.777931 82.148095</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent -2.848234 -4.641025 -1.559232 -2.093737 -4.933090</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.152745 7.040169 3.676964 6.466923 6.504577</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $FOMC</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 95.5585751 92.6837649 90.7197870 98.38393898 94.848146</span> +<span class="r-out co"><span class="r-pr">#></span> log_alpha 0.2916741 -0.6996015 0.4941466 0.07181816 -1.271085</span> +<span class="r-out co"><span class="r-pr">#></span> log_beta 2.5675088 2.6493701 1.6108523 1.48095106 1.932278</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.8476712 1.9167519 1.0660627 3.14605557 1.622278</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $DFOP</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 96.5521366 91.0589716 90.3450949 98.1485882 94.3113237</span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 -1.5161940 -3.1022764 -0.8859486 -1.1489296 -2.5174647</span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 -3.5206791 -5.8540232 -2.5794240 -3.4233253 -5.6765322</span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.2069326 0.1078741 0.6673953 0.6332573 -0.6514943</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.3569047 2.2213022 1.3416908 2.8715985 1.9420678</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/parms.mkinfit.html b/docs/dev/reference/parms.mkinfit.html new file mode 100644 index 00000000..fee7b266 --- /dev/null +++ b/docs/dev/reference/parms.mkinfit.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/parms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/parms.html"> + </head> +</html> + diff --git a/docs/dev/reference/parms.mmkin.html b/docs/dev/reference/parms.mmkin.html new file mode 100644 index 00000000..fee7b266 --- /dev/null +++ b/docs/dev/reference/parms.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/parms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/parms.html"> + </head> +</html> + diff --git a/docs/dev/reference/parms.multistart.html b/docs/dev/reference/parms.multistart.html new file mode 100644 index 00000000..fee7b266 --- /dev/null +++ b/docs/dev/reference/parms.multistart.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/parms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/parms.html"> + </head> +</html> + diff --git a/docs/dev/reference/parms.saem.mmkin.html b/docs/dev/reference/parms.saem.mmkin.html new file mode 100644 index 00000000..fee7b266 --- /dev/null +++ b/docs/dev/reference/parms.saem.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/parms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/parms.html"> + </head> +</html> + diff --git a/docs/dev/reference/parplot.html b/docs/dev/reference/parplot.html new file mode 100644 index 00000000..4a11710f --- /dev/null +++ b/docs/dev/reference/parplot.html @@ -0,0 +1,161 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot parameter variability of multistart objects — parplot • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot parameter variability of multistart objects — parplot"><meta name="description" content="Produces a boxplot with all parameters from the multiple runs, scaled +either by the parameters of the run with the highest likelihood, +or by their medians as proposed in the paper by Duchesne et al. (2021)."><meta property="og:description" content="Produces a boxplot with all parameters from the multiple runs, scaled +either by the parameters of the run with the highest likelihood, +or by their medians as proposed in the paper by Duchesne et al. (2021)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Plot parameter variability of multistart objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/parplot.R" class="external-link"><code>R/parplot.R</code></a></small> + <div class="d-none name"><code>parplot.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Produces a boxplot with all parameters from the multiple runs, scaled +either by the parameters of the run with the highest likelihood, +or by their medians as proposed in the paper by Duchesne et al. (2021).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">parplot</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'multistart.saem.mmkin'</span></span> +<span><span class="fu">parplot</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> llmin <span class="op">=</span> <span class="op">-</span><span class="cn">Inf</span>,</span> +<span> llquant <span class="op">=</span> <span class="cn">NA</span>,</span> +<span> scale <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"best"</span>, <span class="st">"median"</span><span class="op">)</span>,</span> +<span> lpos <span class="op">=</span> <span class="st">"bottomleft"</span>,</span> +<span> main <span class="op">=</span> <span class="st">""</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>The <a href="multistart.html">multistart</a> object</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Passed to <a href="https://rdrr.io/r/graphics/boxplot.html" class="external-link">boxplot</a></p></dd> + + +<dt id="arg-llmin">llmin<a class="anchor" aria-label="anchor" href="#arg-llmin"></a></dt> +<dd><p>The minimum likelihood of objects to be shown</p></dd> + + +<dt id="arg-llquant">llquant<a class="anchor" aria-label="anchor" href="#arg-llquant"></a></dt> +<dd><p>Fractional value for selecting only the fits with higher +likelihoods. Overrides 'llmin'.</p></dd> + + +<dt id="arg-scale">scale<a class="anchor" aria-label="anchor" href="#arg-scale"></a></dt> +<dd><p>By default, scale parameters using the best +available fit. +If 'median', parameters are scaled using the median parameters from all fits.</p></dd> + + +<dt id="arg-lpos">lpos<a class="anchor" aria-label="anchor" href="#arg-lpos"></a></dt> +<dd><p>Positioning of the legend.</p></dd> + + +<dt id="arg-main">main<a class="anchor" aria-label="anchor" href="#arg-main"></a></dt> +<dd><p>Title of the plot</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>Starting values of degradation model parameters and error model parameters +are shown as green circles. The results obtained in the original run +are shown as red circles.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Duchesne R, Guillemin A, Gandrillon O, Crauste F. Practical +identifiability in the frame of nonlinear mixed effects models: the example +of the in vitro erythropoiesis. BMC Bioinformatics. 2021 Oct 4;22(1):478. +doi: 10.1186/s12859-021-04373-4.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><a href="multistart.html">multistart</a></p></div> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/parplot.multistart.saem.mmkin.html b/docs/dev/reference/parplot.multistart.saem.mmkin.html new file mode 100644 index 00000000..d795c84e --- /dev/null +++ b/docs/dev/reference/parplot.multistart.saem.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/parplot.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/parplot.html"> + </head> +</html> + diff --git a/docs/dev/reference/plot.mixed.mmkin-1.png b/docs/dev/reference/plot.mixed.mmkin-1.png Binary files differnew file mode 100644 index 00000000..61b47f93 --- /dev/null +++ b/docs/dev/reference/plot.mixed.mmkin-1.png diff --git a/docs/dev/reference/plot.mixed.mmkin-2.png b/docs/dev/reference/plot.mixed.mmkin-2.png Binary files differnew file mode 100644 index 00000000..9229163a --- /dev/null +++ b/docs/dev/reference/plot.mixed.mmkin-2.png diff --git a/docs/dev/reference/plot.mixed.mmkin-3.png b/docs/dev/reference/plot.mixed.mmkin-3.png Binary files differnew file mode 100644 index 00000000..749efd4b --- /dev/null +++ b/docs/dev/reference/plot.mixed.mmkin-3.png diff --git a/docs/dev/reference/plot.mixed.mmkin-4.png b/docs/dev/reference/plot.mixed.mmkin-4.png Binary files differnew file mode 100644 index 00000000..336a80de --- /dev/null +++ b/docs/dev/reference/plot.mixed.mmkin-4.png diff --git a/docs/dev/reference/plot.mixed.mmkin.html b/docs/dev/reference/plot.mixed.mmkin.html new file mode 100644 index 00000000..06afd21f --- /dev/null +++ b/docs/dev/reference/plot.mixed.mmkin.html @@ -0,0 +1,294 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object — plot.mixed.mmkin"><meta name="description" content="Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object"><meta property="og:description" content="Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/plot.mixed.mmkin.R" class="external-link"><code>R/plot.mixed.mmkin.R</code></a></small> + <div class="d-none name"><code>plot.mixed.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mixed.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span></span> +<span> <span class="va">x</span>,</span> +<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" class="external-link">ncol</a></span><span class="op">(</span><span class="va">x</span><span class="op">$</span><span class="va">mmkin</span><span class="op">)</span>,</span> +<span> obs_vars <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">x</span><span class="op">$</span><span class="va">mkinmod</span><span class="op">$</span><span class="va">map</span><span class="op">)</span>,</span> +<span> standardized <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> covariates <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> covariate_quantiles <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.5</span>, <span class="fl">0.05</span>, <span class="fl">0.95</span><span class="op">)</span>,</span> +<span> xlab <span class="op">=</span> <span class="st">"Time"</span>,</span> +<span> xlim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/range.html" class="external-link">range</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="va">time</span><span class="op">)</span>,</span> +<span> resplot <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"predicted"</span>, <span class="st">"time"</span><span class="op">)</span>,</span> +<span> pop_curves <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> pred_over <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> test_log_parms <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> conf.level <span class="op">=</span> <span class="fl">0.6</span>,</span> +<span> default_log_parms <span class="op">=</span> <span class="cn">NA</span>,</span> +<span> ymax <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> maxabs <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> ncol.legend <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">i</span><span class="op">)</span> <span class="op"><=</span> <span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">i</span><span class="op">)</span> <span class="op">+</span> <span class="fl">1</span>, <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">i</span><span class="op">)</span> <span class="op"><=</span> <span class="fl">8</span>, <span class="fl">3</span>, <span class="fl">4</span><span class="op">)</span><span class="op">)</span>,</span> +<span> nrow.legend <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">ceiling</a></span><span class="op">(</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">i</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">ncol.legend</span><span class="op">)</span>,</span> +<span> rel.height.legend <span class="op">=</span> <span class="fl">0.02</span> <span class="op">+</span> <span class="fl">0.07</span> <span class="op">*</span> <span class="va">nrow.legend</span>,</span> +<span> rel.height.bottom <span class="op">=</span> <span class="fl">1.1</span>,</span> +<span> pch_ds <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span><span class="op">:</span><span class="fl">25</span>, <span class="fl">33</span>, <span class="fl">35</span><span class="op">:</span><span class="fl">38</span>, <span class="fl">40</span><span class="op">:</span><span class="fl">41</span>, <span class="fl">47</span><span class="op">:</span><span class="fl">57</span>, <span class="fl">60</span><span class="op">:</span><span class="fl">90</span><span class="op">)</span><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" class="external-link">length</a></span><span class="op">(</span><span class="va">i</span><span class="op">)</span><span class="op">]</span>,</span> +<span> col_ds <span class="op">=</span> <span class="va">pch_ds</span> <span class="op">+</span> <span class="fl">1</span>,</span> +<span> lty_ds <span class="op">=</span> <span class="va">col_ds</span>,</span> +<span> frame <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An object of class <a href="mixed.html">mixed.mmkin</a>, <a href="saem.html">saem.mmkin</a> or <a href="nlme.mmkin.html">nlme.mmkin</a></p></dd> + + +<dt id="arg-i">i<a class="anchor" aria-label="anchor" href="#arg-i"></a></dt> +<dd><p>A numeric index to select datasets for which to plot the individual predictions, +in case plots get too large</p></dd> + + +<dt id="arg-obs-vars">obs_vars<a class="anchor" aria-label="anchor" href="#arg-obs-vars"></a></dt> +<dd><p>A character vector of names of the observed variables for +which the data and the model should be plotted. Defauls to all observed +variables in the model.</p></dd> + + +<dt id="arg-standardized">standardized<a class="anchor" aria-label="anchor" href="#arg-standardized"></a></dt> +<dd><p>Should the residuals be standardized? Only takes effect if +<code>resplot = "time"</code>.</p></dd> + + +<dt id="arg-covariates">covariates<a class="anchor" aria-label="anchor" href="#arg-covariates"></a></dt> +<dd><p>Data frame with covariate values for all variables in +any covariate models in the object. If given, it overrides 'covariate_quantiles'. +Each line in the data frame will result in a line drawn for the population. +Rownames are used in the legend to label the lines.</p></dd> + + +<dt id="arg-covariate-quantiles">covariate_quantiles<a class="anchor" aria-label="anchor" href="#arg-covariate-quantiles"></a></dt> +<dd><p>This argument only has an effect if the fitted +object has covariate models. If so, the default is to show three population +curves, for the 5th percentile, the 50th percentile and the 95th percentile +of the covariate values used for fitting the model.</p></dd> + + +<dt id="arg-xlab">xlab<a class="anchor" aria-label="anchor" href="#arg-xlab"></a></dt> +<dd><p>Label for the x axis.</p></dd> + + +<dt id="arg-xlim">xlim<a class="anchor" aria-label="anchor" href="#arg-xlim"></a></dt> +<dd><p>Plot range in x direction.</p></dd> + + +<dt id="arg-resplot">resplot<a class="anchor" aria-label="anchor" href="#arg-resplot"></a></dt> +<dd><p>Should the residuals plotted against time or against +predicted values?</p></dd> + + +<dt id="arg-pop-curves">pop_curves<a class="anchor" aria-label="anchor" href="#arg-pop-curves"></a></dt> +<dd><p>Per default, one population curve is drawn in case +population parameters are fitted by the model, e.g. for saem objects. +In case there is a covariate model, the behaviour depends on the value +of 'covariates'</p></dd> + + +<dt id="arg-pred-over">pred_over<a class="anchor" aria-label="anchor" href="#arg-pred-over"></a></dt> +<dd><p>Named list of alternative predictions as obtained +from <a href="mkinpredict.html">mkinpredict</a> with a compatible <a href="mkinmod.html">mkinmod</a>.</p></dd> + + +<dt id="arg-test-log-parms">test_log_parms<a class="anchor" aria-label="anchor" href="#arg-test-log-parms"></a></dt> +<dd><p>Passed to <a href="mean_degparms.html">mean_degparms</a> in the case of an +<a href="mixed.html">mixed.mmkin</a> object</p></dd> + + +<dt id="arg-conf-level">conf.level<a class="anchor" aria-label="anchor" href="#arg-conf-level"></a></dt> +<dd><p>Passed to <a href="mean_degparms.html">mean_degparms</a> in the case of an +<a href="mixed.html">mixed.mmkin</a> object</p></dd> + + +<dt id="arg-default-log-parms">default_log_parms<a class="anchor" aria-label="anchor" href="#arg-default-log-parms"></a></dt> +<dd><p>Passed to <a href="mean_degparms.html">mean_degparms</a> in the case of an +<a href="mixed.html">mixed.mmkin</a> object</p></dd> + + +<dt id="arg-ymax">ymax<a class="anchor" aria-label="anchor" href="#arg-ymax"></a></dt> +<dd><p>Vector of maximum y axis values</p></dd> + + +<dt id="arg-maxabs">maxabs<a class="anchor" aria-label="anchor" href="#arg-maxabs"></a></dt> +<dd><p>Maximum absolute value of the residuals. This is used for the +scaling of the y axis and defaults to "auto".</p></dd> + + +<dt id="arg-ncol-legend">ncol.legend<a class="anchor" aria-label="anchor" href="#arg-ncol-legend"></a></dt> +<dd><p>Number of columns to use in the legend</p></dd> + + +<dt id="arg-nrow-legend">nrow.legend<a class="anchor" aria-label="anchor" href="#arg-nrow-legend"></a></dt> +<dd><p>Number of rows to use in the legend</p></dd> + + +<dt id="arg-rel-height-legend">rel.height.legend<a class="anchor" aria-label="anchor" href="#arg-rel-height-legend"></a></dt> +<dd><p>The relative height of the legend shown on top</p></dd> + + +<dt id="arg-rel-height-bottom">rel.height.bottom<a class="anchor" aria-label="anchor" href="#arg-rel-height-bottom"></a></dt> +<dd><p>The relative height of the bottom plot row</p></dd> + + +<dt id="arg-pch-ds">pch_ds<a class="anchor" aria-label="anchor" href="#arg-pch-ds"></a></dt> +<dd><p>Symbols to be used for plotting the data.</p></dd> + + +<dt id="arg-col-ds">col_ds<a class="anchor" aria-label="anchor" href="#arg-col-ds"></a></dt> +<dd><p>Colors used for plotting the observed data and the +corresponding model prediction lines for the different datasets.</p></dd> + + +<dt id="arg-lty-ds">lty_ds<a class="anchor" aria-label="anchor" href="#arg-lty-ds"></a></dt> +<dd><p>Line types to be used for the model predictions.</p></dd> + + +<dt id="arg-frame">frame<a class="anchor" aria-label="anchor" href="#arg-frame"></a></dt> +<dd><p>Should a frame be drawn around the plots?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments passed to <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The function is called for its side effect.</p> + </div> + <div class="section level2"> + <h2 id="note">Note<a class="anchor" aria-label="anchor" href="#note"></a></h2> + <p>Covariate models are currently only supported for saem.mmkin objects.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><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" class="external-link">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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="st">"ds "</span>, <span class="fl">6</span><span class="op">:</span><span class="fl">10</span><span class="op">)</span></span></span> +<span class="r-in"><span><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"DFOP-SFO"</span> <span class="op">=</span> <span class="va">dfop_sfo</span><span class="op">)</span>, <span class="va">ds</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f</span><span class="op">[</span>, <span class="fl">3</span><span class="op">:</span><span class="fl">4</span><span class="op">]</span>, standardized <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mixed.mmkin-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># For this fit we need to increase pnlsMaxiter, and we increase the</span></span></span> +<span class="r-in"><span><span class="co"># tolerance in order to speed up the fit for this example evaluation</span></span></span> +<span class="r-in"><span><span class="co"># It still takes 20 seconds to run</span></span></span> +<span class="r-in"><span><span class="va">f_nlme</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f</span>, control <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>pnlsMaxIter <span class="op">=</span> <span class="fl">120</span>, tolerance <span class="op">=</span> <span class="fl">1e-3</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_nlme</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mixed.mmkin-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">f_saem</span> <span class="op"><-</span> <span class="fu"><a href="saem.html">saem</a></span><span class="op">(</span><span class="va">f</span>, transformations <span class="op">=</span> <span class="st">"saemix"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mixed.mmkin-3.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">f_obs</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" class="external-link">list</a></span><span class="op">(</span><span class="st">"DFOP-SFO"</span> <span class="op">=</span> <span class="va">dfop_sfo</span><span class="op">)</span>, <span class="va">ds</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></span> +<span class="r-in"><span><span class="va">f_nlmix</span> <span class="op"><-</span> <span class="fu">nlmix</span><span class="op">(</span><span class="va">f_obs</span><span class="op">)</span></span></span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error in nlmix(f_obs):</span> could not find function "nlmix"</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_nlmix</span><span class="op">)</span></span></span> +<span class="r-err co"><span class="r-pr">#></span> <span class="error">Error:</span> object 'f_nlmix' not found</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># We can overlay the two variants if we generate predictions</span></span></span> +<span class="r-in"><span><span class="va">pred_nlme</span> <span class="op"><-</span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">dfop_sfo</span>,</span></span> +<span class="r-in"><span> <span class="va">f_nlme</span><span class="op">$</span><span class="va">bparms.optim</span><span class="op">[</span><span class="op">-</span><span class="fl">1</span><span class="op">]</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="va">f_nlme</span><span class="op">$</span><span class="va">bparms.optim</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span>, A1 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq</a></span><span class="op">(</span><span class="fl">0</span>, <span class="fl">180</span>, by <span class="op">=</span> <span class="fl">0.2</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem</span>, pred_over <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>nlme <span class="op">=</span> <span class="va">pred_nlme</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mixed.mmkin-4.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/plot.mkinfit-1.png b/docs/dev/reference/plot.mkinfit-1.png Binary files differnew file mode 100644 index 00000000..0a120916 --- /dev/null +++ b/docs/dev/reference/plot.mkinfit-1.png diff --git a/docs/dev/reference/plot.mkinfit-2.png b/docs/dev/reference/plot.mkinfit-2.png Binary files differnew file mode 100644 index 00000000..d3a39657 --- /dev/null +++ b/docs/dev/reference/plot.mkinfit-2.png diff --git a/docs/dev/reference/plot.mkinfit-3.png b/docs/dev/reference/plot.mkinfit-3.png Binary files differnew file mode 100644 index 00000000..3a74e51e --- /dev/null +++ b/docs/dev/reference/plot.mkinfit-3.png diff --git a/docs/dev/reference/plot.mkinfit-4.png b/docs/dev/reference/plot.mkinfit-4.png Binary files differnew file mode 100644 index 00000000..0027f3eb --- /dev/null +++ b/docs/dev/reference/plot.mkinfit-4.png diff --git a/docs/dev/reference/plot.mkinfit-5.png b/docs/dev/reference/plot.mkinfit-5.png Binary files differnew file mode 100644 index 00000000..9112cbb9 --- /dev/null +++ b/docs/dev/reference/plot.mkinfit-5.png diff --git a/docs/dev/reference/plot.mkinfit-6.png b/docs/dev/reference/plot.mkinfit-6.png Binary files differnew file mode 100644 index 00000000..6127d2f7 --- /dev/null +++ b/docs/dev/reference/plot.mkinfit-6.png diff --git a/docs/dev/reference/plot.mkinfit-7.png b/docs/dev/reference/plot.mkinfit-7.png Binary files differnew file mode 100644 index 00000000..2b92c212 --- /dev/null +++ b/docs/dev/reference/plot.mkinfit-7.png diff --git a/docs/dev/reference/plot.mkinfit.html b/docs/dev/reference/plot.mkinfit.html new file mode 100644 index 00000000..ffebd25d --- /dev/null +++ b/docs/dev/reference/plot.mkinfit.html @@ -0,0 +1,321 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit"><meta name="description" content="Solves the differential equations with the optimised and fixed parameters +from a previous successful call to mkinfit and plots the +observed data together with the solution of the fitted model."><meta property="og:description" content="Solves the differential equations with the optimised and fixed parameters +from a previous successful call to mkinfit and plots the +observed data together with the solution of the fitted model."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/plot.mkinfit.R" class="external-link"><code>R/plot.mkinfit.R</code></a></small> + <div class="d-none name"><code>plot.mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Solves the differential equations with the optimised and fixed parameters +from a previous successful call to <code><a href="mkinfit.html">mkinfit</a></code> and plots the +observed data together with the solution of the fitted model.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span></span> +<span> <span class="va">x</span>,</span> +<span> fit <span class="op">=</span> <span class="va">x</span>,</span> +<span> obs_vars <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">fit</span><span class="op">$</span><span class="va">mkinmod</span><span class="op">$</span><span class="va">map</span><span class="op">)</span>,</span> +<span> xlab <span class="op">=</span> <span class="st">"Time"</span>,</span> +<span> ylab <span class="op">=</span> <span class="st">"Residue"</span>,</span> +<span> xlim <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/range.html" class="external-link">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>,</span> +<span> ylim <span class="op">=</span> <span class="st">"default"</span>,</span> +<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" class="external-link">length</a></span><span class="op">(</span><span class="va">obs_vars</span><span class="op">)</span>,</span> +<span> pch_obs <span class="op">=</span> <span class="va">col_obs</span>,</span> +<span> lty_obs <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="va">obs_vars</span><span class="op">)</span><span class="op">)</span>,</span> +<span> add <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> legend <span class="op">=</span> <span class="op">!</span><span class="va">add</span>,</span> +<span> show_residuals <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> show_errplot <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> maxabs <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> sep_obs <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> rel.height.middle <span class="op">=</span> <span class="fl">0.9</span>,</span> +<span> row_layout <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> lpos <span class="op">=</span> <span class="st">"topright"</span>,</span> +<span> inset <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">0.05</span>, <span class="fl">0.05</span><span class="op">)</span>,</span> +<span> show_errmin <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> errmin_digits <span class="op">=</span> <span class="fl">3</span>,</span> +<span> frame <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="fu">plot_sep</span><span class="op">(</span></span> +<span> <span class="va">fit</span>,</span> +<span> show_errmin <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> show_residuals <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/identical.html" class="external-link">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> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="fu">plot_res</span><span class="op">(</span></span> +<span> <span class="va">fit</span>,</span> +<span> sep_obs <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> show_errmin <span class="op">=</span> <span class="va">sep_obs</span>,</span> +<span> standardized <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/ifelse.html" class="external-link">ifelse</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/identical.html" class="external-link">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> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>Alias for fit introduced for compatibility with the generic S3 +method.</p></dd> + + +<dt id="arg-fit">fit<a class="anchor" aria-label="anchor" href="#arg-fit"></a></dt> +<dd><p>An object of class <code><a href="mkinfit.html">mkinfit</a></code>.</p></dd> + + +<dt id="arg-obs-vars">obs_vars<a class="anchor" aria-label="anchor" href="#arg-obs-vars"></a></dt> +<dd><p>A character vector of names of the observed variables for +which the data and the model should be plotted. Defauls to all observed +variables in the model.</p></dd> + + +<dt id="arg-xlab">xlab<a class="anchor" aria-label="anchor" href="#arg-xlab"></a></dt> +<dd><p>Label for the x axis.</p></dd> + + +<dt id="arg-ylab">ylab<a class="anchor" aria-label="anchor" href="#arg-ylab"></a></dt> +<dd><p>Label for the y axis.</p></dd> + + +<dt id="arg-xlim">xlim<a class="anchor" aria-label="anchor" href="#arg-xlim"></a></dt> +<dd><p>Plot range in x direction.</p></dd> + + +<dt id="arg-ylim">ylim<a class="anchor" aria-label="anchor" href="#arg-ylim"></a></dt> +<dd><p>Plot range in y direction. If given as a list, plot ranges +for the different plot rows can be given for row layout.</p></dd> + + +<dt id="arg-col-obs">col_obs<a class="anchor" aria-label="anchor" href="#arg-col-obs"></a></dt> +<dd><p>Colors used for plotting the observed data and the +corresponding model prediction lines.</p></dd> + + +<dt id="arg-pch-obs">pch_obs<a class="anchor" aria-label="anchor" href="#arg-pch-obs"></a></dt> +<dd><p>Symbols to be used for plotting the data.</p></dd> + + +<dt id="arg-lty-obs">lty_obs<a class="anchor" aria-label="anchor" href="#arg-lty-obs"></a></dt> +<dd><p>Line types to be used for the model predictions.</p></dd> + + +<dt id="arg-add">add<a class="anchor" aria-label="anchor" href="#arg-add"></a></dt> +<dd><p>Should the plot be added to an existing plot?</p></dd> + + +<dt id="arg-legend">legend<a class="anchor" aria-label="anchor" href="#arg-legend"></a></dt> +<dd><p>Should a legend be added to the plot?</p></dd> + + +<dt id="arg-show-residuals">show_residuals<a class="anchor" aria-label="anchor" href="#arg-show-residuals"></a></dt> +<dd><p>Should residuals be shown? If only one plot of the +fits is shown, the residual plot is in the lower third of the plot. +Otherwise, i.e. if "sep_obs" is given, the residual plots will be located +to the right of the plots of the fitted curves. If this is set to +'standardized', a plot of the residuals divided by the standard deviation +given by the fitted error model will be shown.</p></dd> + + +<dt id="arg-show-errplot">show_errplot<a class="anchor" aria-label="anchor" href="#arg-show-errplot"></a></dt> +<dd><p>Should squared residuals and the error model be shown? +If only one plot of the fits is shown, this plot is in the lower third of +the plot. Otherwise, i.e. if "sep_obs" is given, the residual plots will +be located to the right of the plots of the fitted curves.</p></dd> + + +<dt id="arg-maxabs">maxabs<a class="anchor" aria-label="anchor" href="#arg-maxabs"></a></dt> +<dd><p>Maximum absolute value of the residuals. This is used for the +scaling of the y axis and defaults to "auto".</p></dd> + + +<dt id="arg-sep-obs">sep_obs<a class="anchor" aria-label="anchor" href="#arg-sep-obs"></a></dt> +<dd><p>Should the observed variables be shown in separate subplots? +If yes, residual plots requested by "show_residuals" will be shown next +to, not below the plot of the fits.</p></dd> + + +<dt id="arg-rel-height-middle">rel.height.middle<a class="anchor" aria-label="anchor" href="#arg-rel-height-middle"></a></dt> +<dd><p>The relative height of the middle plot, if more +than two rows of plots are shown.</p></dd> + + +<dt id="arg-row-layout">row_layout<a class="anchor" aria-label="anchor" href="#arg-row-layout"></a></dt> +<dd><p>Should we use a row layout where the residual plot or the +error model plot is shown to the right?</p></dd> + + +<dt id="arg-lpos">lpos<a class="anchor" aria-label="anchor" href="#arg-lpos"></a></dt> +<dd><p>Position(s) of the legend(s). Passed to <code><a href="https://rdrr.io/r/graphics/legend.html" class="external-link">legend</a></code> as +the first argument. If not length one, this should be of the same length +as the obs_var argument.</p></dd> + + +<dt id="arg-inset">inset<a class="anchor" aria-label="anchor" href="#arg-inset"></a></dt> +<dd><p>Passed to <code><a href="https://rdrr.io/r/graphics/legend.html" class="external-link">legend</a></code> if applicable.</p></dd> + + +<dt id="arg-show-errmin">show_errmin<a class="anchor" aria-label="anchor" href="#arg-show-errmin"></a></dt> +<dd><p>Should the FOCUS chi2 error value be shown in the upper +margin of the plot?</p></dd> + + +<dt id="arg-errmin-digits">errmin_digits<a class="anchor" aria-label="anchor" href="#arg-errmin-digits"></a></dt> +<dd><p>The number of significant digits for rounding the FOCUS +chi2 error percentage.</p></dd> + + +<dt id="arg-frame">frame<a class="anchor" aria-label="anchor" href="#arg-frame"></a></dt> +<dd><p>Should a frame be drawn around the plots?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments passed to <code><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></code>.</p></dd> + + +<dt id="arg-standardized">standardized<a class="anchor" aria-label="anchor" href="#arg-standardized"></a></dt> +<dd><p>When calling 'plot_res', should the residuals be +standardized in the residual plot?</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The function is called for its side effect.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>If the current plot device is a <code><a href="https://rdrr.io/pkg/tikzDevice/man/tikz.html" class="external-link">tikz</a></code> device, then +latex is being used for the formatting of the chi2 error level, if +<code>show_errmin = TRUE</code>.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># One parent compound, one metabolite, both single first order, path from</span></span></span> +<span class="r-in"><span><span class="co"># parent to sink included</span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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="mkinmod.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>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><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="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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><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="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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mkinfit-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu">plot_res</span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mkinfit-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><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></span></span> +<span class="r-plt img"><img src="plot.mkinfit-3.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu">plot_err</span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mkinfit-4.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Show the observed variables separately, with residuals</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">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" class="external-link">c</a></span><span class="op">(</span><span class="st">"topright"</span>, <span class="st">"bottomright"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> show_errmin <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mkinfit-5.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The same can be obtained with less typing, using the convenience function plot_sep</span></span></span> +<span class="r-in"><span><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" class="external-link">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></span></span> +<span class="r-plt img"><img src="plot.mkinfit-6.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Show the observed variables separately, with the error model</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">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" class="external-link">c</a></span><span class="op">(</span><span class="st">"topright"</span>, <span class="st">"bottomright"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> show_errmin <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mkinfit-7.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/plot.mmkin-1.png b/docs/dev/reference/plot.mmkin-1.png Binary files differnew file mode 100644 index 00000000..58051871 --- /dev/null +++ b/docs/dev/reference/plot.mmkin-1.png diff --git a/docs/dev/reference/plot.mmkin-2.png b/docs/dev/reference/plot.mmkin-2.png Binary files differnew file mode 100644 index 00000000..eff04808 --- /dev/null +++ b/docs/dev/reference/plot.mmkin-2.png diff --git a/docs/dev/reference/plot.mmkin-3.png b/docs/dev/reference/plot.mmkin-3.png Binary files differnew file mode 100644 index 00000000..781c6351 --- /dev/null +++ b/docs/dev/reference/plot.mmkin-3.png diff --git a/docs/dev/reference/plot.mmkin-4.png b/docs/dev/reference/plot.mmkin-4.png Binary files differnew file mode 100644 index 00000000..ffbc6cab --- /dev/null +++ b/docs/dev/reference/plot.mmkin-4.png diff --git a/docs/dev/reference/plot.mmkin-5.png b/docs/dev/reference/plot.mmkin-5.png Binary files differnew file mode 100644 index 00000000..37bbac8b --- /dev/null +++ b/docs/dev/reference/plot.mmkin-5.png diff --git a/docs/dev/reference/plot.mmkin.html b/docs/dev/reference/plot.mmkin.html new file mode 100644 index 00000000..1f7907e9 --- /dev/null +++ b/docs/dev/reference/plot.mmkin.html @@ -0,0 +1,222 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot model fits (observed and fitted) and the residuals for a row or column of an mmkin object — plot.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot model fits (observed and fitted) and the residuals for a row or column of an mmkin object — plot.mmkin"><meta name="description" content="When x is a row selected from an mmkin object ([.mmkin), 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."><meta property="og:description" content="When x is a row selected from an mmkin object ([.mmkin), 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."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><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="https://github.com/jranke/mkin/blob/HEAD/R/plot.mmkin.R" class="external-link"><code>R/plot.mmkin.R</code></a></small> + <div class="d-none name"><code>plot.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>When x is a row selected from an mmkin object (<code><a href="Extract.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> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span></span> +<span> <span class="va">x</span>,</span> +<span> main <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> legends <span class="op">=</span> <span class="fl">1</span>,</span> +<span> resplot <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"time"</span>, <span class="st">"errmod"</span><span class="op">)</span>,</span> +<span> ylab <span class="op">=</span> <span class="st">"Residue"</span>,</span> +<span> standardized <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> show_errmin <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> errmin_var <span class="op">=</span> <span class="st">"All data"</span>,</span> +<span> errmin_digits <span class="op">=</span> <span class="fl">3</span>,</span> +<span> cex <span class="op">=</span> <span class="fl">0.7</span>,</span> +<span> rel.height.middle <span class="op">=</span> <span class="fl">0.9</span>,</span> +<span> ymax <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An object of class <code><a href="mmkin.html">mmkin</a></code>, with either one row or one +column.</p></dd> + + +<dt id="arg-main">main<a class="anchor" aria-label="anchor" href="#arg-main"></a></dt> +<dd><p>The main title placed on the outer margin of the plot.</p></dd> + + +<dt id="arg-legends">legends<a class="anchor" aria-label="anchor" href="#arg-legends"></a></dt> +<dd><p>An index for the fits for which legends should be shown.</p></dd> + + +<dt id="arg-resplot">resplot<a class="anchor" aria-label="anchor" href="#arg-resplot"></a></dt> +<dd><p>Should the residuals plotted against time, using +<code><a href="mkinresplot.html">mkinresplot</a></code>, or as squared residuals against predicted +values, with the error model, using <code><a href="mkinerrplot.html">mkinerrplot</a></code>.</p></dd> + + +<dt id="arg-ylab">ylab<a class="anchor" aria-label="anchor" href="#arg-ylab"></a></dt> +<dd><p>Label for the y axis.</p></dd> + + +<dt id="arg-standardized">standardized<a class="anchor" aria-label="anchor" href="#arg-standardized"></a></dt> +<dd><p>Should the residuals be standardized? This option +is passed to <code><a href="mkinresplot.html">mkinresplot</a></code>, it only takes effect if +<code>resplot = "time"</code>.</p></dd> + + +<dt id="arg-show-errmin">show_errmin<a class="anchor" aria-label="anchor" href="#arg-show-errmin"></a></dt> +<dd><p>Should the chi2 error level be shown on top of the plots +to the left?</p></dd> + + +<dt id="arg-errmin-var">errmin_var<a class="anchor" aria-label="anchor" href="#arg-errmin-var"></a></dt> +<dd><p>The variable for which the FOCUS chi2 error value should +be shown.</p></dd> + + +<dt id="arg-errmin-digits">errmin_digits<a class="anchor" aria-label="anchor" href="#arg-errmin-digits"></a></dt> +<dd><p>The number of significant digits for rounding the FOCUS +chi2 error percentage.</p></dd> + + +<dt id="arg-cex">cex<a class="anchor" aria-label="anchor" href="#arg-cex"></a></dt> +<dd><p>Passed to the plot functions and <code><a href="https://rdrr.io/r/graphics/mtext.html" class="external-link">mtext</a></code>.</p></dd> + + +<dt id="arg-rel-height-middle">rel.height.middle<a class="anchor" aria-label="anchor" href="#arg-rel-height-middle"></a></dt> +<dd><p>The relative height of the middle plot, if more +than two rows of plots are shown.</p></dd> + + +<dt id="arg-ymax">ymax<a class="anchor" aria-label="anchor" href="#arg-ymax"></a></dt> +<dd><p>Maximum y axis value for <code><a href="plot.mkinfit.html">plot.mkinfit</a></code>.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments passed to <code><a href="plot.mkinfit.html">plot.mkinfit</a></code> and +<code><a href="mkinresplot.html">mkinresplot</a></code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The function is called for its side effect.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>If the current plot device is a <code><a href="https://rdrr.io/pkg/tikzDevice/man/tikz.html" class="external-link">tikz</a></code> device, then +latex is being used for the formatting of the chi2 error level.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <span class="co"># Only use one core not to offend CRAN checks</span></span></span> +<span class="r-in"><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" class="external-link">c</a></span><span class="op">(</span><span class="st">"FOMC"</span>, <span class="st">"HS"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"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></span></span> +<span class="r-in"><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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Optimisation did not converge:</span> +<span class="r-wrn co"><span class="r-pr">#></span> iteration limit reached without convergence (10)</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">fits</span><span class="op">[</span>, <span class="st">"FOCUS C"</span><span class="op">]</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mmkin-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">fits</span><span class="op">[</span><span class="st">"FOMC"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="plot.mmkin-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">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></span></span> +<span class="r-plt img"><img src="plot.mmkin-3.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># We can also plot a single fit, if we like the way plot.mmkin works, but then the plot</span></span></span> +<span class="r-in"><span> <span class="co"># height should be smaller than the plot width (this is not possible for the html pages</span></span></span> +<span class="r-in"><span> <span class="co"># generated by pkgdown, as far as I know).</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">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></span></span> +<span class="r-plt img"><img src="plot.mmkin-4.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># Show the error models</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">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></span></span> +<span class="r-plt img"><img src="plot.mmkin-5.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/plot.nafta.html b/docs/dev/reference/plot.nafta.html new file mode 100644 index 00000000..16bf0942 --- /dev/null +++ b/docs/dev/reference/plot.nafta.html @@ -0,0 +1,128 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Plot the results of the three models used in the NAFTA scheme. — plot.nafta • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot the results of the three models used in the NAFTA scheme. — plot.nafta"><meta name="description" content="The plots are ordered with increasing complexity of the model in this +function (SFO, then IORE, then DFOP)."><meta property="og:description" content="The plots are ordered with increasing complexity of the model in this +function (SFO, then IORE, then DFOP)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Plot the results of the three models used in the NAFTA scheme.</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/nafta.R" class="external-link"><code>R/nafta.R</code></a></small> + <div class="d-none name"><code>plot.nafta.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The plots are ordered with increasing complexity of the model in this +function (SFO, then IORE, then DFOP).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'nafta'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/graphics/plot.default.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">x</span>, legend <span class="op">=</span> <span class="cn">FALSE</span>, main <span class="op">=</span> <span class="st">"auto"</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An object of class <code><a href="nafta.html">nafta</a></code>.</p></dd> + + +<dt id="arg-legend">legend<a class="anchor" aria-label="anchor" href="#arg-legend"></a></dt> +<dd><p>Should a legend be added?</p></dd> + + +<dt id="arg-main">main<a class="anchor" aria-label="anchor" href="#arg-main"></a></dt> +<dd><p>Possibility to override the main title of the plot.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further arguments passed to <code><a href="plot.mmkin.html">plot.mmkin</a></code>.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The function is called for its side effect.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>Calls <code><a href="plot.mmkin.html">plot.mmkin</a></code>.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/plot_err.html b/docs/dev/reference/plot_err.html new file mode 100644 index 00000000..2885b160 --- /dev/null +++ b/docs/dev/reference/plot_err.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/plot.mkinfit.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/plot.mkinfit.html"> + </head> +</html> + diff --git a/docs/dev/reference/plot_res.html b/docs/dev/reference/plot_res.html new file mode 100644 index 00000000..2885b160 --- /dev/null +++ b/docs/dev/reference/plot_res.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/plot.mkinfit.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/plot.mkinfit.html"> + </head> +</html> + diff --git a/docs/dev/reference/plot_sep.html b/docs/dev/reference/plot_sep.html new file mode 100644 index 00000000..2885b160 --- /dev/null +++ b/docs/dev/reference/plot_sep.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/plot.mkinfit.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/plot.mkinfit.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.illparms.mhmkin.html b/docs/dev/reference/print.illparms.mhmkin.html new file mode 100644 index 00000000..efbcc181 --- /dev/null +++ b/docs/dev/reference/print.illparms.mhmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.illparms.mkinfit.html b/docs/dev/reference/print.illparms.mkinfit.html new file mode 100644 index 00000000..efbcc181 --- /dev/null +++ b/docs/dev/reference/print.illparms.mkinfit.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.illparms.mmkin.html b/docs/dev/reference/print.illparms.mmkin.html new file mode 100644 index 00000000..efbcc181 --- /dev/null +++ b/docs/dev/reference/print.illparms.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.illparms.saem.mmkin.html b/docs/dev/reference/print.illparms.saem.mmkin.html new file mode 100644 index 00000000..efbcc181 --- /dev/null +++ b/docs/dev/reference/print.illparms.saem.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/illparms.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.mhmkin.html b/docs/dev/reference/print.mhmkin.html new file mode 100644 index 00000000..19cc9c91 --- /dev/null +++ b/docs/dev/reference/print.mhmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mhmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mhmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.mixed.mmkin.html b/docs/dev/reference/print.mixed.mmkin.html new file mode 100644 index 00000000..7b45f95d --- /dev/null +++ b/docs/dev/reference/print.mixed.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mixed.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mixed.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.mkinds.html b/docs/dev/reference/print.mkinds.html new file mode 100644 index 00000000..69424352 --- /dev/null +++ b/docs/dev/reference/print.mkinds.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mkinds.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mkinds.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.mkindsg.html b/docs/dev/reference/print.mkindsg.html new file mode 100644 index 00000000..66f9a81d --- /dev/null +++ b/docs/dev/reference/print.mkindsg.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mkindsg.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mkindsg.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.mkinmod.html b/docs/dev/reference/print.mkinmod.html new file mode 100644 index 00000000..0ffb4f23 --- /dev/null +++ b/docs/dev/reference/print.mkinmod.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mkinmod.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mkinmod.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.mmkin.html b/docs/dev/reference/print.mmkin.html new file mode 100644 index 00000000..9ea1bd04 --- /dev/null +++ b/docs/dev/reference/print.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/mmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/mmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.multistart.html b/docs/dev/reference/print.multistart.html new file mode 100644 index 00000000..06f15f0c --- /dev/null +++ b/docs/dev/reference/print.multistart.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.nafta.html b/docs/dev/reference/print.nafta.html new file mode 100644 index 00000000..e9563e53 --- /dev/null +++ b/docs/dev/reference/print.nafta.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/nafta.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/nafta.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.nlme.mmkin.html b/docs/dev/reference/print.nlme.mmkin.html new file mode 100644 index 00000000..dc3bfe09 --- /dev/null +++ b/docs/dev/reference/print.nlme.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/nlme.mmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/nlme.mmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.saem.mmkin.html b/docs/dev/reference/print.saem.mmkin.html new file mode 100644 index 00000000..fb5a153f --- /dev/null +++ b/docs/dev/reference/print.saem.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/saem.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/saem.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.status.mhmkin.html b/docs/dev/reference/print.status.mhmkin.html new file mode 100644 index 00000000..9451cf16 --- /dev/null +++ b/docs/dev/reference/print.status.mhmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/status.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/status.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.status.mmkin.html b/docs/dev/reference/print.status.mmkin.html new file mode 100644 index 00000000..9451cf16 --- /dev/null +++ b/docs/dev/reference/print.status.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/status.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/status.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.summary.mkinfit.html b/docs/dev/reference/print.summary.mkinfit.html new file mode 100644 index 00000000..e8ff4c3c --- /dev/null +++ b/docs/dev/reference/print.summary.mkinfit.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/summary.mkinfit.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/summary.mkinfit.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.summary.mmkin.html b/docs/dev/reference/print.summary.mmkin.html new file mode 100644 index 00000000..2ec58ffd --- /dev/null +++ b/docs/dev/reference/print.summary.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/summary.mmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/summary.mmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.summary.nlme.mmkin.html b/docs/dev/reference/print.summary.nlme.mmkin.html new file mode 100644 index 00000000..b6c51558 --- /dev/null +++ b/docs/dev/reference/print.summary.nlme.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/summary.nlme.mmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/summary.nlme.mmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/print.summary.saem.mmkin.html b/docs/dev/reference/print.summary.saem.mmkin.html new file mode 100644 index 00000000..280587f2 --- /dev/null +++ b/docs/dev/reference/print.summary.saem.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/summary.saem.mmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/summary.saem.mmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/read_spreadsheet.html b/docs/dev/reference/read_spreadsheet.html new file mode 100644 index 00000000..d9c6ca2d --- /dev/null +++ b/docs/dev/reference/read_spreadsheet.html @@ -0,0 +1,155 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Read datasets and relevant meta information from a spreadsheet file — read_spreadsheet • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Read datasets and relevant meta information from a spreadsheet file — read_spreadsheet"><meta name="description" content="This function imports one dataset from each sheet of a spreadsheet file. +These sheets are selected based on the contents of a sheet 'Datasets', with +a column called 'Dataset Number', containing numbers identifying the dataset +sheets to be read in. In the second column there must be a grouping +variable, which will often be named 'Soil'. Optionally, time normalization +factors can be given in columns named 'Temperature' and 'Moisture'."><meta property="og:description" content="This function imports one dataset from each sheet of a spreadsheet file. +These sheets are selected based on the contents of a sheet 'Datasets', with +a column called 'Dataset Number', containing numbers identifying the dataset +sheets to be read in. In the second column there must be a grouping +variable, which will often be named 'Soil'. Optionally, time normalization +factors can be given in columns named 'Temperature' and 'Moisture'."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Read datasets and relevant meta information from a spreadsheet file</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/read_spreadsheet.R" class="external-link"><code>R/read_spreadsheet.R</code></a></small> + <div class="d-none name"><code>read_spreadsheet.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function imports one dataset from each sheet of a spreadsheet file. +These sheets are selected based on the contents of a sheet 'Datasets', with +a column called 'Dataset Number', containing numbers identifying the dataset +sheets to be read in. In the second column there must be a grouping +variable, which will often be named 'Soil'. Optionally, time normalization +factors can be given in columns named 'Temperature' and 'Moisture'.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">read_spreadsheet</span><span class="op">(</span></span> +<span> <span class="va">path</span>,</span> +<span> valid_datasets <span class="op">=</span> <span class="st">"all"</span>,</span> +<span> parent_only <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> normalize <span class="op">=</span> <span class="cn">TRUE</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-path">path<a class="anchor" aria-label="anchor" href="#arg-path"></a></dt> +<dd><p>Absolute or relative path to the spreadsheet file</p></dd> + + +<dt id="arg-valid-datasets">valid_datasets<a class="anchor" aria-label="anchor" href="#arg-valid-datasets"></a></dt> +<dd><p>Optional numeric index of the valid datasets, default is +to use all datasets</p></dd> + + +<dt id="arg-parent-only">parent_only<a class="anchor" aria-label="anchor" href="#arg-parent-only"></a></dt> +<dd><p>Should only the parent data be used?</p></dd> + + +<dt id="arg-normalize">normalize<a class="anchor" aria-label="anchor" href="#arg-normalize"></a></dt> +<dd><p>Should the time scale be normalized using temperature +and moisture normalisation factors in the sheet 'Datasets'?</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>There must be a sheet 'Compounds', with columns 'Name' and 'Acronym'. +The first row read after the header read in from this sheet is assumed +to contain name and acronym of the parent compound.</p> +<p>The dataset sheets should be named using the dataset numbers read in from +the 'Datasets' sheet, i.e. '1', '2', ... . In each dataset sheet, the name +of the observed variable (e.g. the acronym of the parent compound or +one of its transformation products) should be in the first column, +the time values should be in the second colum, and the observed value +in the third column.</p> +<p>In case relevant covariate data are available, they should be given +in a sheet 'Covariates', containing one line for each value of the grouping +variable specified in 'Datasets'. These values should be in the first +column and the column must have the same name as the second column in +'Datasets'. Covariates will be read in from columns four and higher. +Their names should preferably not contain special characters like spaces, +so they can be easily used for specifying covariate models.</p> +<p>A similar data structure is defined as the R6 class <a href="mkindsg.html">mkindsg</a>, but +is probably more complicated to use.</p> + </div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/reexports.html b/docs/dev/reference/reexports.html new file mode 100644 index 00000000..e0763155 --- /dev/null +++ b/docs/dev/reference/reexports.html @@ -0,0 +1,118 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Objects exported from other packages — reexports • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Objects exported from other packages — reexports"><meta name="description" content="These objects are imported from other packages. Follow the links +below to see their documentation. + + lmtest +lrtest + + + nlme +intervals, nlme + + +"><meta property="og:description" content="These objects are imported from other packages. Follow the links +below to see their documentation. + + lmtest +lrtest + + + nlme +intervals, nlme + + +"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Objects exported from other packages</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/intervals.R" class="external-link"><code>R/intervals.R</code></a>, <a href="https://github.com/jranke/mkin/blob/HEAD/R/lrtest.mkinfit.R" class="external-link"><code>R/lrtest.mkinfit.R</code></a>, <a href="https://github.com/jranke/mkin/blob/HEAD/R/nlme.mmkin.R" class="external-link"><code>R/nlme.mmkin.R</code></a></small> + <div class="d-none name"><code>reexports.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>These objects are imported from other packages. Follow the links +below to see their documentation.</p> +<dl><dt>lmtest</dt> +<dd><p><code><a href="https://rdrr.io/pkg/lmtest/man/lrtest.html" class="external-link">lrtest</a></code></p></dd> + + + <dt>nlme</dt> +<dd><p><code><a href="https://rdrr.io/pkg/nlme/man/intervals.html" class="external-link">intervals</a></code>, <code><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></code></p></dd> + + +</dl></div> + + + + </main></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/residuals.mkinfit.html b/docs/dev/reference/residuals.mkinfit.html new file mode 100644 index 00000000..cd5c7aff --- /dev/null +++ b/docs/dev/reference/residuals.mkinfit.html @@ -0,0 +1,121 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Extract residuals from an mkinfit model — residuals.mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Extract residuals from an mkinfit model — residuals.mkinfit"><meta name="description" content="Extract residuals from an mkinfit model"><meta property="og:description" content="Extract residuals from an mkinfit model"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Extract residuals from an mkinfit model</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/residuals.mkinfit.R" class="external-link"><code>R/residuals.mkinfit.R</code></a></small> + <div class="d-none name"><code>residuals.mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Extract residuals from an mkinfit model</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/residuals.html" class="external-link">residuals</a></span><span class="op">(</span><span class="va">object</span>, standardized <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>A <code><a href="mkinfit.html">mkinfit</a></code> object</p></dd> + + +<dt id="arg-standardized">standardized<a class="anchor" aria-label="anchor" href="#arg-standardized"></a></dt> +<dd><p>Should the residuals be standardized by dividing by the +standard deviation obtained from the fitted error model?</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Not used</p></dd> + +</dl></div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><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="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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/residuals.html" class="external-link">residuals</a></span><span class="op">(</span><span class="va">f</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.09726374 -0.13912142 -0.15351210 0.73388322 -0.08657004 -0.93204702</span> +<span class="r-out co"><span class="r-pr">#></span> [7] -0.03269080 1.45347823 -0.88423697</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/residuals.html" class="external-link">residuals</a></span><span class="op">(</span><span class="va">f</span>, standardized <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.13969917 -0.19981904 -0.22048826 1.05407091 -0.12433989 -1.33869208</span> +<span class="r-out co"><span class="r-pr">#></span> [7] -0.04695355 2.08761977 -1.27002287</span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/saem-1.png b/docs/dev/reference/saem-1.png Binary files differnew file mode 100644 index 00000000..1fa206c4 --- /dev/null +++ b/docs/dev/reference/saem-1.png diff --git a/docs/dev/reference/saem-2.png b/docs/dev/reference/saem-2.png Binary files differnew file mode 100644 index 00000000..e5c62c35 --- /dev/null +++ b/docs/dev/reference/saem-2.png diff --git a/docs/dev/reference/saem-3.png b/docs/dev/reference/saem-3.png Binary files differnew file mode 100644 index 00000000..09eb2d40 --- /dev/null +++ b/docs/dev/reference/saem-3.png diff --git a/docs/dev/reference/saem-4.png b/docs/dev/reference/saem-4.png Binary files differnew file mode 100644 index 00000000..87ebc56f --- /dev/null +++ b/docs/dev/reference/saem-4.png diff --git a/docs/dev/reference/saem.html b/docs/dev/reference/saem.html new file mode 100644 index 00000000..25eb03c7 --- /dev/null +++ b/docs/dev/reference/saem.html @@ -0,0 +1,731 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Fit nonlinear mixed models with SAEM — saem • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Fit nonlinear mixed models with SAEM — saem"><meta name="description" content="This function uses saemix::saemix() as a backend for fitting nonlinear mixed +effects models created from mmkin row objects using the Stochastic Approximation +Expectation Maximisation algorithm (SAEM)."><meta property="og:description" content="This function uses saemix::saemix() as a backend for fitting nonlinear mixed +effects models created from mmkin row objects using the Stochastic Approximation +Expectation Maximisation algorithm (SAEM)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Fit nonlinear mixed models with SAEM</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/saem.R" class="external-link"><code>R/saem.R</code></a></small> + <div class="d-none name"><code>saem.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function uses <code><a href="https://rdrr.io/pkg/saemix/man/saemix.html" class="external-link">saemix::saemix()</a></code> as a backend for fitting nonlinear mixed +effects models created from <a href="mmkin.html">mmkin</a> row objects using the Stochastic Approximation +Expectation Maximisation algorithm (SAEM).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">saem</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu">saem</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> transformations <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"mkin"</span>, <span class="st">"saemix"</span><span class="op">)</span>,</span> +<span> error_model <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> degparms_start <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> test_log_parms <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> conf.level <span class="op">=</span> <span class="fl">0.6</span>,</span> +<span> solution_type <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> covariance.model <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> omega.init <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> covariates <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> covariate_models <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> no_random_effect <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> error.init <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">1</span><span class="op">)</span>,</span> +<span> nbiter.saemix <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">300</span>, <span class="fl">100</span><span class="op">)</span>,</span> +<span> control <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>displayProgress <span class="op">=</span> <span class="cn">FALSE</span>, print <span class="op">=</span> <span class="cn">FALSE</span>, nbiter.saemix <span class="op">=</span> <span class="va">nbiter.saemix</span>,</span> +<span> save <span class="op">=</span> <span class="cn">FALSE</span>, save.graphs <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span> +<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> quiet <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'saem.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">max</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">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></span> +<span></span> +<span><span class="fu">saemix_model</span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> solution_type <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> transformations <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"mkin"</span>, <span class="st">"saemix"</span><span class="op">)</span>,</span> +<span> error_model <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> degparms_start <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> covariance.model <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> no_random_effect <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> omega.init <span class="op">=</span> <span class="st">"auto"</span>,</span> +<span> covariates <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> covariate_models <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> error.init <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a></span><span class="op">(</span><span class="op">)</span>,</span> +<span> test_log_parms <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> conf.level <span class="op">=</span> <span class="fl">0.6</span>,</span> +<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="fu">saemix_data</span><span class="op">(</span><span class="va">object</span>, covariates <span class="op">=</span> <span class="cn">NULL</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An <a href="mmkin.html">mmkin</a> row object containing several fits of the same +<a href="mkinmod.html">mkinmod</a> model to different datasets</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Further parameters passed to <a href="https://rdrr.io/pkg/saemix/man/saemixModel.html" class="external-link">saemix::saemixModel</a>.</p></dd> + + +<dt id="arg-transformations">transformations<a class="anchor" aria-label="anchor" href="#arg-transformations"></a></dt> +<dd><p>Per default, all parameter transformations are done +in mkin. If this argument is set to 'saemix', parameter transformations +are done in 'saemix' for the supported cases, i.e. (as of version 1.1.2) +SFO, FOMC, DFOP and HS without fixing <code>parent_0</code>, and SFO or DFOP with +one SFO metabolite.</p></dd> + + +<dt id="arg-error-model">error_model<a class="anchor" aria-label="anchor" href="#arg-error-model"></a></dt> +<dd><p>Possibility to override the error model used in the mmkin object</p></dd> + + +<dt id="arg-degparms-start">degparms_start<a class="anchor" aria-label="anchor" href="#arg-degparms-start"></a></dt> +<dd><p>Parameter values given as a named numeric vector will +be used to override the starting values obtained from the 'mmkin' object.</p></dd> + + +<dt id="arg-test-log-parms">test_log_parms<a class="anchor" aria-label="anchor" href="#arg-test-log-parms"></a></dt> +<dd><p>If TRUE, an attempt is made to use more robust starting +values for population parameters fitted as log parameters in mkin (like +rate constants) by only considering rate constants that pass the t-test +when calculating mean degradation parameters using <a href="mean_degparms.html">mean_degparms</a>.</p></dd> + + +<dt id="arg-conf-level">conf.level<a class="anchor" aria-label="anchor" href="#arg-conf-level"></a></dt> +<dd><p>Possibility to adjust the required confidence level +for parameter that are tested if requested by 'test_log_parms'.</p></dd> + + +<dt id="arg-solution-type">solution_type<a class="anchor" aria-label="anchor" href="#arg-solution-type"></a></dt> +<dd><p>Possibility to specify the solution type in case the +automatic choice is not desired</p></dd> + + +<dt id="arg-covariance-model">covariance.model<a class="anchor" aria-label="anchor" href="#arg-covariance-model"></a></dt> +<dd><p>Will be passed to <code><a href="https://rdrr.io/pkg/saemix/man/saemixModel.html" class="external-link">saemix::saemixModel()</a></code>. Per +default, uncorrelated random effects are specified for all degradation +parameters.</p></dd> + + +<dt id="arg-omega-init">omega.init<a class="anchor" aria-label="anchor" href="#arg-omega-init"></a></dt> +<dd><p>Will be passed to <code><a href="https://rdrr.io/pkg/saemix/man/saemixModel.html" class="external-link">saemix::saemixModel()</a></code>. If using +mkin transformations and the default covariance model with optionally +excluded random effects, the variances of the degradation parameters +are estimated using <a href="mean_degparms.html">mean_degparms</a>, with testing of untransformed +log parameters for significant difference from zero. If not using +mkin transformations or a custom covariance model, the default +initialisation of <a href="https://rdrr.io/pkg/saemix/man/saemixModel.html" class="external-link">saemix::saemixModel</a> is used for omega.init.</p></dd> + + +<dt id="arg-covariates">covariates<a class="anchor" aria-label="anchor" href="#arg-covariates"></a></dt> +<dd><p>A data frame with covariate data for use in +'covariate_models', with dataset names as row names.</p></dd> + + +<dt id="arg-covariate-models">covariate_models<a class="anchor" aria-label="anchor" href="#arg-covariate-models"></a></dt> +<dd><p>A list containing linear model formulas with one explanatory +variable, i.e. of the type 'parameter ~ covariate'. Covariates must be available +in the 'covariates' data frame.</p></dd> + + +<dt id="arg-no-random-effect">no_random_effect<a class="anchor" aria-label="anchor" href="#arg-no-random-effect"></a></dt> +<dd><p>Character vector of degradation parameters for +which there should be no variability over the groups. Only used +if the covariance model is not explicitly specified.</p></dd> + + +<dt id="arg-error-init">error.init<a class="anchor" aria-label="anchor" href="#arg-error-init"></a></dt> +<dd><p>Will be passed to <code><a href="https://rdrr.io/pkg/saemix/man/saemixModel.html" class="external-link">saemix::saemixModel()</a></code>.</p></dd> + + +<dt id="arg-nbiter-saemix">nbiter.saemix<a class="anchor" aria-label="anchor" href="#arg-nbiter-saemix"></a></dt> +<dd><p>Convenience option to increase the number of +iterations</p></dd> + + +<dt id="arg-control">control<a class="anchor" aria-label="anchor" href="#arg-control"></a></dt> +<dd><p>Passed to <a href="https://rdrr.io/pkg/saemix/man/saemix.html" class="external-link">saemix::saemix</a>.</p></dd> + + +<dt id="arg-verbose">verbose<a class="anchor" aria-label="anchor" href="#arg-verbose"></a></dt> +<dd><p>Should we print information about created objects of +type <a href="https://rdrr.io/pkg/saemix/man/SaemixModel-class.html" class="external-link">saemix::SaemixModel</a> and <a href="https://rdrr.io/pkg/saemix/man/SaemixData-class.html" class="external-link">saemix::SaemixData</a>?</p></dd> + + +<dt id="arg-quiet">quiet<a class="anchor" aria-label="anchor" href="#arg-quiet"></a></dt> +<dd><p>Should we suppress the messages saemix prints at the beginning +and the end of the optimisation process?</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>An saem.mmkin object to print</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>Number of digits to use for printing</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>An S3 object of class 'saem.mmkin', containing the fitted +<a href="https://rdrr.io/pkg/saemix/man/SaemixObject-class.html" class="external-link">saemix::SaemixObject</a> as a list component named 'so'. The +object also inherits from 'mixed.mmkin'.</p> +<p>An <a href="https://rdrr.io/pkg/saemix/man/SaemixModel-class.html" class="external-link">saemix::SaemixModel</a> object.</p> +<p>An <a href="https://rdrr.io/pkg/saemix/man/SaemixData-class.html" class="external-link">saemix::SaemixData</a> object.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>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 using <a href="mkinfit.html">mkinfit</a>.</p> +<p>Starting values for the fixed effects (population mean parameters, argument +psi0 of <code><a href="https://rdrr.io/pkg/saemix/man/saemixModel.html" class="external-link">saemix::saemixModel()</a></code> are the mean values of the parameters found +using <a href="mmkin.html">mmkin</a>.</p> + </div> + <div class="section level2"> + <h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2> + <div class="dont-index"><p><a href="summary.saem.mmkin.html">summary.saem.mmkin</a> <a href="plot.mixed.mmkin.html">plot.mixed.mmkin</a></p></div> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><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" class="external-link">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" class="external-link">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></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">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></span> +<span class="r-in"><span><span class="va">f_mmkin_parent_p0_fixed</span> <span class="op"><-</span> <span class="fu"><a href="mmkin.html">mmkin</a></span><span class="op">(</span><span class="st">"FOMC"</span>, <span class="va">ds</span>,</span></span> +<span class="r-in"><span> state.ini <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>, fixed_initials <span class="op">=</span> <span class="st">"parent"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_p0_fixed</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin_parent_p0_fixed</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">f_mmkin_parent</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" class="external-link">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><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_sfo</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin_parent</span><span class="op">[</span><span class="st">"SFO"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_fomc</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin_parent</span><span class="op">[</span><span class="st">"FOMC"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_dfop</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin_parent</span><span class="op">[</span><span class="st">"DFOP"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_sfo</span>, <span class="va">f_saem_fomc</span>, <span class="va">f_saem_dfop</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 90 observations of 1 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_sfo 5 624.33 622.38 -307.17</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_fomc 7 467.85 465.11 -226.92</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_dfop 9 493.76 490.24 -237.88</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_sfo</span>, <span class="va">f_saem_dfop</span>, test <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 90 observations of 1 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik Chisq Df Pr(>Chisq) </span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_sfo 5 624.33 622.38 -307.17 </span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_dfop 9 493.76 490.24 -237.88 138.57 4 < 2.2e-16 ***</span> +<span class="r-out co"><span class="r-pr">#></span> ---</span> +<span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> +<span class="r-in"><span><span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_dfop</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] "sd(g_qlogis)"</span> +<span class="r-in"><span><span class="va">f_saem_dfop_red</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_dfop</span>, no_random_effect <span class="op">=</span> <span class="st">"g_qlogis"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_dfop</span>, <span class="va">f_saem_dfop_red</span>, test <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 90 observations of 1 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik Chisq Df Pr(>Chisq)</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_dfop_red 8 488.68 485.55 -236.34 </span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_dfop 9 493.76 490.24 -237.88 0 1 1</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_sfo</span>, <span class="va">f_saem_fomc</span>, <span class="va">f_saem_dfop</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 90 observations of 1 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_sfo 5 624.33 622.38 -307.17</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_fomc 7 467.85 465.11 -226.92</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_dfop 9 493.76 490.24 -237.88</span> +<span class="r-in"><span><span class="co"># The returned saem.mmkin object contains an SaemixObject, therefore we can use</span></span></span> +<span class="r-in"><span><span class="co"># functions from saemix</span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">saemix</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Loading required package: npde</span> +<span class="r-msg co"><span class="r-pr">#></span> Package saemix, version 3.3, March 2024</span> +<span class="r-msg co"><span class="r-pr">#></span> please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr</span> +<span class="r-msg co"><span class="r-pr">#></span> </span> +<span class="r-msg co"><span class="r-pr">#></span> Attaching package: ‘saemix’</span> +<span class="r-msg co"><span class="r-pr">#></span> The following objects are masked from ‘package:npde’:</span> +<span class="r-msg co"><span class="r-pr">#></span> </span> +<span class="r-msg co"><span class="r-pr">#></span> kurtosis, skewness</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/compare.saemix.html" class="external-link">compare.saemix</a></span><span class="op">(</span><span class="va">f_saem_sfo</span><span class="op">$</span><span class="va">so</span>, <span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, <span class="va">f_saem_dfop</span><span class="op">$</span><span class="va">so</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Likelihoods calculated by importance sampling</span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC</span> +<span class="r-out co"><span class="r-pr">#></span> 1 624.3316 622.3788</span> +<span class="r-out co"><span class="r-pr">#></span> 2 467.8472 465.1132</span> +<span class="r-out co"><span class="r-pr">#></span> 3 493.7592 490.2441</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"convergence"</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="saem-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"individual.fit"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Simulating data using nsim = 1000 simulated datasets</span> +<span class="r-out co"><span class="r-pr">#></span> Computing WRES and npde .</span> +<span class="r-plt img"><img src="saem-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"npde"</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Simulating data using nsim = 1000 simulated datasets</span> +<span class="r-out co"><span class="r-pr">#></span> Computing WRES and npde .</span> +<span class="r-msg co"><span class="r-pr">#></span> Please use npdeSaemix to obtain VPC and npde</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"vpc"</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="saem-3.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">f_mmkin_parent_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_mmkin_parent</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_fomc_tc</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin_parent_tc</span><span class="op">[</span><span class="st">"FOMC"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_fomc</span>, <span class="va">f_saem_fomc_tc</span>, test <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 90 observations of 1 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik Chisq Df Pr(>Chisq)</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_fomc 7 467.85 465.11 -226.92 </span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_fomc_tc 8 469.90 466.77 -226.95 0 1 1</span> +<span class="r-in"><span></span></span> +<span class="r-in"><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"FOMC"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span><span class="co"># The following fit uses analytical solutions for SFO-SFO and DFOP-SFO,</span></span></span> +<span class="r-in"><span><span class="co"># and compiled ODEs for FOMC that are much slower</span></span></span> +<span class="r-in"><span><span class="va">f_mmkin</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" class="external-link">list</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> <span class="st">"SFO-SFO"</span> <span class="op">=</span> <span class="va">sfo_sfo</span>, <span class="st">"FOMC-SFO"</span> <span class="op">=</span> <span class="va">fomc_sfo</span>, <span class="st">"DFOP-SFO"</span> <span class="op">=</span> <span class="va">dfop_sfo</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">ds</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># saem fits of SFO-SFO and DFOP-SFO to these data take about five seconds</span></span></span> +<span class="r-in"><span><span class="co"># each on this system, as we use analytical solutions written for saemix.</span></span></span> +<span class="r-in"><span><span class="co"># When using the analytical solutions written for mkin this took around</span></span></span> +<span class="r-in"><span><span class="co"># four minutes</span></span></span> +<span class="r-in"><span><span class="va">f_saem_sfo_sfo</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">[</span><span class="st">"SFO-SFO"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_dfop_sfo</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">[</span><span class="st">"DFOP-SFO"</span>, <span class="op">]</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># We can use print, plot and summary methods to check the results</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Kinetic nonlinear mixed-effects model fit by SAEM</span> +<span class="r-out co"><span class="r-pr">#></span> Structural model:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> +<span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> +<span class="r-out co"><span class="r-pr">#></span> * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_A1/dt = + f_parent_to_A1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)</span> +<span class="r-out co"><span class="r-pr">#></span> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *</span> +<span class="r-out co"><span class="r-pr">#></span> exp(-k2 * time))) * parent - k_A1 * A1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 170 observations of 2 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood computed by importance sampling</span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 839.2 834.1 -406.6</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> estimate lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 93.70402 91.04104 96.3670</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_A1 -5.83760 -7.66452 -4.0107</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.95718 -1.35955 -0.5548</span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 -2.35514 -3.39402 -1.3163</span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 -3.79634 -5.64009 -1.9526</span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.02108 -0.66463 0.6225</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 1.88191 1.66491 2.0989</span> +<span class="r-out co"><span class="r-pr">#></span> SD.parent_0 2.81628 0.78922 4.8433</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_A1 1.78751 0.42105 3.1540</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_parent_qlogis 0.45016 0.16116 0.7391</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k1 1.06923 0.31676 1.8217</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k2 2.03768 0.70938 3.3660</span> +<span class="r-out co"><span class="r-pr">#></span> SD.g_qlogis 0.44024 -0.09262 0.9731</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="saem-4.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span>, data <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> saemix version used for fitting: 3.3 </span> +<span class="r-out co"><span class="r-pr">#></span> mkin version used for pre-fitting: 1.2.10 </span> +<span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.4.2 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of fit: Fri Feb 14 07:32:13 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of summary: Fri Feb 14 07:32:13 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> +<span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> +<span class="r-out co"><span class="r-pr">#></span> * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_A1/dt = + f_parent_to_A1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)</span> +<span class="r-out co"><span class="r-pr">#></span> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *</span> +<span class="r-out co"><span class="r-pr">#></span> exp(-k2 * time))) * parent - k_A1 * A1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 170 observations of 2 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type analytical </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted in 3.605 s</span> +<span class="r-out co"><span class="r-pr">#></span> Using 300, 100 iterations and 10 chains</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance model: Constant variance </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for degradation parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_A1 f_parent_qlogis log_k1 log_k2 </span> +<span class="r-out co"><span class="r-pr">#></span> 93.8102 -5.3734 -0.9711 -1.8799 -4.2708 </span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis </span> +<span class="r-out co"><span class="r-pr">#></span> 0.1356 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed degradation parameter values:</span> +<span class="r-out co"><span class="r-pr">#></span> None</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for random effects (square root of initial entries in omega):</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_A1 f_parent_qlogis log_k1 log_k2 g_qlogis</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 4.941 0.000 0.0000 0.000 0.000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_A1 0.000 2.551 0.0000 0.000 0.000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis 0.000 0.000 0.7251 0.000 0.000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 0.000 0.000 0.0000 1.449 0.000 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 0.000 0.000 0.0000 0.000 2.228 0.0000</span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis 0.000 0.000 0.0000 0.000 0.000 0.7814</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for error model parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 </span> +<span class="r-out co"><span class="r-pr">#></span> 1 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Results:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood computed by importance sampling</span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 839.2 834.1 -406.6</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Optimised parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 93.70402 91.04104 96.3670</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_A1 -5.83760 -7.66452 -4.0107</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.95718 -1.35955 -0.5548</span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 -2.35514 -3.39402 -1.3163</span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 -3.79634 -5.64009 -1.9526</span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.02108 -0.66463 0.6225</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 1.88191 1.66491 2.0989</span> +<span class="r-out co"><span class="r-pr">#></span> SD.parent_0 2.81628 0.78922 4.8433</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_A1 1.78751 0.42105 3.1540</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_parent_qlogis 0.45016 0.16116 0.7391</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k1 1.06923 0.31676 1.8217</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k2 2.03768 0.70938 3.3660</span> +<span class="r-out co"><span class="r-pr">#></span> SD.g_qlogis 0.44024 -0.09262 0.9731</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Correlation: </span> +<span class="r-out co"><span class="r-pr">#></span> parnt_0 lg_k_A1 f_prnt_ log_k1 log_k2 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k_A1 -0.0147 </span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.0269 0.0573 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 0.0263 -0.0011 -0.0040 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 0.0020 0.0065 -0.0002 -0.0776 </span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.0248 -0.0180 -0.0004 -0.0903 -0.0603</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> SD.parent_0 2.8163 0.78922 4.8433</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_A1 1.7875 0.42105 3.1540</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_parent_qlogis 0.4502 0.16116 0.7391</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k1 1.0692 0.31676 1.8217</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k2 2.0377 0.70938 3.3660</span> +<span class="r-out co"><span class="r-pr">#></span> SD.g_qlogis 0.4402 -0.09262 0.9731</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance model:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 1.882 1.665 2.099</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 93.704015 9.104e+01 96.36699</span> +<span class="r-out co"><span class="r-pr">#></span> k_A1 0.002916 4.692e-04 0.01812</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_A1 0.277443 2.043e-01 0.36475</span> +<span class="r-out co"><span class="r-pr">#></span> k1 0.094880 3.357e-02 0.26813</span> +<span class="r-out co"><span class="r-pr">#></span> k2 0.022453 3.553e-03 0.14191</span> +<span class="r-out co"><span class="r-pr">#></span> g 0.494731 3.397e-01 0.65078</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Resulting formation fractions:</span> +<span class="r-out co"><span class="r-pr">#></span> ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_A1 0.2774</span> +<span class="r-out co"><span class="r-pr">#></span> parent_sink 0.7226</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back DT50_k1 DT50_k2</span> +<span class="r-out co"><span class="r-pr">#></span> parent 14.0 72.38 21.79 7.306 30.87</span> +<span class="r-out co"><span class="r-pr">#></span> A1 237.7 789.68 NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> ds name time observed predicted residual std standardized</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 0 97.2 95.70025 1.49975 1.882 0.79693</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 0 96.4 95.70025 0.69975 1.882 0.37183</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 3 71.1 71.44670 -0.34670 1.882 -0.18423</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 3 69.2 71.44670 -2.24670 1.882 -1.19384</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 6 58.1 56.59283 1.50717 1.882 0.80087</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 6 56.6 56.59283 0.00717 1.882 0.00381</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 10 44.4 44.56648 -0.16648 1.882 -0.08847</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 10 43.4 44.56648 -1.16648 1.882 -0.61984</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 20 33.3 29.76020 3.53980 1.882 1.88096</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 20 29.2 29.76020 -0.56020 1.882 -0.29767</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 34 17.6 19.39208 -1.79208 1.882 -0.95226</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 34 18.0 19.39208 -1.39208 1.882 -0.73971</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 55 10.5 10.55761 -0.05761 1.882 -0.03061</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 55 9.3 10.55761 -1.25761 1.882 -0.66826</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 90 4.5 3.84742 0.65258 1.882 0.34676</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 90 4.7 3.84742 0.85258 1.882 0.45304</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 112 3.0 2.03997 0.96003 1.882 0.51013</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 112 3.4 2.03997 1.36003 1.882 0.72268</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 132 2.3 1.14585 1.15415 1.882 0.61328</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 132 2.7 1.14585 1.55415 1.882 0.82583</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 3 4.3 4.86054 -0.56054 1.882 -0.29786</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 3 4.6 4.86054 -0.26054 1.882 -0.13844</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 6 7.0 7.74179 -0.74179 1.882 -0.39417</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 6 7.2 7.74179 -0.54179 1.882 -0.28789</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 10 8.2 9.94048 -1.74048 1.882 -0.92485</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 10 8.0 9.94048 -1.94048 1.882 -1.03112</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 20 11.0 12.19109 -1.19109 1.882 -0.63291</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 20 13.7 12.19109 1.50891 1.882 0.80180</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 34 11.5 13.10706 -1.60706 1.882 -0.85395</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 34 12.7 13.10706 -0.40706 1.882 -0.21630</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 55 14.9 13.06131 1.83869 1.882 0.97703</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 55 14.5 13.06131 1.43869 1.882 0.76448</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 90 12.1 11.54495 0.55505 1.882 0.29494</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 90 12.3 11.54495 0.75505 1.882 0.40122</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 112 9.9 10.31533 -0.41533 1.882 -0.22070</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 112 10.2 10.31533 -0.11533 1.882 -0.06128</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 132 8.8 9.20222 -0.40222 1.882 -0.21373</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 132 7.8 9.20222 -1.40222 1.882 -0.74510</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 0 93.6 90.82357 2.77643 1.882 1.47532</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 0 92.3 90.82357 1.47643 1.882 0.78453</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 3 87.0 84.73448 2.26552 1.882 1.20384</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 3 82.2 84.73448 -2.53448 1.882 -1.34675</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 7 74.0 77.65013 -3.65013 1.882 -1.93958</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 7 73.9 77.65013 -3.75013 1.882 -1.99272</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 14 64.2 67.60639 -3.40639 1.882 -1.81007</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 14 69.5 67.60639 1.89361 1.882 1.00621</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 30 54.0 52.53663 1.46337 1.882 0.77760</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 30 54.6 52.53663 2.06337 1.882 1.09642</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 60 41.1 39.42728 1.67272 1.882 0.88884</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 60 38.4 39.42728 -1.02728 1.882 -0.54587</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 90 32.5 33.76360 -1.26360 1.882 -0.67144</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 90 35.5 33.76360 1.73640 1.882 0.92268</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 120 28.1 30.39975 -2.29975 1.882 -1.22203</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 120 29.0 30.39975 -1.39975 1.882 -0.74379</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 180 26.5 25.62379 0.87621 1.882 0.46559</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 180 27.6 25.62379 1.97621 1.882 1.05010</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 3 3.9 2.70005 1.19995 1.882 0.63762</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 3 3.1 2.70005 0.39995 1.882 0.21252</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 7 6.9 5.83475 1.06525 1.882 0.56605</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 7 6.6 5.83475 0.76525 1.882 0.40663</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 14 10.4 10.26142 0.13858 1.882 0.07364</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 14 8.3 10.26142 -1.96142 1.882 -1.04225</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 30 14.4 16.82999 -2.42999 1.882 -1.29123</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 30 13.7 16.82999 -3.12999 1.882 -1.66319</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 60 22.1 22.32486 -0.22486 1.882 -0.11949</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 60 22.3 22.32486 -0.02486 1.882 -0.01321</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 90 27.5 24.45927 3.04073 1.882 1.61576</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 90 25.4 24.45927 0.94073 1.882 0.49988</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 120 28.0 25.54862 2.45138 1.882 1.30260</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 120 26.6 25.54862 1.05138 1.882 0.55868</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 180 25.8 26.82277 -1.02277 1.882 -0.54347</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 180 25.3 26.82277 -1.52277 1.882 -0.80916</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 0 91.9 91.16791 0.73209 1.882 0.38901</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 0 90.8 91.16791 -0.36791 1.882 -0.19550</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 1 64.9 67.58358 -2.68358 1.882 -1.42598</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 1 66.2 67.58358 -1.38358 1.882 -0.73520</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 3 43.5 41.62086 1.87914 1.882 0.99853</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 3 44.1 41.62086 2.47914 1.882 1.31735</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 8 18.3 19.60116 -1.30116 1.882 -0.69140</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 8 18.1 19.60116 -1.50116 1.882 -0.79768</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 14 10.2 10.63101 -0.43101 1.882 -0.22903</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 14 10.8 10.63101 0.16899 1.882 0.08980</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 27 4.9 3.12435 1.77565 1.882 0.94354</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 27 3.3 3.12435 0.17565 1.882 0.09334</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 48 1.6 0.43578 1.16422 1.882 0.61864</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 48 1.5 0.43578 1.06422 1.882 0.56550</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 70 1.1 0.05534 1.04466 1.882 0.55510</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 70 0.9 0.05534 0.84466 1.882 0.44883</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 1 9.6 7.63450 1.96550 1.882 1.04442</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 1 7.7 7.63450 0.06550 1.882 0.03481</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 3 15.0 15.52593 -0.52593 1.882 -0.27947</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 3 15.1 15.52593 -0.42593 1.882 -0.22633</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 8 21.2 20.32192 0.87808 1.882 0.46659</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 8 21.1 20.32192 0.77808 1.882 0.41345</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 14 19.7 20.09721 -0.39721 1.882 -0.21107</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 14 18.9 20.09721 -1.19721 1.882 -0.63617</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 27 17.5 16.37477 1.12523 1.882 0.59792</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 27 15.9 16.37477 -0.47477 1.882 -0.25228</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 48 9.5 10.13141 -0.63141 1.882 -0.33551</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 48 9.8 10.13141 -0.33141 1.882 -0.17610</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 70 6.2 5.81827 0.38173 1.882 0.20284</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 70 6.1 5.81827 0.28173 1.882 0.14970</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 0 99.8 97.48728 2.31272 1.882 1.22892</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 0 98.3 97.48728 0.81272 1.882 0.43186</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 1 77.1 79.29476 -2.19476 1.882 -1.16624</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 1 77.2 79.29476 -2.09476 1.882 -1.11310</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 3 59.0 55.67060 3.32940 1.882 1.76915</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 3 58.1 55.67060 2.42940 1.882 1.29092</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 8 27.4 31.57871 -4.17871 1.882 -2.22046</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 8 29.2 31.57871 -2.37871 1.882 -1.26398</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 14 19.1 22.51546 -3.41546 1.882 -1.81489</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 14 29.6 22.51546 7.08454 1.882 3.76454</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 27 10.1 14.09074 -3.99074 1.882 -2.12057</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 27 18.2 14.09074 4.10926 1.882 2.18355</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 48 4.5 6.95747 -2.45747 1.882 -1.30584</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 48 9.1 6.95747 2.14253 1.882 1.13848</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 70 2.3 3.32472 -1.02472 1.882 -0.54451</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 70 2.9 3.32472 -0.42472 1.882 -0.22569</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 91 2.0 1.64300 0.35700 1.882 0.18970</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 91 1.8 1.64300 0.15700 1.882 0.08343</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 120 2.0 0.62073 1.37927 1.882 0.73291</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 120 2.2 0.62073 1.57927 1.882 0.83918</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 1 4.2 3.64568 0.55432 1.882 0.29455</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 1 3.9 3.64568 0.25432 1.882 0.13514</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 3 7.4 8.30173 -0.90173 1.882 -0.47916</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 3 7.9 8.30173 -0.40173 1.882 -0.21347</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 8 14.5 12.71589 1.78411 1.882 0.94803</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 8 13.7 12.71589 0.98411 1.882 0.52293</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 14 14.2 13.90452 0.29548 1.882 0.15701</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 14 12.2 13.90452 -1.70452 1.882 -0.90574</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 27 13.7 14.15523 -0.45523 1.882 -0.24190</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 27 13.2 14.15523 -0.95523 1.882 -0.50759</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 48 13.6 13.31038 0.28962 1.882 0.15389</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 48 15.4 13.31038 2.08962 1.882 1.11037</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 70 10.4 11.85965 -1.45965 1.882 -0.77562</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 70 11.6 11.85965 -0.25965 1.882 -0.13797</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 91 10.0 10.36294 -0.36294 1.882 -0.19286</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 91 9.5 10.36294 -0.86294 1.882 -0.45855</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 120 9.1 8.43003 0.66997 1.882 0.35601</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 120 9.0 8.43003 0.56997 1.882 0.30287</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 0 96.1 93.95603 2.14397 1.882 1.13925</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 0 94.3 93.95603 0.34397 1.882 0.18278</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 8 73.9 77.70592 -3.80592 1.882 -2.02237</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 8 73.9 77.70592 -3.80592 1.882 -2.02237</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 14 69.4 70.04570 -0.64570 1.882 -0.34311</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 14 73.1 70.04570 3.05430 1.882 1.62298</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 21 65.6 64.01710 1.58290 1.882 0.84111</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 21 65.3 64.01710 1.28290 1.882 0.68170</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 41 55.9 54.98434 0.91566 1.882 0.48656</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 41 54.4 54.98434 -0.58434 1.882 -0.31050</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 63 47.0 49.87137 -2.87137 1.882 -1.52577</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 63 49.3 49.87137 -0.57137 1.882 -0.30361</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 91 44.7 45.06727 -0.36727 1.882 -0.19516</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 91 46.7 45.06727 1.63273 1.882 0.86759</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 120 42.1 40.76402 1.33598 1.882 0.70991</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 120 41.3 40.76402 0.53598 1.882 0.28481</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 8 3.3 4.14599 -0.84599 1.882 -0.44954</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 8 3.4 4.14599 -0.74599 1.882 -0.39640</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 14 3.9 6.08478 -2.18478 1.882 -1.16093</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 14 2.9 6.08478 -3.18478 1.882 -1.69231</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 21 6.4 7.59411 -1.19411 1.882 -0.63452</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 21 7.2 7.59411 -0.39411 1.882 -0.20942</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 41 9.1 9.78292 -0.68292 1.882 -0.36289</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 41 8.5 9.78292 -1.28292 1.882 -0.68171</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 63 11.7 10.93274 0.76726 1.882 0.40770</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 63 12.0 10.93274 1.06726 1.882 0.56711</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 91 13.3 11.93986 1.36014 1.882 0.72274</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 91 13.2 11.93986 1.26014 1.882 0.66961</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 120 14.3 12.79238 1.50762 1.882 0.80111</span> +<span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 120 12.1 12.79238 -0.69238 1.882 -0.36791</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The following takes about 6 minutes</span></span></span> +<span class="r-in"><span><span class="va">f_saem_dfop_sfo_deSolve</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">[</span><span class="st">"DFOP-SFO"</span>, <span class="op">]</span>, solution_type <span class="op">=</span> <span class="st">"deSolve"</span>,</span></span> +<span class="r-in"><span> nbiter.saemix <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">200</span>, <span class="fl">80</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> DINTDY- T (=R1) illegal </span> +<span class="r-out co"><span class="r-pr">#></span> In above message, R1 = 70</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> T not in interval TCUR - HU (= R1) to TCUR (=R2) </span> +<span class="r-out co"><span class="r-pr">#></span> In above message, R1 = 53.1042, R2 = 56.6326</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> DINTDY- T (=R1) illegal </span> +<span class="r-out co"><span class="r-pr">#></span> In above message, R1 = 91</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> T not in interval TCUR - HU (= R1) to TCUR (=R2) </span> +<span class="r-out co"><span class="r-pr">#></span> In above message, R1 = 53.1042, R2 = 56.6326</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> DLSODA- Trouble in DINTDY. ITASK = I1, TOUT = R1</span> +<span class="r-out co"><span class="r-pr">#></span> In above message, I1 = 1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> In above message, R1 = 91</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error in deSolve::lsoda(y = odeini, times = outtimes, func = lsoda_func, : </span> +<span class="r-out co"><span class="r-pr">#></span> illegal input detected before taking any integration steps - see written message</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co">#anova(</span></span></span> +<span class="r-in"><span><span class="co"># f_saem_dfop_sfo,</span></span></span> +<span class="r-in"><span><span class="co"># f_saem_dfop_sfo_deSolve))</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># If the model supports it, we can also use eigenvalue based solutions, which</span></span></span> +<span class="r-in"><span><span class="co"># take a similar amount of time</span></span></span> +<span class="r-in"><span><span class="co">#f_saem_sfo_sfo_eigen <- saem(f_mmkin["SFO-SFO", ], solution_type = "eigen",</span></span></span> +<span class="r-in"><span><span class="co"># control = list(nbiter.saemix = c(200, 80), nbdisplay = 10))</span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/saem.mmkin.html b/docs/dev/reference/saem.mmkin.html new file mode 100644 index 00000000..fb5a153f --- /dev/null +++ b/docs/dev/reference/saem.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/saem.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/saem.html"> + </head> +</html> + diff --git a/docs/dev/reference/saemix_data.html b/docs/dev/reference/saemix_data.html new file mode 100644 index 00000000..fb5a153f --- /dev/null +++ b/docs/dev/reference/saemix_data.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/saem.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/saem.html"> + </head> +</html> + diff --git a/docs/dev/reference/saemix_model.html b/docs/dev/reference/saemix_model.html new file mode 100644 index 00000000..fb5a153f --- /dev/null +++ b/docs/dev/reference/saemix_model.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/saem.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/saem.html"> + </head> +</html> + diff --git a/docs/dev/reference/schaefer07_complex_case-1.png b/docs/dev/reference/schaefer07_complex_case-1.png Binary files differnew file mode 100644 index 00000000..4a44d324 --- /dev/null +++ b/docs/dev/reference/schaefer07_complex_case-1.png diff --git a/docs/dev/reference/schaefer07_complex_case.html b/docs/dev/reference/schaefer07_complex_case.html new file mode 100644 index 00000000..7b54053f --- /dev/null +++ b/docs/dev/reference/schaefer07_complex_case.html @@ -0,0 +1,175 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case"><meta name="description" content="This dataset was used for a comparison of KinGUI and ModelMaker to check the + software quality of KinGUI in the original publication (Schäfer et al., 2007). + The results from the fitting are also included."><meta property="og:description" content="This dataset was used for a comparison of KinGUI and ModelMaker to check the + software quality of KinGUI in the original publication (Schäfer et al., 2007). + The results from the fitting are also included."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Metabolism data set used for checking the software quality of KinGUI</h1> + + <div class="d-none name"><code>schaefer07_complex_case.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This dataset was used for a comparison of KinGUI and ModelMaker to check the + software quality of KinGUI in the original publication (Schäfer et al., 2007). + The results from the fitting are also included.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">schaefer07_complex_case</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>The data set is a data frame with 8 observations on the following 6 variables.</p><dl><dt><code>time</code></dt> +<dd><p>a numeric vector</p></dd> + + <dt><code>parent</code></dt> +<dd><p>a numeric vector</p></dd> + + <dt><code>A1</code></dt> +<dd><p>a numeric vector</p></dd> + + <dt><code>B1</code></dt> +<dd><p>a numeric vector</p></dd> + + <dt><code>C1</code></dt> +<dd><p>a numeric vector</p></dd> + + <dt><code>A2</code></dt> +<dd><p>a numeric vector</p></dd> + + +</dl><p>The results are a data frame with 14 results for different parameter values</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Schäfer D, Mikolasch B, Rainbird P and Harvey B (2007). KinGUI: a new kinetic + software tool for evaluations according to FOCUS degradation kinetics. In: Del + Re AAM, Capri E, Fragoulis G and Trevisan M (Eds.). Proceedings of the XIII + Symposium Pesticide Chemistry, Piacenza, 2007, p. 916-923.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">data</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">schaefer07_complex_case</span>, time <span class="op">=</span> <span class="st">"time"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">model</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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" class="external-link">c</a></span><span class="op">(</span><span class="st">"A1"</span>, <span class="st">"B1"</span>, <span class="st">"C1"</span><span class="op">)</span>, sink <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"A2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> B1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> C1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> A2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span> <span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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="va">model</span>, <span class="va">data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="schaefer07_complex_case-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="fu"><a href="endpoints.html">endpoints</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> $ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_A1 parent_B1 parent_C1 parent_sink A1_A2 A1_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 0.3809618 0.1954668 0.4235714 0.0000000 0.4479540 0.5520460 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> $distimes</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> parent 13.95078 46.34349</span> +<span class="r-out co"><span class="r-pr">#></span> A1 49.75347 165.27745</span> +<span class="r-out co"><span class="r-pr">#></span> B1 37.26905 123.80511</span> +<span class="r-out co"><span class="r-pr">#></span> C1 11.23129 37.30955</span> +<span class="r-out co"><span class="r-pr">#></span> A2 28.50690 94.69789</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-in"><span> <span class="co"># }</span></span></span> +<span class="r-in"><span> <span class="co"># Compare with the results obtained in the original publication</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">schaefer07_complex_results</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> compound parameter KinGUI ModelMaker deviation</span> +<span class="r-out co"><span class="r-pr">#></span> 1 parent degradation rate 0.0496 0.0506 2.0</span> +<span class="r-out co"><span class="r-pr">#></span> 2 parent DT50 13.9900 13.6900 2.2</span> +<span class="r-out co"><span class="r-pr">#></span> 3 metabolite A1 formation fraction 0.3803 0.3696 2.9</span> +<span class="r-out co"><span class="r-pr">#></span> 4 metabolite A1 degradation rate 0.0139 0.0136 2.2</span> +<span class="r-out co"><span class="r-pr">#></span> 5 metabolite A1 DT50 49.9600 50.8900 1.8</span> +<span class="r-out co"><span class="r-pr">#></span> 6 metabolite B1 formation fraction 0.1866 0.1818 2.6</span> +<span class="r-out co"><span class="r-pr">#></span> 7 metabolite B1 degradation rate 0.0175 0.0172 1.7</span> +<span class="r-out co"><span class="r-pr">#></span> 8 metabolite B1 DT50 39.6100 40.2400 1.6</span> +<span class="r-out co"><span class="r-pr">#></span> 9 metabolite C1 formation fraction 0.4331 0.4486 3.5</span> +<span class="r-out co"><span class="r-pr">#></span> 10 metabolite C1 degradation rate 0.0638 0.0700 8.9</span> +<span class="r-out co"><span class="r-pr">#></span> 11 metabolite C1 DT50 10.8700 9.9000 9.8</span> +<span class="r-out co"><span class="r-pr">#></span> 12 metabolite A2 formation fraction 0.4529 0.4559 0.7</span> +<span class="r-out co"><span class="r-pr">#></span> 13 metabolite A2 degradation rate 0.0245 0.0244 0.4</span> +<span class="r-out co"><span class="r-pr">#></span> 14 metabolite A2 DT50 28.2400 28.4500 0.7</span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/schaefer07_complex_results.html b/docs/dev/reference/schaefer07_complex_results.html new file mode 100644 index 00000000..d2396bcf --- /dev/null +++ b/docs/dev/reference/schaefer07_complex_results.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/schaefer07_complex_case.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/schaefer07_complex_case.html"> + </head> +</html> + diff --git a/docs/dev/reference/set_nd_nq.html b/docs/dev/reference/set_nd_nq.html new file mode 100644 index 00000000..c282b58d --- /dev/null +++ b/docs/dev/reference/set_nd_nq.html @@ -0,0 +1,234 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Set non-detects and unquantified values in residue series without replicates — set_nd_nq • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Set non-detects and unquantified values in residue series without replicates — set_nd_nq"><meta name="description" content="This function automates replacing unquantified values in residue time and +depth series. For time series, the function performs part of the residue +processing proposed in the FOCUS kinetics guidance for parent compounds +and metabolites. For two-dimensional residue series over time and depth, +it automates the proposal of Boesten et al (2015)."><meta property="og:description" content="This function automates replacing unquantified values in residue time and +depth series. For time series, the function performs part of the residue +processing proposed in the FOCUS kinetics guidance for parent compounds +and metabolites. For two-dimensional residue series over time and depth, +it automates the proposal of Boesten et al (2015)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Set non-detects and unquantified values in residue series without replicates</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/set_nd_nq.R" class="external-link"><code>R/set_nd_nq.R</code></a></small> + <div class="d-none name"><code>set_nd_nq.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function automates replacing unquantified values in residue time and +depth series. For time series, the function performs part of the residue +processing proposed in the FOCUS kinetics guidance for parent compounds +and metabolites. For two-dimensional residue series over time and depth, +it automates the proposal of Boesten et al (2015).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">set_nd_nq</span><span class="op">(</span><span class="va">res_raw</span>, <span class="va">lod</span>, loq <span class="op">=</span> <span class="cn">NA</span>, time_zero_presence <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span></span> +<span></span> +<span><span class="fu">set_nd_nq_focus</span><span class="op">(</span></span> +<span> <span class="va">res_raw</span>,</span> +<span> <span class="va">lod</span>,</span> +<span> loq <span class="op">=</span> <span class="cn">NA</span>,</span> +<span> set_first_sample_nd <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> first_sample_nd_value <span class="op">=</span> <span class="fl">0</span>,</span> +<span> ignore_below_loq_after_first_nd <span class="op">=</span> <span class="cn">TRUE</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-res-raw">res_raw<a class="anchor" aria-label="anchor" href="#arg-res-raw"></a></dt> +<dd><p>Character vector of a residue time series, or matrix of +residue values with rows representing depth profiles for a specific sampling +time, and columns representing time series of residues at the same depth. +Values below the limit of detection (lod) have to be coded as "nd", values +between the limit of detection and the limit of quantification, if any, have +to be coded as "nq". Samples not analysed have to be coded as "na". All +values that are not "na", "nd" or "nq" have to be coercible to numeric</p></dd> + + +<dt id="arg-lod">lod<a class="anchor" aria-label="anchor" href="#arg-lod"></a></dt> +<dd><p>Limit of detection (numeric)</p></dd> + + +<dt id="arg-loq">loq<a class="anchor" aria-label="anchor" href="#arg-loq"></a></dt> +<dd><p>Limit of quantification(numeric). Must be specified if the FOCUS rule to +stop after the first non-detection is to be applied</p></dd> + + +<dt id="arg-time-zero-presence">time_zero_presence<a class="anchor" aria-label="anchor" href="#arg-time-zero-presence"></a></dt> +<dd><p>Do we assume that residues occur at time zero? +This only affects samples from the first sampling time that have been +reported as "nd" (not detected).</p></dd> + + +<dt id="arg-set-first-sample-nd">set_first_sample_nd<a class="anchor" aria-label="anchor" href="#arg-set-first-sample-nd"></a></dt> +<dd><p>Should the first sample be set to "first_sample_nd_value" +in case it is a non-detection?</p></dd> + + +<dt id="arg-first-sample-nd-value">first_sample_nd_value<a class="anchor" aria-label="anchor" href="#arg-first-sample-nd-value"></a></dt> +<dd><p>Value to be used for the first sample if it is a non-detection</p></dd> + + +<dt id="arg-ignore-below-loq-after-first-nd">ignore_below_loq_after_first_nd<a class="anchor" aria-label="anchor" href="#arg-ignore-below-loq-after-first-nd"></a></dt> +<dd><p>Should we ignore values below the LOQ after the first +non-detection that occurs after the quantified values?</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A numeric vector, if a vector was supplied, or a numeric matrix otherwise</p> + </div> + <div class="section level2"> + <h2 id="functions">Functions<a class="anchor" aria-label="anchor" href="#functions"></a></h2> + +<ul><li><p><code>set_nd_nq_focus()</code>: Set non-detects in residue time series according to FOCUS rules</p></li> +</ul></div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Boesten, J. J. T. I., van der Linden, A. M. A., Beltman, W. H. +J. and Pol, J. W. (2015). Leaching of plant protection products and their +transformation products; Proposals for improving the assessment of leaching +to groundwater in the Netherlands — Version 2. Alterra report 2630, Alterra +Wageningen UR (University & Research centre)</p> +<p>FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation +Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Version 1.1, +18 December 2014, p. 251</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># FOCUS (2014) p. 75/76 and 131/132</span></span></span> +<span class="r-in"><span><span class="va">parent_1</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">.12</span>, <span class="fl">.09</span>, <span class="fl">.05</span>, <span class="fl">.03</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">set_nd_nq</span><span class="op">(</span><span class="va">parent_1</span>, <span class="fl">0.02</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.12 0.09 0.05 0.03 0.01 NA NA NA NA NA</span> +<span class="r-in"><span><span class="va">parent_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">.12</span>, <span class="fl">.09</span>, <span class="fl">.05</span>, <span class="fl">.03</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="fl">.03</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">set_nd_nq</span><span class="op">(</span><span class="va">parent_2</span>, <span class="fl">0.02</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.03 0.01 NA NA</span> +<span class="r-in"><span><span class="fu">set_nd_nq_focus</span><span class="op">(</span><span class="va">parent_2</span>, <span class="fl">0.02</span>, loq <span class="op">=</span> <span class="fl">0.05</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.12 0.09 0.05 0.03 0.01 NA NA NA NA NA</span> +<span class="r-in"><span><span class="va">parent_3</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">.12</span>, <span class="fl">.09</span>, <span class="fl">.05</span>, <span class="fl">.03</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="fl">.06</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">set_nd_nq</span><span class="op">(</span><span class="va">parent_3</span>, <span class="fl">0.02</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.06 0.01 NA NA</span> +<span class="r-in"><span><span class="fu">set_nd_nq_focus</span><span class="op">(</span><span class="va">parent_3</span>, <span class="fl">0.02</span>, loq <span class="op">=</span> <span class="fl">0.05</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.12 0.09 0.05 0.03 0.01 0.01 0.06 0.01 NA NA</span> +<span class="r-in"><span><span class="va">metabolite</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>, <span class="fl">0.03</span>, <span class="fl">0.06</span>, <span class="fl">0.10</span>, <span class="fl">0.11</span>, <span class="fl">0.10</span>, <span class="fl">0.09</span>, <span class="fl">0.05</span>, <span class="fl">0.03</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">set_nd_nq</span><span class="op">(</span><span class="va">metabolite</span>, <span class="fl">0.02</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] NA NA 0.01 0.03 0.06 0.10 0.11 0.10 0.09 0.05 0.03 0.01 NA</span> +<span class="r-in"><span><span class="fu">set_nd_nq_focus</span><span class="op">(</span><span class="va">metabolite</span>, <span class="fl">0.02</span>, <span class="fl">0.05</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] 0.00 NA 0.01 0.03 0.06 0.10 0.11 0.10 0.09 0.05 0.03 0.01 NA</span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># Boesten et al. (2015), p. 57/58</span></span></span> +<span class="r-in"><span><span class="va">table_8</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/matrix.html" class="external-link">matrix</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">10</span>, <span class="fl">10</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">4</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fl">10</span>, <span class="fl">10</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nq"</span>, <span class="fl">2</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">2</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fl">10</span>, <span class="fl">10</span>, <span class="fl">10</span>, <span class="st">"nq"</span>, <span class="st">"nd"</span>, <span class="st">"nd"</span>,</span></span> +<span class="r-in"><span> <span class="st">"nq"</span>, <span class="fl">10</span>, <span class="st">"nq"</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">3</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="st">"nd"</span>, <span class="st">"nq"</span>, <span class="st">"nq"</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">3</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">6</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">6</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> ncol <span class="op">=</span> <span class="fl">6</span>, byrow <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">set_nd_nq</span><span class="op">(</span><span class="va">table_8</span>, <span class="fl">0.5</span>, <span class="fl">1.5</span>, time_zero_presence <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [,1] [,2] [,3] [,4] [,5] [,6]</span> +<span class="r-out co"><span class="r-pr">#></span> [1,] 10.00 10.00 0.25 0.25 NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [2,] 10.00 10.00 1.00 1.00 0.25 NA</span> +<span class="r-out co"><span class="r-pr">#></span> [3,] 10.00 10.00 10.00 1.00 0.25 NA</span> +<span class="r-out co"><span class="r-pr">#></span> [4,] 1.00 10.00 1.00 0.25 NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [5,] 0.25 1.00 1.00 0.25 NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [6,] NA 0.25 0.25 NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [7,] NA NA NA NA NA NA</span> +<span class="r-in"><span><span class="va">table_10</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/matrix.html" class="external-link">matrix</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">10</span>, <span class="fl">10</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">4</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fl">10</span>, <span class="fl">10</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">4</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fl">10</span>, <span class="fl">10</span>, <span class="fl">10</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">3</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="st">"nd"</span>, <span class="fl">10</span>, <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">4</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="st">"nd"</span>, <span class="fl">18</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> ncol <span class="op">=</span> <span class="fl">6</span>, byrow <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">set_nd_nq</span><span class="op">(</span><span class="va">table_10</span>, <span class="fl">0.5</span>, time_zero_presence <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [,1] [,2] [,3] [,4] [,5] [,6]</span> +<span class="r-out co"><span class="r-pr">#></span> [1,] 10.00 10.00 0.25 NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [2,] 10.00 10.00 0.25 NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [3,] 10.00 10.00 10.00 0.25 NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [4,] 0.25 10.00 0.25 NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [5,] NA 0.25 NA NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [6,] NA NA NA NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> [7,] NA NA NA NA NA NA</span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/set_nd_nq_focus.html b/docs/dev/reference/set_nd_nq_focus.html new file mode 100644 index 00000000..7a1908a6 --- /dev/null +++ b/docs/dev/reference/set_nd_nq_focus.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/set_nd_nq.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/set_nd_nq.html"> + </head> +</html> + diff --git a/docs/dev/reference/sigma_twocomp-1.png b/docs/dev/reference/sigma_twocomp-1.png Binary files differnew file mode 100644 index 00000000..89500ee7 --- /dev/null +++ b/docs/dev/reference/sigma_twocomp-1.png diff --git a/docs/dev/reference/sigma_twocomp.html b/docs/dev/reference/sigma_twocomp.html new file mode 100644 index 00000000..12af9e8a --- /dev/null +++ b/docs/dev/reference/sigma_twocomp.html @@ -0,0 +1,169 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Two-component error model — sigma_twocomp • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Two-component error model — sigma_twocomp"><meta name="description" content="Function describing the standard deviation of the measurement error in +dependence of the measured value \(y\):"><meta property="og:description" content="Function describing the standard deviation of the measurement error in +dependence of the measured value \(y\):"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Two-component error model</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/sigma_twocomp.R" class="external-link"><code>R/sigma_twocomp.R</code></a></small> + <div class="d-none name"><code>sigma_twocomp.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Function describing the standard deviation of the measurement error in +dependence of the measured value \(y\):</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-y">y<a class="anchor" aria-label="anchor" href="#arg-y"></a></dt> +<dd><p>The magnitude of the observed value</p></dd> + + +<dt id="arg-sigma-low">sigma_low<a class="anchor" aria-label="anchor" href="#arg-sigma-low"></a></dt> +<dd><p>The asymptotic minimum of the standard deviation for low +observed values</p></dd> + + +<dt id="arg-rsd-high">rsd_high<a class="anchor" aria-label="anchor" href="#arg-rsd-high"></a></dt> +<dd><p>The coefficient describing the increase of the standard +deviation with the magnitude of the observed value</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The standard deviation of the response variable.</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>$$\sigma = \sqrt{ \sigma_{low}^2 + y^2 * {rsd}_{high}^2}$$ sigma = +sqrt(sigma_low^2 + y^2 * rsd_high^2)</p> +<p>This is the error model used for example by Werner et al. (1978). The model +proposed by Rocke and Lorenzato (1995) can be written in this form as well, +but assumes approximate lognormal distribution of errors for high values of +y.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>Werner, Mario, Brooks, Samuel H., and Knott, Lancaster B. (1978) +Additive, Multiplicative, and Mixed Analytical Errors. Clinical Chemistry +24(11), 1895-1898.</p> +<p>Rocke, David M. and Lorenzato, Stefan (1995) A two-component model for +measurement error in analytical chemistry. Technometrics 37(2), 176-184.</p> +<p>Ranke J and Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical +Degradation Data. <em>Environments</em> 6(12) 124 +<a href="https://doi.org/10.3390/environments6120124" class="external-link">doi:10.3390/environments6120124</a> +.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">times</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><span><span class="va">d_pred</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span>time <span class="op">=</span> <span class="va">times</span>, parent <span class="op">=</span> <span class="fl">100</span> <span class="op">*</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">exp</a></span><span class="op">(</span><span class="op">-</span> <span class="fl">0.03</span> <span class="op">*</span> <span class="va">times</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Random.html" class="external-link">set.seed</a></span><span class="op">(</span><span class="fl">123456</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">d_syn</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_pred</span>, <span class="kw">function</span><span class="op">(</span><span class="va">y</span><span class="op">)</span> <span class="fu">sigma_twocomp</span><span class="op">(</span><span class="va">y</span>, <span class="fl">1</span>, <span class="fl">0.07</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> reps <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="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span></span></span> +<span class="r-in"><span><span class="va">f_nls</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/nls.html" class="external-link">nls</a></span><span class="op">(</span><span class="va">value</span> <span class="op">~</span> <span class="fu"><a href="https://rdrr.io/r/stats/SSasymp.html" class="external-link">SSasymp</a></span><span class="op">(</span><span class="va">time</span>, <span class="fl">0</span>, <span class="va">parent_0</span>, <span class="va">lrc</span><span class="op">)</span>, data <span class="op">=</span> <span class="va">d_syn</span>,</span></span> +<span class="r-in"><span> start <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>parent_0 <span class="op">=</span> <span class="fl">100</span>, lrc <span class="op">=</span> <span class="op">-</span><span class="fl">3</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://svn.r-project.org/R-packages/trunk/nlme/" class="external-link">nlme</a></span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_gnls</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/gnls.html" class="external-link">gnls</a></span><span class="op">(</span><span class="va">value</span> <span class="op">~</span> <span class="fu"><a href="https://rdrr.io/r/stats/SSasymp.html" class="external-link">SSasymp</a></span><span class="op">(</span><span class="va">time</span>, <span class="fl">0</span>, <span class="va">parent_0</span>, <span class="va">lrc</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> data <span class="op">=</span> <span class="va">d_syn</span>, na.action <span class="op">=</span> <span class="va">na.omit</span>,</span></span> +<span class="r-in"><span> start <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>parent_0 <span class="op">=</span> <span class="fl">100</span>, lrc <span class="op">=</span> <span class="op">-</span><span class="fl">3</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/length.html" class="external-link">length</a></span><span class="op">(</span><span class="fu">findFunction</span><span class="op">(</span><span class="st">"varConstProp"</span><span class="op">)</span><span class="op">)</span> <span class="op">></span> <span class="fl">0</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="va">f_gnls_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_gnls</span>, weights <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/varConstProp.html" class="external-link">varConstProp</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="va">f_gnls_tc_sf</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_gnls_tc</span>, control <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>sigma <span class="op">=</span> <span class="fl">1</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-in"><span><span class="va">f_mkin</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">d_syn</span>, error_model <span class="op">=</span> <span class="st">"const"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_mkin_tc</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">d_syn</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">f_mkin_tc</span>, standardized <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="sigma_twocomp-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">AIC</a></span><span class="op">(</span><span class="va">f_nls</span>, <span class="va">f_gnls</span>, <span class="va">f_gnls_tc</span>, <span class="va">f_gnls_tc_sf</span>, <span class="va">f_mkin</span>, <span class="va">f_mkin_tc</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> df AIC</span> +<span class="r-out co"><span class="r-pr">#></span> f_nls 3 114.4817</span> +<span class="r-out co"><span class="r-pr">#></span> f_gnls 3 114.4817</span> +<span class="r-out co"><span class="r-pr">#></span> f_gnls_tc 5 103.6447</span> +<span class="r-out co"><span class="r-pr">#></span> f_gnls_tc_sf 4 101.6447</span> +<span class="r-out co"><span class="r-pr">#></span> f_mkin 3 114.4817</span> +<span class="r-out co"><span class="r-pr">#></span> f_mkin_tc 4 101.6446</span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/status.html b/docs/dev/reference/status.html new file mode 100644 index 00000000..e6388137 --- /dev/null +++ b/docs/dev/reference/status.html @@ -0,0 +1,145 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Method to get status information for fit array objects — status • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Method to get status information for fit array objects — status"><meta name="description" content="Method to get status information for fit array objects"><meta property="og:description" content="Method to get status information for fit array objects"><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Method to get status information for fit array objects</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/status.R" class="external-link"><code>R/status.R</code></a></small> + <div class="d-none name"><code>status.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Method to get status information for fit array objects</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">status</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu">status</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'status.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'mhmkin'</span></span> +<span><span class="fu">status</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'status.mhmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>The object to investigate</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>For potential future extensions</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>The object to be printed</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>An object with the same dimensions as the fit array +suitable printing method.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"FOMC"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"FOCUS A"</span> <span class="op">=</span> <span class="va">FOCUS_2006_A</span>,</span></span> +<span class="r-in"><span> <span class="st">"FOCUS B"</span> <span class="op">=</span> <span class="va">FOCUS_2006_C</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">status</span><span class="op">(</span><span class="va">fits</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model FOCUS A FOCUS B</span> +<span class="r-out co"><span class="r-pr">#></span> SFO OK OK </span> +<span class="r-out co"><span class="r-pr">#></span> FOMC C OK </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> C: Optimisation did not converge:</span> +<span class="r-out co"><span class="r-pr">#></span> false convergence (8)</span> +<span class="r-out co"><span class="r-pr">#></span> OK: No warnings</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/status.mhmkin.html b/docs/dev/reference/status.mhmkin.html new file mode 100644 index 00000000..9451cf16 --- /dev/null +++ b/docs/dev/reference/status.mhmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/status.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/status.html"> + </head> +</html> + diff --git a/docs/dev/reference/status.mmkin.html b/docs/dev/reference/status.mmkin.html new file mode 100644 index 00000000..9451cf16 --- /dev/null +++ b/docs/dev/reference/status.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/status.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/status.html"> + </head> +</html> + diff --git a/docs/dev/reference/summary.mkinfit.html b/docs/dev/reference/summary.mkinfit.html new file mode 100644 index 00000000..63a08d05 --- /dev/null +++ b/docs/dev/reference/summary.mkinfit.html @@ -0,0 +1,290 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Summary method for class "mkinfit" — summary.mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Summary method for class " mkinfit summary.mkinfit><meta name="description" content="Lists model equations, initial parameter values, optimised parameters with +some uncertainty statistics, the chi2 error levels calculated according to +FOCUS guidance (2006) as defined therein, formation fractions, DT50 values +and optionally the data, consisting of observed, predicted and residual +values."><meta property="og:description" content="Lists model equations, initial parameter values, optimised parameters with +some uncertainty statistics, the chi2 error levels calculated according to +FOCUS guidance (2006) as defined therein, formation fractions, DT50 values +and optionally the data, consisting of observed, predicted and residual +values."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Summary method for class "mkinfit"</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/summary.mkinfit.R" class="external-link"><code>R/summary.mkinfit.R</code></a></small> + <div class="d-none name"><code>summary.mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Lists model equations, initial parameter values, optimised parameters with +some uncertainty statistics, the chi2 error levels calculated according to +FOCUS guidance (2006) as defined therein, formation fractions, DT50 values +and optionally the data, consisting of observed, predicted and residual +values.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">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> +<span></span> +<span><span class="co"># S3 method for class 'summary.mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">max</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>an object of class <a href="mkinfit.html">mkinfit</a>.</p></dd> + + +<dt id="arg-data">data<a class="anchor" aria-label="anchor" href="#arg-data"></a></dt> +<dd><p>logical, indicating whether the data should be included in the +summary.</p></dd> + + +<dt id="arg-distimes">distimes<a class="anchor" aria-label="anchor" href="#arg-distimes"></a></dt> +<dd><p>logical, indicating whether DT50 and DT90 values should be +included.</p></dd> + + +<dt id="arg-alpha">alpha<a class="anchor" aria-label="anchor" href="#arg-alpha"></a></dt> +<dd><p>error level for confidence interval estimation from t +distribution</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>optional arguments passed to methods like <code>print</code>.</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>an object of class <code>summary.mkinfit</code>.</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>Number of digits to use for printing</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The summary function returns a list with components, among others</p> +<dl><dt>version, Rversion</dt> +<dd><p>The mkin and R versions used</p></dd> + +<dt>date.fit, date.summary</dt> +<dd><p>The dates where the fit and the summary were +produced</p></dd> + +<dt>diffs</dt> +<dd><p>The differential equations used in the model</p></dd> + +<dt>use_of_ff</dt> +<dd><p>Was maximum or minimum use made of formation fractions</p></dd> + +<dt>bpar</dt> +<dd><p>Optimised and backtransformed +parameters</p></dd> + +<dt>data</dt> +<dd><p>The data (see Description above).</p></dd> + +<dt>start</dt> +<dd><p>The starting values and bounds, if applicable, for optimised +parameters.</p></dd> + +<dt>fixed</dt> +<dd><p>The values of fixed parameters.</p></dd> + +<dt>errmin </dt> +<dd><p>The chi2 error levels for +each observed variable.</p></dd> + +<dt>bparms.ode</dt> +<dd><p>All backtransformed ODE +parameters, for use as starting parameters for related models.</p></dd> + +<dt>errparms</dt> +<dd><p>Error model parameters.</p></dd> + +<dt>ff</dt> +<dd><p>The estimated formation fractions derived from the fitted +model.</p></dd> + +<dt>distimes</dt> +<dd><p>The DT50 and DT90 values for each observed variable.</p></dd> + +<dt>SFORB</dt> +<dd><p>If applicable, eigenvalues and fractional eigenvector component +g of SFORB systems in the model.</p></dd> + +</dl><p>The print method is called for its side effect, i.e. printing the summary.</p> + </div> + <div class="section level2"> + <h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2> + <p>FOCUS (2006) “Guidance Document on Estimating Persistence +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" class="external-link">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></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_A</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> mkin version used for fitting: 1.2.10 </span> +<span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.4.2 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of fit: Fri Feb 14 07:34:16 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of summary: Fri Feb 14 07:34:16 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - k_parent * parent</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type analytical </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted using 131 model solutions performed in 0.009 s</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error model: Constant variance </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error model algorithm: OLS </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for parameters to be optimised:</span> +<span class="r-out co"><span class="r-pr">#></span> value type</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 101.24 state</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.10 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for the transformed parameters actually optimised:</span> +<span class="r-out co"><span class="r-pr">#></span> value lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 101.240000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent -2.302585 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed parameter values:</span> +<span class="r-out co"><span class="r-pr">#></span> None</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Results:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 55.28197 55.5203 -24.64099</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Optimised, transformed parameters with symmetric confidence intervals:</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 109.200 3.70400 99.630 118.700</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent -3.291 0.09176 -3.527 -3.055</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.266 1.31600 1.882 8.649</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Parameter correlation:</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent sigma</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 1.000e+00 5.428e-01 1.642e-07</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent 5.428e-01 1.000e+00 2.507e-07</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.642e-07 2.507e-07 1.000e+00</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> Confidence intervals for internally transformed parameters are asymmetric.</span> +<span class="r-out co"><span class="r-pr">#></span> t-test (unrealistically) based on the assumption of normal distribution</span> +<span class="r-out co"><span class="r-pr">#></span> for estimators of untransformed parameters.</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate t value Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 109.20000 29.47 4.218e-07 99.6300 118.70000</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.03722 10.90 5.650e-05 0.0294 0.04712</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 5.26600 4.00 5.162e-03 1.8820 8.64900</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> FOCUS Chi2 error levels in percent:</span> +<span class="r-out co"><span class="r-pr">#></span> err.min n.optim df</span> +<span class="r-out co"><span class="r-pr">#></span> All data 8.385 2 6</span> +<span class="r-out co"><span class="r-pr">#></span> parent 8.385 2 6</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> parent 18.62 61.87</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> time variable observed predicted residual</span> +<span class="r-out co"><span class="r-pr">#></span> 0 parent 101.24 109.153 -7.9132</span> +<span class="r-out co"><span class="r-pr">#></span> 3 parent 99.27 97.622 1.6484</span> +<span class="r-out co"><span class="r-pr">#></span> 7 parent 90.11 84.119 5.9913</span> +<span class="r-out co"><span class="r-pr">#></span> 14 parent 72.19 64.826 7.3641</span> +<span class="r-out co"><span class="r-pr">#></span> 30 parent 29.71 35.738 -6.0283</span> +<span class="r-out co"><span class="r-pr">#></span> 62 parent 5.98 10.862 -4.8818</span> +<span class="r-out co"><span class="r-pr">#></span> 90 parent 1.54 3.831 -2.2911</span> +<span class="r-out co"><span class="r-pr">#></span> 118 parent 0.39 1.351 -0.9613</span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/summary.mmkin.html b/docs/dev/reference/summary.mmkin.html new file mode 100644 index 00000000..dad19e59 --- /dev/null +++ b/docs/dev/reference/summary.mmkin.html @@ -0,0 +1,155 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Summary method for class "mmkin" — summary.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Summary method for class " mmkin summary.mmkin><meta name="description" content="Shows status information on the mkinfit objects contained in the object +and gives an overview of ill-defined parameters calculated by illparms."><meta property="og:description" content="Shows status information on the mkinfit objects contained in the object +and gives an overview of ill-defined parameters calculated by illparms."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Summary method for class "mmkin"</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/summary.mmkin.R" class="external-link"><code>R/summary.mmkin.R</code></a></small> + <div class="d-none name"><code>summary.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Shows status information on the <a href="mkinfit.html">mkinfit</a> objects contained in the object +and gives an overview of ill-defined parameters calculated by <a href="illparms.html">illparms</a>.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">object</span>, conf.level <span class="op">=</span> <span class="fl">0.95</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'summary.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">max</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">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></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>an object of class <a href="mmkin.html">mmkin</a></p></dd> + + +<dt id="arg-conf-level">conf.level<a class="anchor" aria-label="anchor" href="#arg-conf-level"></a></dt> +<dd><p>confidence level for testing parameters</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>optional arguments passed to methods like <code>print</code>.</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>an object of class <code>summary.mmkin</code>.</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>number of digits to use for printing</p></dd> + +</dl></div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><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></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"FOMC"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="st">"FOCUS A"</span> <span class="op">=</span> <span class="va">FOCUS_2006_A</span>,</span></span> +<span class="r-in"><span> <span class="st">"FOCUS C"</span> <span class="op">=</span> <span class="va">FOCUS_2006_C</span><span class="op">)</span>,</span></span> +<span class="r-in"><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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Optimisation did not converge:</span> +<span class="r-wrn co"><span class="r-pr">#></span> false convergence (8)</span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fits</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Error model: Constant variance </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted in 0.512 s</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Status:</span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model FOCUS A FOCUS C</span> +<span class="r-out co"><span class="r-pr">#></span> SFO OK OK </span> +<span class="r-out co"><span class="r-pr">#></span> FOMC C OK </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> C: Optimisation did not converge:</span> +<span class="r-out co"><span class="r-pr">#></span> false convergence (8)</span> +<span class="r-out co"><span class="r-pr">#></span> OK: No warnings</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Ill-defined parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> dataset</span> +<span class="r-out co"><span class="r-pr">#></span> model FOCUS A FOCUS C</span> +<span class="r-out co"><span class="r-pr">#></span> SFO </span> +<span class="r-out co"><span class="r-pr">#></span> FOMC parent_0, alpha, beta, sigma </span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/summary.nlme.mmkin.html b/docs/dev/reference/summary.nlme.mmkin.html new file mode 100644 index 00000000..dd4c4771 --- /dev/null +++ b/docs/dev/reference/summary.nlme.mmkin.html @@ -0,0 +1,391 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Summary method for class "nlme.mmkin" — summary.nlme.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Summary method for class " nlme.mmkin summary.nlme.mmkin><meta name="description" content="Lists model equations, initial parameter values, optimised parameters +for fixed effects (population), random effects (deviations from the +population mean) and residual error model, as well as the resulting +endpoints such as formation fractions and DT50 values. Optionally +(default is FALSE), the data are listed in full."><meta property="og:description" content="Lists model equations, initial parameter values, optimised parameters +for fixed effects (population), random effects (deviations from the +population mean) and residual error model, as well as the resulting +endpoints such as formation fractions and DT50 values. Optionally +(default is FALSE), the data are listed in full."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Summary method for class "nlme.mmkin"</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/summary.nlme.mmkin.R" class="external-link"><code>R/summary.nlme.mmkin.R</code></a></small> + <div class="d-none name"><code>summary.nlme.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Lists model equations, initial parameter values, optimised parameters +for fixed effects (population), random effects (deviations from the +population mean) and residual error model, as well as the resulting +endpoints such as formation fractions and DT50 values. Optionally +(default is FALSE), the data are listed in full.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'nlme.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> data <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> distimes <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> alpha <span class="op">=</span> <span class="fl">0.05</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'summary.nlme.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">max</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">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>, verbose <span class="op">=</span> <span class="va">x</span><span class="op">$</span><span class="va">verbose</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>an object of class <a href="nlme.mmkin.html">nlme.mmkin</a></p></dd> + + +<dt id="arg-data">data<a class="anchor" aria-label="anchor" href="#arg-data"></a></dt> +<dd><p>logical, indicating whether the full data should be included in +the summary.</p></dd> + + +<dt id="arg-verbose">verbose<a class="anchor" aria-label="anchor" href="#arg-verbose"></a></dt> +<dd><p>Should the summary be verbose?</p></dd> + + +<dt id="arg-distimes">distimes<a class="anchor" aria-label="anchor" href="#arg-distimes"></a></dt> +<dd><p>logical, indicating whether DT50 and DT90 values should be +included.</p></dd> + + +<dt id="arg-alpha">alpha<a class="anchor" aria-label="anchor" href="#arg-alpha"></a></dt> +<dd><p>error level for confidence interval estimation from the t +distribution</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>optional arguments passed to methods like <code>print</code>.</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>an object of class summary.nlme.mmkin</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>Number of digits to use for printing</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The summary function returns a list based on the <a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a> object +obtained in the fit, with at least the following additional components</p> +<dl><dt>nlmeversion, mkinversion, Rversion</dt> +<dd><p>The nlme, mkin and R versions used</p></dd> + +<dt>date.fit, date.summary</dt> +<dd><p>The dates where the fit and the summary were +produced</p></dd> + +<dt>diffs</dt> +<dd><p>The differential equations used in the degradation model</p></dd> + +<dt>use_of_ff</dt> +<dd><p>Was maximum or minimum use made of formation fractions</p></dd> + +<dt>data</dt> +<dd><p>The data</p></dd> + +<dt>confint_trans</dt> +<dd><p>Transformed parameters as used in the optimisation, with confidence intervals</p></dd> + +<dt>confint_back</dt> +<dd><p>Backtransformed parameters, with confidence intervals if available</p></dd> + +<dt>ff</dt> +<dd><p>The estimated formation fractions derived from the fitted +model.</p></dd> + +<dt>distimes</dt> +<dd><p>The DT50 and DT90 values for each observed variable.</p></dd> + +<dt>SFORB</dt> +<dd><p>If applicable, eigenvalues of SFORB components of the model.</p></dd> + +</dl><p>The print method is called for its side effect, i.e. printing the summary.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke for the mkin specific parts +José Pinheiro and Douglas Bates for the components inherited from nlme</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Generate five datasets following SFO kinetics</span></span></span> +<span class="r-in"><span><span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><span><span class="va">dt50_sfo_in_pop</span> <span class="op"><-</span> <span class="fl">50</span></span></span> +<span class="r-in"><span><span class="va">k_in_pop</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">2</span><span class="op">)</span> <span class="op">/</span> <span class="va">dt50_sfo_in_pop</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Random.html" class="external-link">set.seed</a></span><span class="op">(</span><span class="fl">1234</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">k_in</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/Lognormal.html" class="external-link">rlnorm</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="va">k_in_pop</span><span class="op">)</span>, <span class="fl">0.5</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">pred_sfo</span> <span class="op"><-</span> <span class="kw">function</span><span class="op">(</span><span class="va">k</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">SFO</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="va">k</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fl">100</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">ds_sfo_mean</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="va">k_in</span>, <span class="va">pred_sfo</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">ds_sfo_mean</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste</a></span><span class="op">(</span><span class="st">"ds"</span>, <span class="fl">1</span><span class="op">:</span><span class="fl">5</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Random.html" class="external-link">set.seed</a></span><span class="op">(</span><span class="fl">12345</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">ds_sfo_syn</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="va">ds_sfo_mean</span>, <span class="kw">function</span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="add_err.html">add_err</a></span><span class="op">(</span><span class="va">ds</span>,</span></span> +<span class="r-in"><span> sdfunc <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">value</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html" class="external-link">sqrt</a></span><span class="op">(</span><span class="fl">1</span><span class="op">^</span><span class="fl">2</span> <span class="op">+</span> <span class="va">value</span><span class="op">^</span><span class="fl">2</span> <span class="op">*</span> <span class="fl">0.07</span><span class="op">^</span><span class="fl">2</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> n <span class="op">=</span> <span class="fl">1</span><span class="op">)</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span></span></span> +<span class="r-in"><span><span class="op">}</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="co"># Evaluate using mmkin and nlme</span></span></span> +<span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://svn.r-project.org/R-packages/trunk/nlme/" class="external-link">nlme</a></span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_mmkin</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_sfo_syn</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, cores <span class="op">=</span> <span class="fl">1</span><span class="op">)</span></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Optimisation did not converge:</span> +<span class="r-wrn co"><span class="r-pr">#></span> iteration limit reached without convergence (10)</span> +<span class="r-in"><span><span class="va">f_nlme</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/nlme/man/nlme.html" class="external-link">nlme</a></span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_nlme</span>, data <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> nlme version used for fitting: 3.1.166 </span> +<span class="r-out co"><span class="r-pr">#></span> mkin version used for pre-fitting: 1.2.10 </span> +<span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.4.2 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of fit: Fri Feb 14 07:34:18 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of summary: Fri Feb 14 07:34:18 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - k_parent * parent</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 90 observations of 1 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type analytical </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted in 0.187 s using 4 iterations</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance model: Two-component variance function </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Mean of starting values for individual parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent </span> +<span class="r-out co"><span class="r-pr">#></span> 101.569 -4.454 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed degradation parameter values:</span> +<span class="r-out co"><span class="r-pr">#></span> None</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Results:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 584.5 599.5 -286.2</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Optimised, transformed parameters with symmetric confidence intervals:</span> +<span class="r-out co"><span class="r-pr">#></span> lower est. upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 99.371 101.592 103.814</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent -4.973 -4.449 -3.926</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Correlation: </span> +<span class="r-out co"><span class="r-pr">#></span> parnt_0</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent 0.0507 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> Formula: list(parent_0 ~ 1, log_k_parent ~ 1)</span> +<span class="r-out co"><span class="r-pr">#></span> Level: ds</span> +<span class="r-out co"><span class="r-pr">#></span> Structure: Diagonal</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent Residual</span> +<span class="r-out co"><span class="r-pr">#></span> StdDev: 6.921e-05 0.5863 1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance function:</span> +<span class="r-out co"><span class="r-pr">#></span> Structure: Constant plus proportion of variance covariate</span> +<span class="r-out co"><span class="r-pr">#></span> Formula: ~fitted(.) </span> +<span class="r-out co"><span class="r-pr">#></span> Parameter estimates:</span> +<span class="r-out co"><span class="r-pr">#></span> const prop </span> +<span class="r-out co"><span class="r-pr">#></span> 0.0001208313 0.0789967985 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters with asymmetric confidence intervals:</span> +<span class="r-out co"><span class="r-pr">#></span> lower est. upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 99.370882 101.59243 103.81398</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.006923 0.01168 0.01972</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> parent 59.32 197.1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> ds name time observed predicted residual std standardized</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 0 104.1 101.592 2.50757 8.0255 0.312451</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 0 105.0 101.592 3.40757 8.0255 0.424594</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 1 98.5 100.796 -2.29571 7.9625 -0.288313</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 1 96.1 100.796 -4.69571 7.9625 -0.589725</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 3 101.9 99.221 2.67904 7.8381 0.341796</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 3 85.2 99.221 -14.02096 7.8381 -1.788812</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 7 99.1 96.145 2.95512 7.5951 0.389081</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 7 93.0 96.145 -3.14488 7.5951 -0.414065</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 14 88.1 90.989 -2.88944 7.1879 -0.401987</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 14 84.1 90.989 -6.88944 7.1879 -0.958480</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 28 80.2 81.493 -1.29305 6.4377 -0.200857</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 28 91.3 81.493 9.80695 6.4377 1.523364</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 60 65.1 63.344 1.75642 5.0039 0.351008</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 60 65.8 63.344 2.45642 5.0039 0.490898</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 90 47.8 50.018 -2.21764 3.9512 -0.561252</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 90 53.5 50.018 3.48236 3.9512 0.881335</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 120 37.6 39.495 -1.89515 3.1200 -0.607423</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 120 39.3 39.495 -0.19515 3.1200 -0.062549</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 0 107.9 101.592 6.30757 8.0255 0.785943</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 0 102.1 101.592 0.50757 8.0255 0.063245</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 1 103.8 100.058 3.74159 7.9043 0.473361</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 1 108.6 100.058 8.54159 7.9043 1.080626</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 3 91.0 97.060 -6.05952 7.6674 -0.790297</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 3 84.9 97.060 -12.15952 7.6674 -1.585874</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 7 79.3 91.329 -12.02867 7.2147 -1.667251</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 7 100.9 91.329 9.57133 7.2147 1.326647</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 14 77.3 82.102 -4.80185 6.4858 -0.740366</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 14 83.5 82.102 1.39815 6.4858 0.215571</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 28 66.8 66.351 0.44945 5.2415 0.085748</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 28 63.3 66.351 -3.05055 5.2415 -0.582002</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 60 40.8 40.775 0.02474 3.2211 0.007679</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 60 44.8 40.775 4.02474 3.2211 1.249485</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 90 27.8 25.832 1.96762 2.0407 0.964198</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 90 27.0 25.832 1.16762 2.0407 0.572171</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 120 15.2 16.366 -1.16561 1.2928 -0.901595</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 120 15.5 16.366 -0.86561 1.2928 -0.669547</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 0 97.7 101.592 -3.89243 8.0255 -0.485009</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 0 88.2 101.592 -13.39243 8.0255 -1.668740</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 1 109.9 99.218 10.68196 7.8379 1.362858</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 1 97.8 99.218 -1.41804 7.8379 -0.180921</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 3 100.5 94.634 5.86555 7.4758 0.784603</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 3 77.4 94.634 -17.23445 7.4758 -2.305360</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 7 78.3 86.093 -7.79273 6.8011 -1.145813</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 7 90.3 86.093 4.20727 6.8011 0.618620</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 14 76.0 72.958 3.04222 5.7634 0.527848</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 14 79.1 72.958 6.14222 5.7634 1.065722</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 28 46.0 52.394 -6.39404 4.1390 -1.544842</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 28 53.4 52.394 1.00596 4.1390 0.243046</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 60 25.1 24.582 0.51786 1.9419 0.266676</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 60 21.4 24.582 -3.18214 1.9419 -1.638664</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 90 11.0 12.092 -1.09202 0.9552 -1.143199</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 90 14.2 12.092 2.10798 0.9552 2.206777</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 120 5.8 5.948 -0.14810 0.4699 -0.315178</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 120 6.1 5.948 0.15190 0.4699 0.323282</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 0 95.3 101.592 -6.29243 8.0255 -0.784057</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 0 102.0 101.592 0.40757 8.0255 0.050784</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 1 104.4 101.125 3.27549 7.9885 0.410025</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 1 105.4 101.125 4.27549 7.9885 0.535205</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 3 113.7 100.195 13.50487 7.9151 1.706218</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 3 82.3 100.195 -17.89513 7.9151 -2.260886</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 7 98.1 98.362 -0.26190 7.7703 -0.033706</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 7 87.8 98.362 -10.56190 7.7703 -1.359270</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 14 97.9 95.234 2.66590 7.5232 0.354357</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 14 104.8 95.234 9.56590 7.5232 1.271521</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 28 85.0 89.274 -4.27372 7.0523 -0.606001</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 28 77.2 89.274 -12.07372 7.0523 -1.712017</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 60 82.2 77.013 5.18661 6.0838 0.852526</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 60 86.1 77.013 9.08661 6.0838 1.493571</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 90 70.5 67.053 3.44692 5.2970 0.650733</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 90 61.7 67.053 -5.35308 5.2970 -1.010591</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 120 60.0 58.381 1.61905 4.6119 0.351058</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 120 56.4 58.381 -1.98095 4.6119 -0.429530</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 0 92.6 101.592 -8.99243 8.0255 -1.120485</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 0 116.5 101.592 14.90757 8.0255 1.857531</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 1 108.0 99.914 8.08560 7.8929 1.024413</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 1 104.9 99.914 4.98560 7.8929 0.631655</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 3 100.5 96.641 3.85898 7.6343 0.505477</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 3 89.5 96.641 -7.14102 7.6343 -0.935383</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 7 91.7 90.412 1.28752 7.1423 0.180267</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 7 95.1 90.412 4.68752 7.1423 0.656304</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 14 82.2 80.463 1.73715 6.3563 0.273295</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 14 84.5 80.463 4.03715 6.3563 0.635141</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 28 60.5 63.728 -3.22788 5.0343 -0.641178</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 28 72.8 63.728 9.07212 5.0343 1.802062</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 60 38.3 37.399 0.90061 2.9544 0.304835</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 60 40.7 37.399 3.30061 2.9544 1.117174</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 90 22.5 22.692 -0.19165 1.7926 -0.106913</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 90 20.8 22.692 -1.89165 1.7926 -1.055273</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 120 13.4 13.768 -0.36790 1.0876 -0.338259</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 120 13.8 13.768 0.03210 1.0876 0.029517</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/summary.saem.mmkin.html b/docs/dev/reference/summary.saem.mmkin.html new file mode 100644 index 00000000..e6138f37 --- /dev/null +++ b/docs/dev/reference/summary.saem.mmkin.html @@ -0,0 +1,631 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Summary method for class "saem.mmkin" — summary.saem.mmkin • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Summary method for class " saem.mmkin summary.saem.mmkin><meta name="description" content="Lists model equations, initial parameter values, optimised parameters +for fixed effects (population), random effects (deviations from the +population mean) and residual error model, as well as the resulting +endpoints such as formation fractions and DT50 values. Optionally +(default is FALSE), the data are listed in full."><meta property="og:description" content="Lists model equations, initial parameter values, optimised parameters +for fixed effects (population), random effects (deviations from the +population mean) and residual error model, as well as the resulting +endpoints such as formation fractions and DT50 values. Optionally +(default is FALSE), the data are listed in full."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Summary method for class "saem.mmkin"</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/summary.saem.mmkin.R" class="external-link"><code>R/summary.saem.mmkin.R</code></a></small> + <div class="d-none name"><code>summary.saem.mmkin.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>Lists model equations, initial parameter values, optimised parameters +for fixed effects (population), random effects (deviations from the +population mean) and residual error model, as well as the resulting +endpoints such as formation fractions and DT50 values. Optionally +(default is FALSE), the data are listed in full.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'saem.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span></span> +<span> <span class="va">object</span>,</span> +<span> data <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span> +<span> covariates <span class="op">=</span> <span class="cn">NULL</span>,</span> +<span> covariate_quantile <span class="op">=</span> <span class="fl">0.5</span>,</span> +<span> distimes <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> <span class="va">...</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for class 'summary.saem.mmkin'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, digits <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Extremes.html" class="external-link">max</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">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>, verbose <span class="op">=</span> <span class="va">x</span><span class="op">$</span><span class="va">verbose</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>an object of class <a href="saem.html">saem.mmkin</a></p></dd> + + +<dt id="arg-data">data<a class="anchor" aria-label="anchor" href="#arg-data"></a></dt> +<dd><p>logical, indicating whether the full data should be included in +the summary.</p></dd> + + +<dt id="arg-verbose">verbose<a class="anchor" aria-label="anchor" href="#arg-verbose"></a></dt> +<dd><p>Should the summary be verbose?</p></dd> + + +<dt id="arg-covariates">covariates<a class="anchor" aria-label="anchor" href="#arg-covariates"></a></dt> +<dd><p>Numeric vector with covariate values for all variables in +any covariate models in the object. If given, it overrides 'covariate_quantile'.</p></dd> + + +<dt id="arg-covariate-quantile">covariate_quantile<a class="anchor" aria-label="anchor" href="#arg-covariate-quantile"></a></dt> +<dd><p>This argument only has an effect if the fitted +object has covariate models. If so, the default is to show endpoints +for the median of the covariate values (50th percentile).</p></dd> + + +<dt id="arg-distimes">distimes<a class="anchor" aria-label="anchor" href="#arg-distimes"></a></dt> +<dd><p>logical, indicating whether DT50 and DT90 values should be +included.</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>optional arguments passed to methods like <code>print</code>.</p></dd> + + +<dt id="arg-x">x<a class="anchor" aria-label="anchor" href="#arg-x"></a></dt> +<dd><p>an object of class summary.saem.mmkin</p></dd> + + +<dt id="arg-digits">digits<a class="anchor" aria-label="anchor" href="#arg-digits"></a></dt> +<dd><p>Number of digits to use for printing</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>The summary function returns a list based on the <a href="https://rdrr.io/pkg/saemix/man/SaemixObject-class.html" class="external-link">saemix::SaemixObject</a> +obtained in the fit, with at least the following additional components</p> +<dl><dt>saemixversion, mkinversion, Rversion</dt> +<dd><p>The saemix, mkin and R versions used</p></dd> + +<dt>date.fit, date.summary</dt> +<dd><p>The dates where the fit and the summary were +produced</p></dd> + +<dt>diffs</dt> +<dd><p>The differential equations used in the degradation model</p></dd> + +<dt>use_of_ff</dt> +<dd><p>Was maximum or minimum use made of formation fractions</p></dd> + +<dt>data</dt> +<dd><p>The data</p></dd> + +<dt>confint_trans</dt> +<dd><p>Transformed parameters as used in the optimisation, with confidence intervals</p></dd> + +<dt>confint_back</dt> +<dd><p>Backtransformed parameters, with confidence intervals if available</p></dd> + +<dt>confint_errmod</dt> +<dd><p>Error model parameters with confidence intervals</p></dd> + +<dt>ff</dt> +<dd><p>The estimated formation fractions derived from the fitted +model.</p></dd> + +<dt>distimes</dt> +<dd><p>The DT50 and DT90 values for each observed variable.</p></dd> + +<dt>SFORB</dt> +<dd><p>If applicable, eigenvalues of SFORB components of the model.</p></dd> + +</dl><p>The print method is called for its side effect, i.e. printing the summary.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke for the mkin specific parts +saemix authors for the parts inherited from saemix.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Generate five datasets following DFOP-SFO kinetics</span></span></span> +<span class="r-in"><span><span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><span><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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="st">"m1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Random.html" class="external-link">set.seed</a></span><span class="op">(</span><span class="fl">1234</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">k1_in</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/Lognormal.html" class="external-link">rlnorm</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">0.1</span><span class="op">)</span>, <span class="fl">0.3</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">k2_in</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/Lognormal.html" class="external-link">rlnorm</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">0.02</span><span class="op">)</span>, <span class="fl">0.3</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">g_in</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/Logistic.html" class="external-link">plogis</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fu"><a href="https://rdrr.io/r/stats/Logistic.html" class="external-link">qlogis</a></span><span class="op">(</span><span class="fl">0.5</span><span class="op">)</span>, <span class="fl">0.3</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_parent_to_m1_in</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/Logistic.html" class="external-link">plogis</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/stats/Normal.html" class="external-link">rnorm</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fu"><a href="https://rdrr.io/r/stats/Logistic.html" class="external-link">qlogis</a></span><span class="op">(</span><span class="fl">0.3</span><span class="op">)</span>, <span class="fl">0.3</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">k_m1_in</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/Lognormal.html" class="external-link">rlnorm</a></span><span class="op">(</span><span class="fl">5</span>, <span class="fu"><a href="https://rdrr.io/r/base/Log.html" class="external-link">log</a></span><span class="op">(</span><span class="fl">0.02</span><span class="op">)</span>, <span class="fl">0.3</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">pred_dfop_sfo</span> <span class="op"><-</span> <span class="kw">function</span><span class="op">(</span><span class="va">k1</span>, <span class="va">k2</span>, <span class="va">g</span>, <span class="va">f_parent_to_m1</span>, <span class="va">k_m1</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">dfop_sfo</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k1 <span class="op">=</span> <span class="va">k1</span>, k2 <span class="op">=</span> <span class="va">k2</span>, g <span class="op">=</span> <span class="va">g</span>, f_parent_to_m1 <span class="op">=</span> <span class="va">f_parent_to_m1</span>, k_m1 <span class="op">=</span> <span class="va">k_m1</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">ds_mean_dfop_sfo</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="fl">1</span><span class="op">:</span><span class="fl">5</span>, <span class="kw">function</span><span class="op">(</span><span class="va">i</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">dfop_sfo</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k1 <span class="op">=</span> <span class="va">k1_in</span><span class="op">[</span><span class="va">i</span><span class="op">]</span>, k2 <span class="op">=</span> <span class="va">k2_in</span><span class="op">[</span><span class="va">i</span><span class="op">]</span>, g <span class="op">=</span> <span class="va">g_in</span><span class="op">[</span><span class="va">i</span><span class="op">]</span>,</span></span> +<span class="r-in"><span> f_parent_to_m1 <span class="op">=</span> <span class="va">f_parent_to_m1_in</span><span class="op">[</span><span class="va">i</span><span class="op">]</span>, k_m1 <span class="op">=</span> <span class="va">k_m1_in</span><span class="op">[</span><span class="va">i</span><span class="op">]</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">}</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">ds_mean_dfop_sfo</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste</a></span><span class="op">(</span><span class="st">"ds"</span>, <span class="fl">1</span><span class="op">:</span><span class="fl">5</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">ds_syn_dfop_sfo</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="va">ds_mean_dfop_sfo</span>, <span class="kw">function</span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="add_err.html">add_err</a></span><span class="op">(</span><span class="va">ds</span>,</span></span> +<span class="r-in"><span> sdfunc <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">value</span><span class="op">)</span> <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html" class="external-link">sqrt</a></span><span class="op">(</span><span class="fl">1</span><span class="op">^</span><span class="fl">2</span> <span class="op">+</span> <span class="va">value</span><span class="op">^</span><span class="fl">2</span> <span class="op">*</span> <span class="fl">0.07</span><span class="op">^</span><span class="fl">2</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> n <span class="op">=</span> <span class="fl">1</span><span class="op">)</span><span class="op">[[</span><span class="fl">1</span><span class="op">]</span><span class="op">]</span></span></span> +<span class="r-in"><span><span class="op">}</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="co"># Evaluate using mmkin and saem</span></span></span> +<span class="r-in"><span><span class="va">f_mmkin_dfop_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" class="external-link">list</a></span><span class="op">(</span><span class="va">dfop_sfo</span><span class="op">)</span>, <span class="va">ds_syn_dfop_sfo</span>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span>, error_model <span class="op">=</span> <span class="st">"tc"</span>, cores <span class="op">=</span> <span class="fl">5</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">f_saem_dfop_sfo</span> <span class="op"><-</span> <span class="fu"><a href="saem.html">saem</a></span><span class="op">(</span><span class="va">f_mmkin_dfop_sfo</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Kinetic nonlinear mixed-effects model fit by SAEM</span> +<span class="r-out co"><span class="r-pr">#></span> Structural model:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> +<span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> +<span class="r-out co"><span class="r-pr">#></span> * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_m1/dt = + f_parent_to_m1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)</span> +<span class="r-out co"><span class="r-pr">#></span> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *</span> +<span class="r-out co"><span class="r-pr">#></span> exp(-k2 * time))) * parent - k_m1 * m1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 171 observations of 2 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood computed by importance sampling</span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 810.8 805.4 -391.4</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> estimate lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 100.966822 97.90584 104.02780</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 -4.076164 -4.17485 -3.97748</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.940902 -1.35358 -0.52823</span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 -2.363988 -2.71690 -2.01107</span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 -4.060016 -4.21743 -3.90260</span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.029999 -0.44766 0.38766</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 0.876272 0.67790 1.07464</span> +<span class="r-out co"><span class="r-pr">#></span> b.1 0.079594 0.06521 0.09398</span> +<span class="r-out co"><span class="r-pr">#></span> SD.parent_0 0.076322 -76.45825 76.61089</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k_m1 0.005052 -1.08943 1.09953</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_parent_qlogis 0.446968 0.16577 0.72816</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k1 0.348786 0.09502 0.60255</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k2 0.147456 0.03111 0.26380</span> +<span class="r-out co"><span class="r-pr">#></span> SD.g_qlogis 0.348244 0.02794 0.66854</span> +<span class="r-in"><span><span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> [1] "sd(parent_0)" "sd(log_k_m1)"</span> +<span class="r-in"><span><span class="va">f_saem_dfop_sfo_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span>,</span></span> +<span class="r-in"><span> no_random_effect <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"parent_0"</span>, <span class="st">"log_k_m1"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo_2</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/nlme/man/intervals.html" class="external-link">intervals</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo_2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Approximate 95% confidence intervals</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed effects:</span> +<span class="r-out co"><span class="r-pr">#></span> lower est. upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 98.04247057 101.09950884 104.15654711</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.01528983 0.01687734 0.01862969</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.20447650 0.27932896 0.36887691</span> +<span class="r-out co"><span class="r-pr">#></span> k1 0.06779844 0.09638524 0.13702550</span> +<span class="r-out co"><span class="r-pr">#></span> k2 0.01495629 0.01741775 0.02028431</span> +<span class="r-out co"><span class="r-pr">#></span> g 0.37669311 0.48368409 0.59219202</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> lower est. upper</span> +<span class="r-out co"><span class="r-pr">#></span> sd(f_parent_qlogis) 0.16515113 0.4448330 0.7245148</span> +<span class="r-out co"><span class="r-pr">#></span> sd(log_k1) 0.08982399 0.3447403 0.5996565</span> +<span class="r-out co"><span class="r-pr">#></span> sd(log_k2) 0.02806780 0.1419560 0.2558443</span> +<span class="r-out co"><span class="r-pr">#></span> sd(g_qlogis) 0.04908644 0.3801993 0.7113121</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> lower est. upper</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 0.67993373 0.87630147 1.07266921</span> +<span class="r-out co"><span class="r-pr">#></span> b.1 0.06522297 0.07920531 0.09318766</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo_2</span>, data <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> saemix version used for fitting: 3.3 </span> +<span class="r-out co"><span class="r-pr">#></span> mkin version used for pre-fitting: 1.2.10 </span> +<span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.4.2 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of fit: Fri Feb 14 07:34:33 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of summary: Fri Feb 14 07:34:33 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> +<span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> +<span class="r-out co"><span class="r-pr">#></span> * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_m1/dt = + f_parent_to_m1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)</span> +<span class="r-out co"><span class="r-pr">#></span> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *</span> +<span class="r-out co"><span class="r-pr">#></span> exp(-k2 * time))) * parent - k_m1 * m1</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> 171 observations of 2 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type analytical </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted in 8.903 s</span> +<span class="r-out co"><span class="r-pr">#></span> Using 300, 100 iterations and 10 chains</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance model: Two-component variance function </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for degradation parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 </span> +<span class="r-out co"><span class="r-pr">#></span> 101.65645 -4.05368 -0.94311 -2.35943 -4.07006 </span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis </span> +<span class="r-out co"><span class="r-pr">#></span> -0.01133 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed degradation parameter values:</span> +<span class="r-out co"><span class="r-pr">#></span> None</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for random effects (square root of initial entries in omega):</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_m1 f_parent_qlogis log_k1 log_k2 g_qlogis</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 6.742 0.0000 0.0000 0.0000 0.0000 0.000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 0.000 0.2236 0.0000 0.0000 0.0000 0.000</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis 0.000 0.0000 0.5572 0.0000 0.0000 0.000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 0.000 0.0000 0.0000 0.8031 0.0000 0.000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 0.000 0.0000 0.0000 0.0000 0.2931 0.000</span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis 0.000 0.0000 0.0000 0.0000 0.0000 0.807</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for error model parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 b.1 </span> +<span class="r-out co"><span class="r-pr">#></span> 1 1 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Results:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Likelihood computed by importance sampling</span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 806.9 802.2 -391.5</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Optimised parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 101.09951 98.04247 104.15655</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 -4.08178 -4.18057 -3.98300</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.94779 -1.35855 -0.53704</span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 -2.33940 -2.69122 -1.98759</span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 -4.05027 -4.20262 -3.89791</span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.06529 -0.50361 0.37303</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 0.87630 0.67993 1.07267</span> +<span class="r-out co"><span class="r-pr">#></span> b.1 0.07921 0.06522 0.09319</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_parent_qlogis 0.44483 0.16515 0.72451</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k1 0.34474 0.08982 0.59966</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k2 0.14196 0.02807 0.25584</span> +<span class="r-out co"><span class="r-pr">#></span> SD.g_qlogis 0.38020 0.04909 0.71131</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Correlation: </span> +<span class="r-out co"><span class="r-pr">#></span> parnt_0 lg_k_m1 f_prnt_ log_k1 log_k2 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 -0.4716 </span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.2394 0.2617 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k1 0.1677 -0.1566 -0.0659 </span> +<span class="r-out co"><span class="r-pr">#></span> log_k2 0.0165 0.0638 0.0045 0.2013 </span> +<span class="r-out co"><span class="r-pr">#></span> g_qlogis 0.1118 -0.1118 -0.0340 -0.2324 -0.3419</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> SD.f_parent_qlogis 0.4448 0.16515 0.7245</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k1 0.3447 0.08982 0.5997</span> +<span class="r-out co"><span class="r-pr">#></span> SD.log_k2 0.1420 0.02807 0.2558</span> +<span class="r-out co"><span class="r-pr">#></span> SD.g_qlogis 0.3802 0.04909 0.7113</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Variance model:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 0.87630 0.67993 1.07267</span> +<span class="r-out co"><span class="r-pr">#></span> b.1 0.07921 0.06522 0.09319</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 101.09951 98.04247 104.15655</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.01688 0.01529 0.01863</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.27933 0.20448 0.36888</span> +<span class="r-out co"><span class="r-pr">#></span> k1 0.09639 0.06780 0.13703</span> +<span class="r-out co"><span class="r-pr">#></span> k2 0.01742 0.01496 0.02028</span> +<span class="r-out co"><span class="r-pr">#></span> g 0.48368 0.37669 0.59219</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Resulting formation fractions:</span> +<span class="r-out co"><span class="r-pr">#></span> ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_m1 0.2793</span> +<span class="r-out co"><span class="r-pr">#></span> parent_sink 0.7207</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back DT50_k1 DT50_k2</span> +<span class="r-out co"><span class="r-pr">#></span> parent 15.66 94.28 28.38 7.191 39.8</span> +<span class="r-out co"><span class="r-pr">#></span> m1 41.07 136.43 NA NA NA</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> ds name time observed predicted residual std standardized</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 0 89.8 1.011e+02 -11.29951 8.0554 -1.402721</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 0 104.1 1.011e+02 3.00049 8.0554 0.372481</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 1 88.7 9.624e+01 -7.53600 7.6726 -0.982195</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 1 95.5 9.624e+01 -0.73600 7.6726 -0.095925</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 3 81.8 8.736e+01 -5.55672 6.9744 -0.796732</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 3 94.5 8.736e+01 7.14328 6.9744 1.024217</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 7 71.5 7.251e+01 -1.00511 5.8093 -0.173019</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 7 70.3 7.251e+01 -2.20511 5.8093 -0.379585</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 14 54.2 5.356e+01 0.63921 4.3319 0.147560</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 14 49.6 5.356e+01 -3.96079 4.3319 -0.914340</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 28 31.5 3.175e+01 -0.25429 2.6634 -0.095475</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 28 28.8 3.175e+01 -2.95429 2.6634 -1.109218</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 60 12.1 1.281e+01 -0.71388 1.3409 -0.532390</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 60 13.6 1.281e+01 0.78612 1.3409 0.586271</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 90 6.2 6.405e+00 -0.20462 1.0125 -0.202083</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 90 8.3 6.405e+00 1.89538 1.0125 1.871910</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 120 2.2 3.329e+00 -1.12941 0.9151 -1.234165</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 parent 120 2.4 3.329e+00 -0.92941 0.9151 -1.015615</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 1 0.3 1.177e+00 -0.87699 0.8812 -0.995168</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 1 0.2 1.177e+00 -0.97699 0.8812 -1.108644</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 3 2.2 3.268e+00 -1.06821 0.9137 -1.169063</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 3 3.0 3.268e+00 -0.26821 0.9137 -0.293536</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 7 6.5 6.555e+00 -0.05539 1.0186 -0.054377</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 7 5.0 6.555e+00 -1.55539 1.0186 -1.527022</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 14 10.2 1.017e+01 0.03108 1.1902 0.026117</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 14 9.5 1.017e+01 -0.66892 1.1902 -0.562010</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 28 12.2 1.270e+01 -0.50262 1.3342 -0.376708</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 28 13.4 1.270e+01 0.69738 1.3342 0.522686</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 60 11.8 1.078e+01 1.01734 1.2236 0.831403</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 60 13.2 1.078e+01 2.41734 1.2236 1.975530</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 90 6.6 7.686e+00 -1.08586 1.0670 -1.017675</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 90 9.3 7.686e+00 1.61414 1.0670 1.512779</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 120 3.5 5.205e+00 -1.70467 0.9684 -1.760250</span> +<span class="r-out co"><span class="r-pr">#></span> ds 1 m1 120 5.4 5.205e+00 0.19533 0.9684 0.201701</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 0 118.0 1.011e+02 16.90049 8.0554 2.098026</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 0 99.8 1.011e+02 -1.29951 8.0554 -0.161321</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 1 90.2 9.574e+01 -5.53784 7.6334 -0.725473</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 1 94.6 9.574e+01 -1.13784 7.6334 -0.149060</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 3 96.1 8.638e+01 9.72233 6.8975 1.409551</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 3 78.4 8.638e+01 -7.97767 6.8975 -1.156610</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 7 77.9 7.194e+01 5.95854 5.7651 1.033547</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 7 77.7 7.194e+01 5.75854 5.7651 0.998856</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 14 56.0 5.558e+01 0.42141 4.4885 0.093888</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 14 54.7 5.558e+01 -0.87859 4.4885 -0.195742</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 28 36.6 3.852e+01 -1.92382 3.1746 -0.605999</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 28 36.8 3.852e+01 -1.72382 3.1746 -0.543000</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 60 22.1 2.108e+01 1.02043 1.8856 0.541168</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 60 24.7 2.108e+01 3.62043 1.8856 1.920034</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 90 12.4 1.250e+01 -0.09675 1.3220 -0.073184</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 90 10.8 1.250e+01 -1.69675 1.3220 -1.283492</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 120 6.8 7.426e+00 -0.62587 1.0554 -0.593027</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 parent 120 7.9 7.426e+00 0.47413 1.0554 0.449242</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 1 1.3 1.417e+00 -0.11735 0.8835 -0.132825</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 3 3.7 3.823e+00 -0.12301 0.9271 -0.132673</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 3 4.7 3.823e+00 0.87699 0.9271 0.945909</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 7 8.1 7.288e+00 0.81180 1.0494 0.773619</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 7 7.9 7.288e+00 0.61180 1.0494 0.583025</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 14 10.1 1.057e+01 -0.46957 1.2119 -0.387459</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 14 10.3 1.057e+01 -0.26957 1.2119 -0.222432</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 28 10.7 1.234e+01 -1.63555 1.3124 -1.246185</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 28 12.2 1.234e+01 -0.13555 1.3124 -0.103281</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 60 10.7 1.065e+01 0.04641 1.2165 0.038151</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 60 12.5 1.065e+01 1.84641 1.2165 1.517773</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 90 9.1 8.177e+00 0.92337 1.0896 0.847403</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 90 7.4 8.177e+00 -0.77663 1.0896 -0.712734</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 120 6.1 5.966e+00 0.13404 0.9956 0.134631</span> +<span class="r-out co"><span class="r-pr">#></span> ds 2 m1 120 4.5 5.966e+00 -1.46596 0.9956 -1.472460</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 0 106.2 1.011e+02 5.10049 8.0554 0.633175</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 0 106.9 1.011e+02 5.80049 8.0554 0.720073</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 1 107.4 9.365e+01 13.74627 7.4695 1.840332</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 1 96.1 9.365e+01 2.44627 7.4695 0.327504</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 3 79.4 8.139e+01 -1.99118 6.5059 -0.306058</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 3 82.6 8.139e+01 1.20882 6.5059 0.185803</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 7 63.9 6.445e+01 -0.54666 5.1792 -0.105549</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 7 62.4 6.445e+01 -2.04666 5.1792 -0.395170</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 14 51.0 4.830e+01 2.69944 3.9247 0.687800</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 14 47.1 4.830e+01 -1.20056 3.9247 -0.305896</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 28 36.1 3.426e+01 1.83885 2.8516 0.644839</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 28 36.6 3.426e+01 2.33885 2.8516 0.820177</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 60 20.1 1.968e+01 0.42208 1.7881 0.236053</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 60 19.8 1.968e+01 0.12208 1.7881 0.068273</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 90 11.3 1.194e+01 -0.64013 1.2893 -0.496496</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 90 10.7 1.194e+01 -1.24013 1.2893 -0.961865</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 120 8.2 7.247e+00 0.95264 1.0476 0.909381</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 parent 120 7.3 7.247e+00 0.05264 1.0476 0.050254</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 0 0.8 -2.956e-12 0.80000 0.8763 0.912928</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 1 1.8 1.757e+00 0.04318 0.8873 0.048666</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 1 2.3 1.757e+00 0.54318 0.8873 0.612186</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 3 4.2 4.566e+00 -0.36607 0.9480 -0.386149</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 3 4.1 4.566e+00 -0.46607 0.9480 -0.491634</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 7 6.8 8.157e+00 -1.35680 1.0887 -1.246241</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 7 10.1 8.157e+00 1.94320 1.0887 1.784855</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 14 11.4 1.085e+01 0.55367 1.2272 0.451182</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 14 12.8 1.085e+01 1.95367 1.2272 1.592023</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 28 11.5 1.149e+01 0.01098 1.2633 0.008689</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 28 10.6 1.149e+01 -0.88902 1.2633 -0.703717</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 60 7.5 9.295e+00 -1.79500 1.1445 -1.568351</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 60 8.6 9.295e+00 -0.69500 1.1445 -0.607245</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 90 7.3 7.017e+00 0.28305 1.0377 0.272775</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 90 8.1 7.017e+00 1.08305 1.0377 1.043720</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 120 5.3 5.087e+00 0.21272 0.9645 0.220547</span> +<span class="r-out co"><span class="r-pr">#></span> ds 3 m1 120 3.8 5.087e+00 -1.28728 0.9645 -1.334660</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 0 104.7 1.011e+02 3.60049 8.0554 0.446965</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 0 88.3 1.011e+02 -12.79951 8.0554 -1.588930</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 1 94.2 9.755e+01 -3.35176 7.7762 -0.431030</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 1 94.6 9.755e+01 -2.95176 7.7762 -0.379591</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 3 78.1 9.095e+01 -12.85198 7.2570 -1.770981</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 3 96.5 9.095e+01 5.54802 7.2570 0.764508</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 7 76.2 7.949e+01 -3.29267 6.3569 -0.517966</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 7 77.8 7.949e+01 -1.69267 6.3569 -0.266272</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 14 70.8 6.384e+01 6.95621 5.1321 1.355423</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 14 67.3 6.384e+01 3.45621 5.1321 0.673445</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 28 43.1 4.345e+01 -0.35291 3.5515 -0.099370</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 28 45.1 4.345e+01 1.64709 3.5515 0.463771</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 60 21.3 2.137e+01 -0.07478 1.9063 -0.039229</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 60 23.5 2.137e+01 2.12522 1.9063 1.114813</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 90 11.8 1.205e+01 -0.24925 1.2957 -0.192375</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 90 12.1 1.205e+01 0.05075 1.2957 0.039168</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 120 7.0 6.967e+00 0.03315 1.0356 0.032013</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 parent 120 6.2 6.967e+00 -0.76685 1.0356 -0.740510</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 0 1.6 1.421e-13 1.60000 0.8763 1.825856</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 1 0.9 7.250e-01 0.17503 0.8782 0.199310</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 3 3.7 2.038e+00 1.66201 0.8910 1.865236</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 3 2.0 2.038e+00 -0.03799 0.8910 -0.042637</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 7 3.6 4.186e+00 -0.58623 0.9369 -0.625692</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 7 3.8 4.186e+00 -0.38623 0.9369 -0.412230</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 14 7.1 6.752e+00 0.34768 1.0266 0.338666</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 14 6.6 6.752e+00 -0.15232 1.0266 -0.148372</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 28 9.5 9.034e+00 0.46628 1.1313 0.412159</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 28 9.3 9.034e+00 0.26628 1.1313 0.235373</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 60 8.3 8.634e+00 -0.33359 1.1115 -0.300112</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 60 9.0 8.634e+00 0.36641 1.1115 0.329645</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 90 6.6 6.671e+00 -0.07091 1.0233 -0.069295</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 90 7.7 6.671e+00 1.02909 1.0233 1.005691</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 120 3.7 4.823e+00 -1.12301 0.9559 -1.174763</span> +<span class="r-out co"><span class="r-pr">#></span> ds 4 m1 120 3.5 4.823e+00 -1.32301 0.9559 -1.383979</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 0 110.4 1.011e+02 9.30049 8.0554 1.154563</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 0 112.1 1.011e+02 11.00049 8.0554 1.365601</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 1 93.5 9.440e+01 -0.90098 7.5282 -0.119681</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 1 91.0 9.440e+01 -3.40098 7.5282 -0.451764</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 3 71.0 8.287e+01 -11.86698 6.6217 -1.792122</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 3 89.7 8.287e+01 6.83302 6.6217 1.031907</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 7 60.4 6.562e+01 -5.22329 5.2711 -0.990936</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 7 59.1 6.562e+01 -6.52329 5.2711 -1.237566</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 14 56.5 4.739e+01 9.10588 3.8548 2.362225</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 14 47.0 4.739e+01 -0.39412 3.8548 -0.102240</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 28 30.2 3.118e+01 -0.98128 2.6206 -0.374451</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 28 23.9 3.118e+01 -7.28128 2.6206 -2.778500</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 60 17.0 1.804e+01 -1.03959 1.6761 -0.620224</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 60 18.7 1.804e+01 0.66041 1.6761 0.394008</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 90 11.3 1.165e+01 -0.35248 1.2727 -0.276958</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 90 11.9 1.165e+01 0.24752 1.2727 0.194488</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 120 9.0 7.556e+00 1.44368 1.0612 1.360449</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 parent 120 8.1 7.556e+00 0.54368 1.0612 0.512338</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 0 0.7 -1.421e-14 0.70000 0.8763 0.798812</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 1 3.0 3.160e+00 -0.15979 0.9113 -0.175340</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 1 2.6 3.160e+00 -0.55979 0.9113 -0.614254</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 3 5.1 8.448e+00 -3.34789 1.1026 -3.036487</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 3 7.5 8.448e+00 -0.94789 1.1026 -0.859720</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 7 16.5 1.581e+01 0.68760 1.5286 0.449839</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 7 19.0 1.581e+01 3.18760 1.5286 2.085373</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 14 22.9 2.218e+01 0.71983 1.9632 0.366658</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 14 23.2 2.218e+01 1.01983 1.9632 0.519469</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 28 22.2 2.425e+01 -2.05105 2.1113 -0.971479</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 28 24.4 2.425e+01 0.14895 2.1113 0.070552</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 60 15.5 1.876e+01 -3.25968 1.7250 -1.889646</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 60 19.8 1.876e+01 1.04032 1.7250 0.603074</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 90 14.9 1.365e+01 1.25477 1.3914 0.901806</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 90 14.2 1.365e+01 0.55477 1.3914 0.398714</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 120 10.9 9.726e+00 1.17443 1.1667 1.006587</span> +<span class="r-out co"><span class="r-pr">#></span> ds 5 m1 120 10.4 9.726e+00 0.67443 1.1667 0.578044</span> +<span class="r-in"><span><span class="co"># Add a correlation between random effects of g and k2</span></span></span> +<span class="r-in"><span><span class="va">cov_model_3</span> <span class="op"><-</span> <span class="va">f_saem_dfop_sfo_2</span><span class="op">$</span><span class="va">so</span><span class="op">@</span><span class="va">model</span><span class="op">@</span><span class="va">covariance.model</span></span></span> +<span class="r-in"><span><span class="va">cov_model_3</span><span class="op">[</span><span class="st">"log_k2"</span>, <span class="st">"g_qlogis"</span><span class="op">]</span> <span class="op"><-</span> <span class="fl">1</span></span></span> +<span class="r-in"><span><span class="va">cov_model_3</span><span class="op">[</span><span class="st">"g_qlogis"</span>, <span class="st">"log_k2"</span><span class="op">]</span> <span class="op"><-</span> <span class="fl">1</span></span></span> +<span class="r-in"><span><span class="va">f_saem_dfop_sfo_3</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span>,</span></span> +<span class="r-in"><span> covariance.model <span class="op">=</span> <span class="va">cov_model_3</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/nlme/man/intervals.html" class="external-link">intervals</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo_3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Approximate 95% confidence intervals</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed effects:</span> +<span class="r-out co"><span class="r-pr">#></span> lower est. upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 98.42519529 101.51623115 104.60726702</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.01505059 0.01662123 0.01835577</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.20100222 0.27477835 0.36332008</span> +<span class="r-out co"><span class="r-pr">#></span> k1 0.07347479 0.10139028 0.13991179</span> +<span class="r-out co"><span class="r-pr">#></span> k2 0.01469861 0.01771120 0.02134125</span> +<span class="r-out co"><span class="r-pr">#></span> g 0.35506898 0.46263682 0.57379888</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Random effects:</span> +<span class="r-out co"><span class="r-pr">#></span> lower est. upper</span> +<span class="r-out co"><span class="r-pr">#></span> sd(f_parent_qlogis) 0.16472883 0.4435866 0.7224443</span> +<span class="r-out co"><span class="r-pr">#></span> sd(log_k1) 0.05323856 0.2981783 0.5431180</span> +<span class="r-out co"><span class="r-pr">#></span> sd(log_k2) 0.05013379 0.1912531 0.3323723</span> +<span class="r-out co"><span class="r-pr">#></span> sd(g_qlogis) 0.04710647 0.3997298 0.7523531</span> +<span class="r-out co"><span class="r-pr">#></span> corr(log_k2,g_qlogis) -1.31087397 -0.5845703 0.1417334</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> lower est. upper</span> +<span class="r-out co"><span class="r-pr">#></span> a.1 0.67769608 0.87421677 1.07073746</span> +<span class="r-out co"><span class="r-pr">#></span> b.1 0.06525119 0.07925135 0.09325151</span> +<span class="r-in"><span><span class="co"># The correlation does not improve the fit judged by AIC and BIC, although</span></span></span> +<span class="r-in"><span><span class="co"># the likelihood is higher with the additional parameter</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/anova.html" class="external-link">anova</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span>, <span class="va">f_saem_dfop_sfo_2</span>, <span class="va">f_saem_dfop_sfo_3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Data: 171 observations of 2 variable(s) grouped in 5 datasets</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> npar AIC BIC Lik</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_dfop_sfo_2 12 806.91 802.23 -391.46</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_dfop_sfo_3 13 807.96 802.88 -390.98</span> +<span class="r-out co"><span class="r-pr">#></span> f_saem_dfop_sfo 14 810.83 805.36 -391.41</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/summary_listing.html b/docs/dev/reference/summary_listing.html new file mode 100644 index 00000000..6e1bad37 --- /dev/null +++ b/docs/dev/reference/summary_listing.html @@ -0,0 +1,119 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Display the output of a summary function according to the output format — summary_listing • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Display the output of a summary function according to the output format — summary_listing"><meta name="description" content='This function is intended for use in a R markdown code chunk with the chunk +option results = "asis".'><meta property="og:description" content='This function is intended for use in a R markdown code chunk with the chunk +option results = "asis".'><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Display the output of a summary function according to the output format</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/summary_listing.R" class="external-link"><code>R/summary_listing.R</code></a></small> + <div class="d-none name"><code>summary_listing.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function is intended for use in a R markdown code chunk with the chunk +option <code>results = "asis"</code>.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">summary_listing</span><span class="op">(</span><span class="va">object</span>, caption <span class="op">=</span> <span class="cn">NULL</span>, label <span class="op">=</span> <span class="cn">NULL</span>, clearpage <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> +<span></span> +<span><span class="fu">tex_listing</span><span class="op">(</span><span class="va">object</span>, caption <span class="op">=</span> <span class="cn">NULL</span>, label <span class="op">=</span> <span class="cn">NULL</span>, clearpage <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> +<span></span> +<span><span class="fu">html_listing</span><span class="op">(</span><span class="va">object</span>, caption <span class="op">=</span> <span class="cn">NULL</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>The object for which the summary is to be listed</p></dd> + + +<dt id="arg-caption">caption<a class="anchor" aria-label="anchor" href="#arg-caption"></a></dt> +<dd><p>An optional caption</p></dd> + + +<dt id="arg-label">label<a class="anchor" aria-label="anchor" href="#arg-label"></a></dt> +<dd><p>An optional label, ignored in html output</p></dd> + + +<dt id="arg-clearpage">clearpage<a class="anchor" aria-label="anchor" href="#arg-clearpage"></a></dt> +<dd><p>Should a new page be started after the listing? Ignored in html output</p></dd> + +</dl></div> + + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/synthetic_data_for_UBA_2014-1.png b/docs/dev/reference/synthetic_data_for_UBA_2014-1.png Binary files differnew file mode 100644 index 00000000..c08d231d --- /dev/null +++ b/docs/dev/reference/synthetic_data_for_UBA_2014-1.png diff --git a/docs/dev/reference/synthetic_data_for_UBA_2014.html b/docs/dev/reference/synthetic_data_for_UBA_2014.html new file mode 100644 index 00000000..9080c32b --- /dev/null +++ b/docs/dev/reference/synthetic_data_for_UBA_2014.html @@ -0,0 +1,413 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014 • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014"><meta name="description" content="The 12 datasets were generated using four different models and three different + variance components. The four models are either the SFO or the DFOP model with either + two sequential or two parallel metabolites. +Variance component 'a' is based on a normal distribution with standard deviation of 3, + Variance component 'b' is also based on a normal distribution, but with a standard deviation of 7. + Variance component 'c' is based on the error model from Rocke and Lorenzato (1995), with the + minimum standard deviation (for small y values) of 0.5, and a proportionality constant of 0.07 + for the increase of the standard deviation with y. Note that this is a simplified version + of the error model proposed by Rocke and Lorenzato (1995), as in their model the error of the + measured values approximates lognormal distribution for high values, whereas we are using + normally distributed error components all along. +Initial concentrations for metabolites and all values where adding the variance component resulted + in a value below the assumed limit of detection of 0.1 were set to NA. +As an example, the first dataset has the title SFO_lin_a and is based on the SFO model + with two sequential metabolites (linear pathway), with added variance component 'a'. +Compare also the code in the example section to see the degradation models."><meta property="og:description" content="The 12 datasets were generated using four different models and three different + variance components. The four models are either the SFO or the DFOP model with either + two sequential or two parallel metabolites. +Variance component 'a' is based on a normal distribution with standard deviation of 3, + Variance component 'b' is also based on a normal distribution, but with a standard deviation of 7. + Variance component 'c' is based on the error model from Rocke and Lorenzato (1995), with the + minimum standard deviation (for small y values) of 0.5, and a proportionality constant of 0.07 + for the increase of the standard deviation with y. Note that this is a simplified version + of the error model proposed by Rocke and Lorenzato (1995), as in their model the error of the + measured values approximates lognormal distribution for high values, whereas we are using + normally distributed error components all along. +Initial concentrations for metabolites and all values where adding the variance component resulted + in a value below the assumed limit of detection of 0.1 were set to NA. +As an example, the first dataset has the title SFO_lin_a and is based on the SFO model + with two sequential metabolites (linear pathway), with added variance component 'a'. +Compare also the code in the example section to see the degradation models."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Synthetic datasets for one parent compound with two metabolites</h1> + + <div class="d-none name"><code>synthetic_data_for_UBA_2014.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The 12 datasets were generated using four different models and three different + variance components. The four models are either the SFO or the DFOP model with either + two sequential or two parallel metabolites.</p> +<p>Variance component 'a' is based on a normal distribution with standard deviation of 3, + Variance component 'b' is also based on a normal distribution, but with a standard deviation of 7. + Variance component 'c' is based on the error model from Rocke and Lorenzato (1995), with the + minimum standard deviation (for small y values) of 0.5, and a proportionality constant of 0.07 + for the increase of the standard deviation with y. Note that this is a simplified version + of the error model proposed by Rocke and Lorenzato (1995), as in their model the error of the + measured values approximates lognormal distribution for high values, whereas we are using + normally distributed error components all along.</p> +<p>Initial concentrations for metabolites and all values where adding the variance component resulted + in a value below the assumed limit of detection of 0.1 were set to <code>NA</code>.</p> +<p>As an example, the first dataset has the title <code>SFO_lin_a</code> and is based on the SFO model + with two sequential metabolites (linear pathway), with added variance component 'a'.</p> +<p>Compare also the code in the example section to see the degradation models.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">synthetic_data_for_UBA_2014</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A list containing twelve datasets as an R6 class defined by <code><a href="mkinds.html">mkinds</a></code>, + each containing, among others, the following components</p><dl><dt><code>title</code></dt> +<dd><p>The name of the dataset, e.g. <code>SFO_lin_a</code></p></dd> + + <dt><code>data</code></dt> +<dd><p>A data frame with the data in the form expected by <code><a href="mkinfit.html">mkinfit</a></code></p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>Ranke (2014) Prüfung und Validierung von Modellierungssoftware als Alternative + zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452</p> +<p>Rocke, David M. und Lorenzato, Stefan (1995) A two-component model for + measurement error in analytical chemistry. Technometrics 37(2), 176-184.</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="co"># The data have been generated using the following kinetic models</span></span></span> +<span class="r-in"><span><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="https://rdrr.io/r/base/list.html" class="external-link">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>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"M2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">m_synth_SFO_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="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> sink <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">m_synth_DFOP_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="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"DFOP"</span>, to <span class="op">=</span> <span class="st">"M1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"M2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><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="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"DFOP"</span>, to <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> sink <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>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></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The model predictions without intentional error were generated as follows</span></span></span> +<span class="r-in"><span><span class="va">sampling_times</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="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></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">d_synth_SFO_lin</span> <span class="op"><-</span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">m_synth_SFO_lin</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="fl">0.7</span>, f_parent_to_M1 <span class="op">=</span> <span class="fl">0.8</span>,</span></span> +<span class="r-in"><span> k_M1 <span class="op">=</span> <span class="fl">0.3</span>, f_M1_to_M2 <span class="op">=</span> <span class="fl">0.7</span>,</span></span> +<span class="r-in"><span> k_M2 <span class="op">=</span> <span class="fl">0.02</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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>, M2 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">d_synth_DFOP_lin</span> <span class="op"><-</span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">m_synth_DFOP_lin</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k1 <span class="op">=</span> <span class="fl">0.2</span>, k2 <span class="op">=</span> <span class="fl">0.02</span>, g <span class="op">=</span> <span class="fl">0.5</span>,</span></span> +<span class="r-in"><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.3</span>,</span></span> +<span class="r-in"><span> f_M1_to_M2 <span class="op">=</span> <span class="fl">0.7</span>, k_M2 <span class="op">=</span> <span class="fl">0.02</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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>, M2 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">d_synth_SFO_par</span> <span class="op"><-</span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">m_synth_SFO_par</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k_parent <span class="op">=</span> <span class="fl">0.2</span>,</span></span> +<span class="r-in"><span> f_parent_to_M1 <span class="op">=</span> <span class="fl">0.8</span>, k_M1 <span class="op">=</span> <span class="fl">0.01</span>,</span></span> +<span class="r-in"><span> f_parent_to_M2 <span class="op">=</span> <span class="fl">0.2</span>, k_M2 <span class="op">=</span> <span class="fl">0.02</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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>, M2 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">d_synth_DFOP_par</span> <span class="op"><-</span> <span class="fu"><a href="mkinpredict.html">mkinpredict</a></span><span class="op">(</span><span class="va">m_synth_DFOP_par</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span>k1 <span class="op">=</span> <span class="fl">0.3</span>, k2 <span class="op">=</span> <span class="fl">0.02</span>, g <span class="op">=</span> <span class="fl">0.7</span>,</span></span> +<span class="r-in"><span> f_parent_to_M1 <span class="op">=</span> <span class="fl">0.6</span>, k_M1 <span class="op">=</span> <span class="fl">0.04</span>,</span></span> +<span class="r-in"><span> f_parent_to_M2 <span class="op">=</span> <span class="fl">0.4</span>, k_M2 <span class="op">=</span> <span class="fl">0.01</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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>, M2 <span class="op">=</span> <span class="fl">0</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> <span class="va">sampling_times</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Construct names for datasets with errors</span></span></span> +<span class="r-in"><span><span class="va">d_synth_names</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="st">"d_synth_"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"SFO_lin"</span>, <span class="st">"SFO_par"</span>,</span></span> +<span class="r-in"><span> <span class="st">"DFOP_lin"</span>, <span class="st">"DFOP_par"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Original function used or adding errors. The add_err function now published</span></span></span> +<span class="r-in"><span><span class="co"># with this package is a slightly generalised version where the names of</span></span></span> +<span class="r-in"><span><span class="co"># secondary compartments that should have an initial value of zero (M1 and M2</span></span></span> +<span class="r-in"><span><span class="co"># in this case) are not hardcoded any more.</span></span></span> +<span class="r-in"><span><span class="co"># add_err = function(d, sdfunc, LOD = 0.1, reps = 2, seed = 123456789)</span></span></span> +<span class="r-in"><span><span class="co"># {</span></span></span> +<span class="r-in"><span><span class="co"># set.seed(seed)</span></span></span> +<span class="r-in"><span><span class="co"># d_long = mkin_wide_to_long(d, time = "time")</span></span></span> +<span class="r-in"><span><span class="co"># d_rep = data.frame(lapply(d_long, rep, each = 2))</span></span></span> +<span class="r-in"><span><span class="co"># d_rep$value = rnorm(length(d_rep$value), d_rep$value, sdfunc(d_rep$value))</span></span></span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># d_rep[d_rep$time == 0 & d_rep$name %in% c("M1", "M2"), "value"] <- 0</span></span></span> +<span class="r-in"><span><span class="co"># d_NA <- transform(d_rep, value = ifelse(value < LOD, NA, value))</span></span></span> +<span class="r-in"><span><span class="co"># d_NA$value <- round(d_NA$value, 1)</span></span></span> +<span class="r-in"><span><span class="co"># return(d_NA)</span></span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># The following is the simplified version of the two-component model of Rocke</span></span></span> +<span class="r-in"><span><span class="co"># and Lorenzato (1995)</span></span></span> +<span class="r-in"><span><span class="va">sdfunc_twocomp</span> <span class="op">=</span> <span class="kw">function</span><span class="op">(</span><span class="va">value</span>, <span class="va">sd_low</span>, <span class="va">rsd_high</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/MathFun.html" class="external-link">sqrt</a></span><span class="op">(</span><span class="va">sd_low</span><span class="op">^</span><span class="fl">2</span> <span class="op">+</span> <span class="va">value</span><span class="op">^</span><span class="fl">2</span> <span class="op">*</span> <span class="va">rsd_high</span><span class="op">^</span><span class="fl">2</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Add the errors.</span></span></span> +<span class="r-in"><span><span class="kw">for</span> <span class="op">(</span><span class="va">d_synth_name</span> <span class="kw">in</span> <span class="va">d_synth_names</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">{</span></span></span> +<span class="r-in"><span> <span class="va">d_synth</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/get.html" class="external-link">get</a></span><span class="op">(</span><span class="va">d_synth_name</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/assign.html" class="external-link">assign</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="va">d_synth_name</span>, <span class="st">"_a"</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_synth</span>, <span class="kw">function</span><span class="op">(</span><span class="va">value</span><span class="op">)</span> <span class="fl">3</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/assign.html" class="external-link">assign</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="va">d_synth_name</span>, <span class="st">"_b"</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_synth</span>, <span class="kw">function</span><span class="op">(</span><span class="va">value</span><span class="op">)</span> <span class="fl">7</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/assign.html" class="external-link">assign</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="va">d_synth_name</span>, <span class="st">"_c"</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_synth</span>,</span></span> +<span class="r-in"><span> <span class="kw">function</span><span class="op">(</span><span class="va">value</span><span class="op">)</span> <span class="fu">sdfunc_twocomp</span><span class="op">(</span><span class="va">value</span>, <span class="fl">0.5</span>, <span class="fl">0.07</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="op">}</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">d_synth_err_names</span> <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="va">d_synth_names</span>, each <span class="op">=</span> <span class="fl">3</span><span class="op">)</span>, <span class="va">letters</span><span class="op">[</span><span class="fl">1</span><span class="op">:</span><span class="fl">3</span><span class="op">]</span>, sep <span class="op">=</span> <span class="st">"_"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="op">)</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># This is just one example of an evaluation using the kinetic model used for</span></span></span> +<span class="r-in"><span><span class="co"># the generation of the data</span></span></span> +<span class="r-in"><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="va">m_synth_SFO_lin</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="op">]</span><span class="op">$</span><span class="va">data</span>,</span></span> +<span class="r-in"><span> quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span> <span class="fu"><a href="plot.mkinfit.html">plot_sep</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="synthetic_data_for_UBA_2014-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> mkin version used for fitting: 1.2.10 </span> +<span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.4.2 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of fit: Fri Feb 14 07:34:43 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> Date of summary: Fri Feb 14 07:34:43 2025 </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Equations:</span> +<span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - k_parent * parent</span> +<span class="r-out co"><span class="r-pr">#></span> d_M1/dt = + f_parent_to_M1 * k_parent * parent - k_M1 * M1</span> +<span class="r-out co"><span class="r-pr">#></span> d_M2/dt = + f_M1_to_M2 * k_M1 * M1 - k_M2 * M2</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type deSolve </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fitted using 848 model solutions performed in 0.17 s</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error model: Constant variance </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Error model algorithm: OLS </span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for parameters to be optimised:</span> +<span class="r-out co"><span class="r-pr">#></span> value type</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 101.3500 state</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.1000 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> k_M1 0.1001 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> k_M2 0.1002 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_M1 0.5000 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_to_M2 0.5000 deparm</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Starting values for the transformed parameters actually optimised:</span> +<span class="r-out co"><span class="r-pr">#></span> value lower upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 101.350000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent -2.302585 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M1 -2.301586 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M2 -2.300587 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis 0.000000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_qlogis 0.000000 -Inf Inf</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Fixed parameter values:</span> +<span class="r-out co"><span class="r-pr">#></span> value type</span> +<span class="r-out co"><span class="r-pr">#></span> M1_0 0 state</span> +<span class="r-out co"><span class="r-pr">#></span> M2_0 0 state</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Results:</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> +<span class="r-out co"><span class="r-pr">#></span> 188.7274 200.3723 -87.36368</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Optimised, transformed parameters with symmetric confidence intervals:</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 102.1000 1.57000 98.8600 105.3000</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent -0.3020 0.03885 -0.3812 -0.2229</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M1 -1.2070 0.07123 -1.3520 -1.0620</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M2 -3.9010 0.06571 -4.0350 -3.7670</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis 1.2010 0.23530 0.7216 1.6800</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_qlogis 0.9589 0.24890 0.4520 1.4660</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.2730 0.25740 1.7490 2.7970</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Parameter correlation:</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent log_k_M1 log_k_M2 f_parent_qlogis</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 1.000e+00 3.933e-01 -1.605e-01 2.819e-02 -4.624e-01</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent 3.933e-01 1.000e+00 -4.082e-01 7.166e-02 -5.682e-01</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M1 -1.605e-01 -4.082e-01 1.000e+00 -3.929e-01 7.478e-01</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M2 2.819e-02 7.166e-02 -3.929e-01 1.000e+00 -2.658e-01</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -4.624e-01 -5.682e-01 7.478e-01 -2.658e-01 1.000e+00</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_qlogis 1.614e-01 4.102e-01 -8.109e-01 5.419e-01 -8.605e-01</span> +<span class="r-out co"><span class="r-pr">#></span> sigma -1.377e-08 7.536e-10 1.089e-08 -4.422e-08 7.124e-09</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_qlogis sigma</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 1.614e-01 -1.377e-08</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent 4.102e-01 7.536e-10</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M1 -8.109e-01 1.089e-08</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_M2 5.419e-01 -4.422e-08</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -8.605e-01 7.124e-09</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_qlogis 1.000e+00 -2.685e-08</span> +<span class="r-out co"><span class="r-pr">#></span> sigma -2.685e-08 1.000e+00</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters:</span> +<span class="r-out co"><span class="r-pr">#></span> Confidence intervals for internally transformed parameters are asymmetric.</span> +<span class="r-out co"><span class="r-pr">#></span> t-test (unrealistically) based on the assumption of normal distribution</span> +<span class="r-out co"><span class="r-pr">#></span> for estimators of untransformed parameters.</span> +<span class="r-out co"><span class="r-pr">#></span> Estimate t value Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 102.10000 65.000 7.281e-36 98.86000 105.30000</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.73930 25.740 2.948e-23 0.68310 0.80020</span> +<span class="r-out co"><span class="r-pr">#></span> k_M1 0.29920 14.040 1.577e-15 0.25880 0.34590</span> +<span class="r-out co"><span class="r-pr">#></span> k_M2 0.02023 15.220 1.653e-16 0.01769 0.02312</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_M1 0.76870 18.370 7.295e-19 0.67300 0.84290</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_to_M2 0.72290 14.500 6.418e-16 0.61110 0.81240</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.27300 8.832 2.161e-10 1.74900 2.79700</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> FOCUS Chi2 error levels in percent:</span> +<span class="r-out co"><span class="r-pr">#></span> err.min n.optim df</span> +<span class="r-out co"><span class="r-pr">#></span> All data 8.454 6 17</span> +<span class="r-out co"><span class="r-pr">#></span> parent 8.660 2 6</span> +<span class="r-out co"><span class="r-pr">#></span> M1 10.583 2 5</span> +<span class="r-out co"><span class="r-pr">#></span> M2 3.586 2 6</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Resulting formation fractions:</span> +<span class="r-out co"><span class="r-pr">#></span> ff</span> +<span class="r-out co"><span class="r-pr">#></span> parent_M1 0.7687</span> +<span class="r-out co"><span class="r-pr">#></span> parent_sink 0.2313</span> +<span class="r-out co"><span class="r-pr">#></span> M1_M2 0.7229</span> +<span class="r-out co"><span class="r-pr">#></span> M1_sink 0.2771</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> +<span class="r-out co"><span class="r-pr">#></span> DT50 DT90</span> +<span class="r-out co"><span class="r-pr">#></span> parent 0.9376 3.114</span> +<span class="r-out co"><span class="r-pr">#></span> M1 2.3170 7.697</span> +<span class="r-out co"><span class="r-pr">#></span> M2 34.2689 113.839</span> +<span class="r-out co"><span class="r-pr">#></span> </span> +<span class="r-out co"><span class="r-pr">#></span> Data:</span> +<span class="r-out co"><span class="r-pr">#></span> time variable observed predicted residual</span> +<span class="r-out co"><span class="r-pr">#></span> 0 parent 101.5 1.021e+02 -0.56248</span> +<span class="r-out co"><span class="r-pr">#></span> 0 parent 101.2 1.021e+02 -0.86248</span> +<span class="r-out co"><span class="r-pr">#></span> 1 parent 53.9 4.873e+01 5.17118</span> +<span class="r-out co"><span class="r-pr">#></span> 1 parent 47.5 4.873e+01 -1.22882</span> +<span class="r-out co"><span class="r-pr">#></span> 3 parent 10.4 1.111e+01 -0.70773</span> +<span class="r-out co"><span class="r-pr">#></span> 3 parent 7.6 1.111e+01 -3.50773</span> +<span class="r-out co"><span class="r-pr">#></span> 7 parent 1.1 5.772e-01 0.52283</span> +<span class="r-out co"><span class="r-pr">#></span> 7 parent 0.3 5.772e-01 -0.27717</span> +<span class="r-out co"><span class="r-pr">#></span> 14 parent 3.5 3.264e-03 3.49674</span> +<span class="r-out co"><span class="r-pr">#></span> 28 parent 3.2 1.045e-07 3.20000</span> +<span class="r-out co"><span class="r-pr">#></span> 90 parent 0.6 9.532e-10 0.60000</span> +<span class="r-out co"><span class="r-pr">#></span> 120 parent 3.5 -5.940e-10 3.50000</span> +<span class="r-out co"><span class="r-pr">#></span> 1 M1 36.4 3.479e+01 1.61088</span> +<span class="r-out co"><span class="r-pr">#></span> 1 M1 37.4 3.479e+01 2.61088</span> +<span class="r-out co"><span class="r-pr">#></span> 3 M1 34.3 3.937e+01 -5.07027</span> +<span class="r-out co"><span class="r-pr">#></span> 3 M1 39.8 3.937e+01 0.42973</span> +<span class="r-out co"><span class="r-pr">#></span> 7 M1 15.1 1.549e+01 -0.38715</span> +<span class="r-out co"><span class="r-pr">#></span> 7 M1 17.8 1.549e+01 2.31285</span> +<span class="r-out co"><span class="r-pr">#></span> 14 M1 5.8 1.995e+00 3.80469</span> +<span class="r-out co"><span class="r-pr">#></span> 14 M1 1.2 1.995e+00 -0.79531</span> +<span class="r-out co"><span class="r-pr">#></span> 60 M1 0.5 2.111e-06 0.50000</span> +<span class="r-out co"><span class="r-pr">#></span> 90 M1 3.2 -9.672e-10 3.20000</span> +<span class="r-out co"><span class="r-pr">#></span> 120 M1 1.5 7.670e-10 1.50000</span> +<span class="r-out co"><span class="r-pr">#></span> 120 M1 0.6 7.670e-10 0.60000</span> +<span class="r-out co"><span class="r-pr">#></span> 1 M2 4.8 4.455e+00 0.34517</span> +<span class="r-out co"><span class="r-pr">#></span> 3 M2 20.9 2.153e+01 -0.62527</span> +<span class="r-out co"><span class="r-pr">#></span> 3 M2 19.3 2.153e+01 -2.22527</span> +<span class="r-out co"><span class="r-pr">#></span> 7 M2 42.0 4.192e+01 0.07941</span> +<span class="r-out co"><span class="r-pr">#></span> 7 M2 43.1 4.192e+01 1.17941</span> +<span class="r-out co"><span class="r-pr">#></span> 14 M2 49.4 4.557e+01 3.83353</span> +<span class="r-out co"><span class="r-pr">#></span> 14 M2 44.3 4.557e+01 -1.26647</span> +<span class="r-out co"><span class="r-pr">#></span> 28 M2 34.6 3.547e+01 -0.87275</span> +<span class="r-out co"><span class="r-pr">#></span> 28 M2 33.0 3.547e+01 -2.47275</span> +<span class="r-out co"><span class="r-pr">#></span> 60 M2 18.8 1.858e+01 0.21837</span> +<span class="r-out co"><span class="r-pr">#></span> 60 M2 17.6 1.858e+01 -0.98163</span> +<span class="r-out co"><span class="r-pr">#></span> 90 M2 10.6 1.013e+01 0.47130</span> +<span class="r-out co"><span class="r-pr">#></span> 90 M2 10.8 1.013e+01 0.67130</span> +<span class="r-out co"><span class="r-pr">#></span> 120 M2 9.8 5.521e+00 4.27893</span> +<span class="r-out co"><span class="r-pr">#></span> 120 M2 3.3 5.521e+00 -2.22107</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/test_data_from_UBA_2014-1.png b/docs/dev/reference/test_data_from_UBA_2014-1.png Binary files differnew file mode 100644 index 00000000..db29d16d --- /dev/null +++ b/docs/dev/reference/test_data_from_UBA_2014-1.png diff --git a/docs/dev/reference/test_data_from_UBA_2014-2.png b/docs/dev/reference/test_data_from_UBA_2014-2.png Binary files differnew file mode 100644 index 00000000..2bfb77f7 --- /dev/null +++ b/docs/dev/reference/test_data_from_UBA_2014-2.png diff --git a/docs/dev/reference/test_data_from_UBA_2014.html b/docs/dev/reference/test_data_from_UBA_2014.html new file mode 100644 index 00000000..0d6b8105 --- /dev/null +++ b/docs/dev/reference/test_data_from_UBA_2014.html @@ -0,0 +1,195 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014 • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014"><meta name="description" content="The datasets were used for the comparative validation of several kinetic evaluation + software packages (Ranke, 2014)."><meta property="og:description" content="The datasets were used for the comparative validation of several kinetic evaluation + software packages (Ranke, 2014)."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Three experimental datasets from two water sediment systems and one soil</h1> + + <div class="d-none name"><code>test_data_from_UBA_2014.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The datasets were used for the comparative validation of several kinetic evaluation + software packages (Ranke, 2014).</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="va">test_data_from_UBA_2014</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2> + <p>A list containing three datasets as an R6 class defined by <code><a href="mkinds.html">mkinds</a></code>. + Each dataset has, among others, the following components</p><dl><dt><code>title</code></dt> +<dd><p>The name of the dataset, e.g. <code>UBA_2014_WS_river</code></p></dd> + + <dt><code>data</code></dt> +<dd><p>A data frame with the data in the form expected by <code><a href="mkinfit.html">mkinfit</a></code></p></dd> + + +</dl></div> + <div class="section level2"> + <h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2> + <p>Ranke (2014) Prüfung und Validierung von Modellierungssoftware als Alternative + zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span> <span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span> <span class="co"># This is a level P-II evaluation of the dataset according to the FOCUS kinetics</span></span></span> +<span class="r-in"><span> <span class="co"># guidance. Due to the strong correlation of the parameter estimates, the</span></span></span> +<span class="r-in"><span> <span class="co"># covariance matrix is not returned. Note that level P-II evaluations are</span></span></span> +<span class="r-in"><span> <span class="co"># generally considered deprecated due to the frequent occurrence of such</span></span></span> +<span class="r-in"><span> <span class="co"># large parameter correlations, among other reasons (e.g. the adequacy of the</span></span></span> +<span class="r-in"><span> <span class="co"># model).</span></span></span> +<span class="r-in"><span> <span class="va">m_ws</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>parent_w <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"parent_s"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> parent_s <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"parent_w"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span> <span class="va">f_river</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_ws</span>, <span class="va">test_data_from_UBA_2014</span><span class="op">[[</span><span class="fl">1</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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span> <span class="fu"><a href="plot.mkinfit.html">plot_sep</a></span><span class="op">(</span><span class="va">f_river</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="test_data_from_UBA_2014-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_river</span><span class="op">)</span><span class="op">$</span><span class="va">bpar</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t)</span> +<span class="r-out co"><span class="r-pr">#></span> parent_w_0 95.98567441 2.16285684 44.3791159 1.245593e-17</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_w 0.42068803 0.05573864 7.5475120 8.752928e-07</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_s 0.07419672 0.10108562 0.7339987 2.371337e-01</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_w_to_parent_s 0.14336920 0.05809346 2.4679062 1.305295e-02</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_s_to_parent_w 1.00000000 3.13868615 0.3186046 3.772097e-01</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.98287858 0.68923267 4.3278253 2.987160e-04</span> +<span class="r-out co"><span class="r-pr">#></span> Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_w_0 91.48420501 100.4871438</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_w 0.36593946 0.4836276</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_s 0.02289956 0.2404043</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_w_to_parent_s 0.08180934 0.2391848</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_s_to_parent_w 0.00000000 1.0000000</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 2.00184022 3.9639169</span> +<span class="r-in"><span> <span class="fu"><a href="mkinerrmin.html">mkinerrmin</a></span><span class="op">(</span><span class="va">f_river</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> err.min n.optim df</span> +<span class="r-out co"><span class="r-pr">#></span> All data 0.09246946 5 6</span> +<span class="r-out co"><span class="r-pr">#></span> parent_w 0.06377096 3 3</span> +<span class="r-out co"><span class="r-pr">#></span> parent_s 0.20882325 2 3</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="co"># This is the evaluation used for the validation of software packages</span></span></span> +<span class="r-in"><span> <span class="co"># in the expertise from 2014</span></span></span> +<span class="r-in"><span> <span class="va">m_soil</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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M3"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"M3"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M3 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> use_of_ff <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span> <span class="va">f_soil</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_soil</span>, <span class="va">test_data_from_UBA_2014</span><span class="op">[[</span><span class="fl">3</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></span></span> +<span class="r-wrn co"><span class="r-pr">#></span> <span class="warning">Warning: </span>Observations with value of zero were removed from the data</span> +<span class="r-in"><span> <span class="fu"><a href="plot.mkinfit.html">plot_sep</a></span><span class="op">(</span><span class="va">f_soil</span>, lpos <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"topright"</span>, <span class="st">"topright"</span>, <span class="st">"topright"</span>, <span class="st">"bottomright"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="test_data_from_UBA_2014-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_soil</span><span class="op">)</span><span class="op">$</span><span class="va">bpar</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t) Lower</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 76.55425650 0.859186398 89.1008711 1.113861e-26 74.755959420</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.12081956 0.004601918 26.2541722 1.077359e-16 0.111561575</span> +<span class="r-out co"><span class="r-pr">#></span> k_M1 0.84258615 0.806159719 1.0451851 1.545266e-01 0.113779564</span> +<span class="r-out co"><span class="r-pr">#></span> k_M2 0.04210880 0.017083034 2.4649483 1.170188e-02 0.018013857</span> +<span class="r-out co"><span class="r-pr">#></span> k_M3 0.01122918 0.007245855 1.5497385 6.885051e-02 0.002909431</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_M1 0.32240200 0.240783878 1.3389684 9.819070e-02 NA</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_M2 0.16099855 0.033691952 4.7785463 6.531136e-05 NA</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_to_M3 0.27921507 0.269423709 1.0363419 1.565266e-01 0.022978202</span> +<span class="r-out co"><span class="r-pr">#></span> f_M2_to_M3 0.55641252 0.595119937 0.9349586 1.807707e-01 0.008002509</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.14005399 0.149696423 7.6157731 1.727024e-07 0.826735778</span> +<span class="r-out co"><span class="r-pr">#></span> Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 78.35255358</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.13084582</span> +<span class="r-out co"><span class="r-pr">#></span> k_M1 6.23970946</span> +<span class="r-out co"><span class="r-pr">#></span> k_M2 0.09843260</span> +<span class="r-out co"><span class="r-pr">#></span> k_M3 0.04333992</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_M1 NA</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_M2 NA</span> +<span class="r-out co"><span class="r-pr">#></span> f_M1_to_M3 0.86450778</span> +<span class="r-out co"><span class="r-pr">#></span> f_M2_to_M3 0.99489895</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 1.45337221</span> +<span class="r-in"><span> <span class="fu"><a href="mkinerrmin.html">mkinerrmin</a></span><span class="op">(</span><span class="va">f_soil</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> err.min n.optim df</span> +<span class="r-out co"><span class="r-pr">#></span> All data 0.09649963 9 20</span> +<span class="r-out co"><span class="r-pr">#></span> parent 0.04721283 2 6</span> +<span class="r-out co"><span class="r-pr">#></span> M1 0.26551208 2 5</span> +<span class="r-out co"><span class="r-pr">#></span> M2 0.20327575 2 5</span> +<span class="r-out co"><span class="r-pr">#></span> M3 0.05196550 3 4</span> +<span class="r-in"><span> <span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/tex_listing.html b/docs/dev/reference/tex_listing.html new file mode 100644 index 00000000..779fff4c --- /dev/null +++ b/docs/dev/reference/tex_listing.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/summary_listing.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/summary_listing.html"> + </head> +</html> + diff --git a/docs/dev/reference/transform_odeparms.html b/docs/dev/reference/transform_odeparms.html new file mode 100644 index 00000000..42125012 --- /dev/null +++ b/docs/dev/reference/transform_odeparms.html @@ -0,0 +1,293 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms"><meta name="description" content="The transformations are intended to map parameters that should only take on +restricted values to the full scale of real numbers. For kinetic rate +constants and other parameters that can only take on positive values, a +simple log transformation is used. For compositional parameters, such as the +formations fractions that should always sum up to 1 and can not be negative, +the ilr transformation is used."><meta property="og:description" content="The transformations are intended to map parameters that should only take on +restricted values to the full scale of real numbers. For kinetic rate +constants and other parameters that can only take on positive values, a +simple log transformation is used. For compositional parameters, such as the +formations fractions that should always sum up to 1 and can not be negative, +the ilr transformation is used."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Functions to transform and backtransform kinetic parameters for fitting</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/transform_odeparms.R" class="external-link"><code>R/transform_odeparms.R</code></a></small> + <div class="d-none name"><code>transform_odeparms.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>The transformations are intended to map parameters that should only take on +restricted values to the full scale of real numbers. For kinetic rate +constants and other parameters that can only take on positive values, a +simple log transformation is used. For compositional parameters, such as the +formations fractions that should always sum up to 1 and can not be negative, +the <a href="ilr.html">ilr</a> transformation is used.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">transform_odeparms</span><span class="op">(</span></span> +<span> <span class="va">parms</span>,</span> +<span> <span class="va">mkinmod</span>,</span> +<span> transform_rates <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> transform_fractions <span class="op">=</span> <span class="cn">TRUE</span></span> +<span><span class="op">)</span></span> +<span></span> +<span><span class="fu">backtransform_odeparms</span><span class="op">(</span></span> +<span> <span class="va">transparms</span>,</span> +<span> <span class="va">mkinmod</span>,</span> +<span> transform_rates <span class="op">=</span> <span class="cn">TRUE</span>,</span> +<span> transform_fractions <span class="op">=</span> <span class="cn">TRUE</span></span> +<span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-parms">parms<a class="anchor" aria-label="anchor" href="#arg-parms"></a></dt> +<dd><p>Parameters of kinetic models as used in the differential +equations.</p></dd> + + +<dt id="arg-mkinmod">mkinmod<a class="anchor" aria-label="anchor" href="#arg-mkinmod"></a></dt> +<dd><p>The kinetic model of class <a href="mkinmod.html">mkinmod</a>, containing +the names of the model variables that are needed for grouping the +formation fractions before <a href="ilr.html">ilr</a> transformation, the parameter +names and the information if the pathway to sink is included in the model.</p></dd> + + +<dt id="arg-transform-rates">transform_rates<a class="anchor" aria-label="anchor" href="#arg-transform-rates"></a></dt> +<dd><p>Boolean specifying if kinetic rate constants should +be transformed in the model specification used in the fitting for better +compliance with the assumption of normal distribution of the estimator. If +TRUE, also alpha and beta parameters of the FOMC model are +log-transformed, as well as k1 and k2 rate constants for the DFOP and HS +models and the break point tb of the HS model.</p></dd> + + +<dt id="arg-transform-fractions">transform_fractions<a class="anchor" aria-label="anchor" href="#arg-transform-fractions"></a></dt> +<dd><p>Boolean specifying if formation fractions +constants should be transformed in the model specification used in the +fitting for better compliance with the assumption of normal distribution +of the estimator. The default (TRUE) is to do transformations. +The g parameter of the DFOP model is also seen as a fraction. +If a single fraction is transformed (g parameter of DFOP or only a single +target variable e.g. a single metabolite plus a pathway to sink), a +logistic transformation is used <code><a href="https://rdrr.io/r/stats/Logistic.html" class="external-link">stats::qlogis()</a></code>. In other cases, i.e. if +two or more formation fractions need to be transformed whose sum cannot +exceed one, the <a href="ilr.html">ilr</a> transformation is used.</p></dd> + + +<dt id="arg-transparms">transparms<a class="anchor" aria-label="anchor" href="#arg-transparms"></a></dt> +<dd><p>Transformed parameters of kinetic models as used in the +fitting procedure.</p></dd> + +</dl></div> + <div class="section level2"> + <h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2> + <p>A vector of transformed or backtransformed parameters</p> + </div> + <div class="section level2"> + <h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2> + <p>The transformation of sets of formation fractions is fragile, as it supposes +the same ordering of the components in forward and backward transformation. +This is no problem for the internal use in <a href="mkinfit.html">mkinfit</a>.</p> + </div> + <div class="section level2"> + <h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2> + <p>Johannes Ranke</p> + </div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span></span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"m1"</span>, sink <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># Fit the model to the FOCUS example dataset D using defaults</span></span></span> +<span class="r-in"><span><span class="va">FOCUS_D</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">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"># remove zero values to avoid warning</span></span></span> +<span class="r-in"><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="va">SFO_SFO</span>, <span class="va">FOCUS_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">fit.s</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="co"># Transformed and backtransformed parameters</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">fit.s</span><span class="op">$</span><span class="va">par</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 99.60 1.5702 96.40 102.79</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent_sink -3.04 0.0763 -3.19 -2.88</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent_m1 -2.98 0.0403 -3.06 -2.90</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1_sink -5.25 0.1332 -5.52 -4.98</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 3.13 0.3585 2.40 3.85</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">fit.s</span><span class="op">$</span><span class="va">bpar</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 99.59848 1.57022 63.43 2.30e-36 96.40384 102.7931</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink 0.04792 0.00365 13.11 6.13e-15 0.04103 0.0560</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 0.05078 0.00205 24.80 3.27e-23 0.04678 0.0551</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink 0.00526 0.00070 7.51 6.16e-09 0.00401 0.0069</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.8549</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="co"># Compare to the version without transforming rate parameters (does not work</span></span></span> +<span class="r-in"><span><span class="co"># with analytical solution, we get NA values for m1 in predictions)</span></span></span> +<span class="r-in"><span><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>, transform_rates <span class="op">=</span> <span class="cn">FALSE</span>,</span></span> +<span class="r-in"><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></span> +<span class="r-in"><span><span class="va">fit.2.s</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit.2</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">fit.2.s</span><span class="op">$</span><span class="va">par</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 99.59848 1.57022 96.40384 1.03e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink 0.04792 0.00365 0.04049 5.54e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 0.05078 0.00205 0.04661 5.49e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink 0.00526 0.00070 0.00384 6.69e-03</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 3.12550 0.35852 2.39609 3.85e+00</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">fit.2.s</span><span class="op">$</span><span class="va">bpar</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 99.59848 1.57022 63.43 2.30e-36 96.40384 1.03e+02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_sink 0.04792 0.00365 13.11 6.13e-15 0.04049 5.54e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent_m1 0.05078 0.00205 24.80 3.27e-23 0.04661 5.49e-02</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1_sink 0.00526 0.00070 7.51 6.16e-09 0.00384 6.69e-03</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.85e+00</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">initials</span> <span class="op"><-</span> <span class="va">fit</span><span class="op">$</span><span class="va">start</span><span class="op">$</span><span class="va">value</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">initials</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/colnames.html" class="external-link">rownames</a></span><span class="op">(</span><span class="va">fit</span><span class="op">$</span><span class="va">start</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">transformed</span> <span class="op"><-</span> <span class="va">fit</span><span class="op">$</span><span class="va">start_transformed</span><span class="op">$</span><span class="va">value</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">transformed</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/colnames.html" class="external-link">rownames</a></span><span class="op">(</span><span class="va">fit</span><span class="op">$</span><span class="va">start_transformed</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">transform_odeparms</span><span class="op">(</span><span class="va">initials</span>, <span class="va">SFO_SFO</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 100.750000 -2.302585 -2.301586 -2.300587 </span> +<span class="r-in"><span><span class="fu">backtransform_odeparms</span><span class="op">(</span><span class="va">transformed</span>, <span class="va">SFO_SFO</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 k_parent_sink k_parent_m1 k_m1_sink </span> +<span class="r-out co"><span class="r-pr">#></span> 100.7500 0.1000 0.1001 0.1002 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="co"># The case of formation fractions (this is now the default)</span></span></span> +<span class="r-in"><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></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"m1"</span>, sink <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> use_of_ff <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">fit.ff</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="va">FOCUS_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">fit.ff.s</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit.ff</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">fit.ff.s</span><span class="op">$</span><span class="va">par</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 99.5985 1.5702 96.404 102.79</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent -2.3157 0.0409 -2.399 -2.23</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 -5.2475 0.1332 -5.518 -4.98</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis 0.0579 0.0893 -0.124 0.24</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 3.1255 0.3585 2.396 3.85</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">fit.ff.s</span><span class="op">$</span><span class="va">bpar</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 99.59848 1.57022 63.43 2.30e-36 96.40383 102.7931</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.09870 0.00403 24.47 4.96e-23 0.09082 0.1073</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.00526 0.00070 7.51 6.16e-09 0.00401 0.0069</span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 0.51448 0.02230 23.07 3.10e-22 0.46912 0.5596</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.8549</span> +<span class="r-in"><span><span class="va">initials</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"f_parent_to_m1"</span> <span class="op">=</span> <span class="fl">0.5</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">transformed</span> <span class="op"><-</span> <span class="fu">transform_odeparms</span><span class="op">(</span><span class="va">initials</span>, <span class="va">SFO_SFO.ff</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu">backtransform_odeparms</span><span class="op">(</span><span class="va">transformed</span>, <span class="va">SFO_SFO.ff</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> f_parent_to_m1 </span> +<span class="r-out co"><span class="r-pr">#></span> 0.5 </span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="co"># And without sink</span></span></span> +<span class="r-in"><span><span class="va">SFO_SFO.ff.2</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span></span></span> +<span class="r-in"><span> parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"m1"</span>, sink <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> m1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> use_of_ff <span class="op">=</span> <span class="st">"max"</span><span class="op">)</span></span></span> +<span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> +<span class="r-in"><span></span></span> +<span class="r-in"><span></span></span> +<span class="r-in"><span><span class="va">fit.ff.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.2</span>, <span class="va">FOCUS_D</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">fit.ff.2.s</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">fit.ff.2</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">fit.ff.2.s</span><span class="op">$</span><span class="va">par</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate Std. Error Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 84.79 3.012 78.67 90.91</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_parent -2.76 0.082 -2.92 -2.59</span> +<span class="r-out co"><span class="r-pr">#></span> log_k_m1 -4.21 0.123 -4.46 -3.96</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 8.22 0.943 6.31 10.14</span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">fit.ff.2.s</span><span class="op">$</span><span class="va">bpar</span>, <span class="fl">3</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> Estimate se_notrans t value Pr(>t) Lower Upper</span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 84.7916 3.01203 28.15 1.92e-25 78.6704 90.913</span> +<span class="r-out co"><span class="r-pr">#></span> k_parent 0.0635 0.00521 12.19 2.91e-14 0.0538 0.075</span> +<span class="r-out co"><span class="r-pr">#></span> k_m1 0.0148 0.00182 8.13 8.81e-10 0.0115 0.019</span> +<span class="r-out co"><span class="r-pr">#></span> sigma 8.2229 0.94323 8.72 1.73e-10 6.3060 10.140</span> +<span class="r-in"><span><span class="co"># }</span></span></span> +<span class="r-in"><span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/update.mkinfit-1.png b/docs/dev/reference/update.mkinfit-1.png Binary files differnew file mode 100644 index 00000000..bc818a4c --- /dev/null +++ b/docs/dev/reference/update.mkinfit-1.png diff --git a/docs/dev/reference/update.mkinfit-2.png b/docs/dev/reference/update.mkinfit-2.png Binary files differnew file mode 100644 index 00000000..bbd2b9b7 --- /dev/null +++ b/docs/dev/reference/update.mkinfit-2.png diff --git a/docs/dev/reference/update.mkinfit.html b/docs/dev/reference/update.mkinfit.html new file mode 100644 index 00000000..e83fe3d2 --- /dev/null +++ b/docs/dev/reference/update.mkinfit.html @@ -0,0 +1,138 @@ +<!DOCTYPE html> +<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Update an mkinfit model with different arguments — update.mkinfit • mkin</title><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Update an mkinfit model with different arguments — update.mkinfit"><meta name="description" content="This function will return an updated mkinfit object. The fitted degradation +model parameters from the old fit are used as starting values for the +updated fit. Values specified as 'parms.ini' and/or 'state.ini' will +override these starting values."><meta property="og:description" content="This function will return an updated mkinfit object. The fitted degradation +model parameters from the old fit are used as starting values for the +updated fit. Values specified as 'parms.ini' and/or 'state.ini' will +override these starting values."><meta name="robots" content="noindex"></head><body> + <a href="#main" class="visually-hidden-focusable">Skip to contents</a> + + + <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="default" aria-label="Site navigation"><div class="container"> + + <a class="navbar-brand me-2" href="../index.html">mkin</a> + + <small class="nav-text text-info me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="In-development version">1.2.10</small> + + + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div id="navbar" class="collapse navbar-collapse ms-3"> + <ul class="navbar-nav me-auto"><li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li> +<li class="nav-item dropdown"> + <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button> + <ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/mkin.html">Introduction to mkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with (generalised) nonlinear least squares</h6></li> + <li><a class="dropdown-item" href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></li> + <li><a class="dropdown-item" href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></li> + <li><a class="dropdown-item" href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Example evaluations with hierarchical models (nonlinear mixed-effects models)</h6></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_parent.html">Testing hierarchical parent degradation kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_dmta_pathway.html">Testing hierarchical pathway kinetics with residue data on dimethenamid and dimethenamid-P</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2023_mesotrione_parent.html">Testing covariate modelling in hierarchical parent degradation kinetics with residue data on mesotrione</a></li> + <li><a class="dropdown-item" href="../articles/prebuilt/2022_cyan_pathway.html">Testing hierarchical pathway kinetics with residue data on cyantraniliprole</a></li> + <li><a class="dropdown-item" href="../articles/web_only/dimethenamid_2018.html">Comparison of saemix and nlme evaluations of dimethenamid data from 2018</a></li> + <li><a class="dropdown-item" href="../articles/web_only/multistart.html">Short demo of the multistart method</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Performance</h6></li> + <li><a class="dropdown-item" href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a></li> + <li><hr class="dropdown-divider"></li> + <li><h6 class="dropdown-header" data-toc-skip>Miscellaneous</h6></li> + <li><a class="dropdown-item" href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a></li> + <li><a class="dropdown-item" href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a></li> + </ul></li> +<li class="nav-item"><a class="nav-link" href="../coverage/coverage.html">Test coverage</a></li> +<li class="nav-item"><a class="nav-link" href="../news/index.html">News</a></li> + </ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search"> + <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li> +<li class="nav-item"><a class="external-link nav-link" href="https://github.com/jranke/mkin/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li> + </ul></div> + + + </div> +</nav><div class="container template-reference-topic"> +<div class="row"> + <main id="main" class="col-md-9"><div class="page-header"> + + <h1>Update an mkinfit model with different arguments</h1> + <small class="dont-index">Source: <a href="https://github.com/jranke/mkin/blob/HEAD/R/update.mkinfit.R" class="external-link"><code>R/update.mkinfit.R</code></a></small> + <div class="d-none name"><code>update.mkinfit.Rd</code></div> + </div> + + <div class="ref-description section level2"> + <p>This function will return an updated mkinfit object. The fitted degradation +model parameters from the old fit are used as starting values for the +updated fit. Values specified as 'parms.ini' and/or 'state.ini' will +override these starting values.</p> + </div> + + <div class="section level2"> + <h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="co"># S3 method for class 'mkinfit'</span></span> +<span><span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span>, evaluate <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div> + </div> + + <div class="section level2"> + <h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2> + + +<dl><dt id="arg-object">object<a class="anchor" aria-label="anchor" href="#arg-object"></a></dt> +<dd><p>An mkinfit object to be updated</p></dd> + + +<dt id="arg--">...<a class="anchor" aria-label="anchor" href="#arg--"></a></dt> +<dd><p>Arguments to <code><a href="mkinfit.html">mkinfit</a></code> that should replace +the arguments from the original call. Arguments set to NULL will +remove arguments given in the original call</p></dd> + + +<dt id="arg-evaluate">evaluate<a class="anchor" aria-label="anchor" href="#arg-evaluate"></a></dt> +<dd><p>Should the call be evaluated or returned as a call</p></dd> + +</dl></div> + + <div class="section level2"> + <h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><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="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">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></span></span> +<span class="r-in"><span><span class="fu"><a href="parms.html">parms</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 k_parent sigma </span> +<span class="r-out co"><span class="r-pr">#></span> 99.44423885 0.09793574 3.39632469 </span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_err</a></span><span class="op">(</span><span class="va">fit</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="update.mkinfit-1.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="va">fit_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">fit</span>, error_model <span class="op">=</span> <span class="st">"tc"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="parms.html">parms</a></span><span class="op">(</span><span class="va">fit_2</span><span class="op">)</span></span></span> +<span class="r-out co"><span class="r-pr">#></span> parent_0 k_parent sigma_low rsd_high </span> +<span class="r-out co"><span class="r-pr">#></span> 1.008549e+02 1.005665e-01 3.752222e-03 6.763434e-02 </span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_err</a></span><span class="op">(</span><span class="va">fit_2</span><span class="op">)</span></span></span> +<span class="r-plt img"><img src="update.mkinfit-2.png" alt="" width="700" height="433"></span> +<span class="r-in"><span><span class="co"># }</span></span></span> +</code></pre></div> + </div> + </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2> + </nav></aside></div> + + + <footer><div class="pkgdown-footer-left"> + <p>Developed by Johannes Ranke.</p> +</div> + +<div class="pkgdown-footer-right"> + <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p> +</div> + + </footer></div> + + + + + + </body></html> + diff --git a/docs/dev/reference/update.nlme.mmkin.html b/docs/dev/reference/update.nlme.mmkin.html new file mode 100644 index 00000000..dc3bfe09 --- /dev/null +++ b/docs/dev/reference/update.nlme.mmkin.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/nlme.mmkin.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/nlme.mmkin.html"> + </head> +</html> + diff --git a/docs/dev/reference/which.best.default.html b/docs/dev/reference/which.best.default.html new file mode 100644 index 00000000..06f15f0c --- /dev/null +++ b/docs/dev/reference/which.best.default.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html"> + </head> +</html> + diff --git a/docs/dev/reference/which.best.html b/docs/dev/reference/which.best.html new file mode 100644 index 00000000..06f15f0c --- /dev/null +++ b/docs/dev/reference/which.best.html @@ -0,0 +1,8 @@ +<html> + <head> + <meta http-equiv="refresh" content="0;URL=https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html" /> + <meta name="robots" content="noindex"> + <link rel="canonical" href="https://pkgdown.jrwb.de/mkin/dev/reference/multistart.html"> + </head> +</html> + |