aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/reference
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-27 06:06:08 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-27 06:06:08 +0200
commita77a10ea6c607346778ba0700b3b66ac393101a2 (patch)
treee91f627fba0580ef237ecbc8f24d6294a59597d3 /docs/dev/reference
parent675a733fa2acc08daabb9b8b571c7d658f281f73 (diff)
Create up to date pkgdown docs in development mode
Diffstat (limited to 'docs/dev/reference')
-rw-r--r--docs/dev/reference/AIC.mmkin.html240
-rw-r--r--docs/dev/reference/CAKE_export.html261
-rw-r--r--docs/dev/reference/DFOP.solution-1.pngbin0 -> 19369 bytes
-rw-r--r--docs/dev/reference/DFOP.solution.html236
-rw-r--r--docs/dev/reference/Extract.mmkin.html253
-rw-r--r--docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html212
-rw-r--r--docs/dev/reference/FOCUS_2006_FOMC_ref_A_to_F.html211
-rw-r--r--docs/dev/reference/FOCUS_2006_HS_ref_A_to_F.html212
-rw-r--r--docs/dev/reference/FOCUS_2006_SFO_ref_A_to_F.html210
-rw-r--r--docs/dev/reference/FOCUS_2006_datasets.html213
-rw-r--r--docs/dev/reference/FOMC.solution-1.pngbin0 -> 18630 bytes
-rw-r--r--docs/dev/reference/FOMC.solution.html245
-rw-r--r--docs/dev/reference/HS.solution-1.pngbin0 -> 18893 bytes
-rw-r--r--docs/dev/reference/HS.solution.html237
-rw-r--r--docs/dev/reference/IORE.solution-1.pngbin0 -> 18668 bytes
-rw-r--r--docs/dev/reference/IORE.solution.html245
-rw-r--r--docs/dev/reference/NAFTA_SOP_2015-1.pngbin0 -> 41379 bytes
-rw-r--r--docs/dev/reference/NAFTA_SOP_2015.html240
-rw-r--r--docs/dev/reference/NAFTA_SOP_Attachment-1.pngbin0 -> 42204 bytes
-rw-r--r--docs/dev/reference/NAFTA_SOP_Attachment.html234
-rw-r--r--docs/dev/reference/SFO.solution-1.pngbin0 -> 18661 bytes
-rw-r--r--docs/dev/reference/SFO.solution.html225
-rw-r--r--docs/dev/reference/SFORB.solution-1.pngbin0 -> 20190 bytes
-rw-r--r--docs/dev/reference/SFORB.solution.html243
-rw-r--r--docs/dev/reference/add_err-1.pngbin0 -> 111278 bytes
-rw-r--r--docs/dev/reference/add_err-2.pngbin0 -> 63031 bytes
-rw-r--r--docs/dev/reference/add_err-3.pngbin0 -> 60608 bytes
-rw-r--r--docs/dev/reference/add_err.html287
-rw-r--r--docs/dev/reference/aw.html221
-rw-r--r--docs/dev/reference/confint.mkinfit.html419
-rw-r--r--docs/dev/reference/create_deg_func.html225
-rw-r--r--docs/dev/reference/endpoints.html232
-rw-r--r--docs/dev/reference/experimental_data_for_UBA-1.pngbin0 -> 107152 bytes
-rw-r--r--docs/dev/reference/experimental_data_for_UBA.html300
-rw-r--r--docs/dev/reference/get_deg_func.html185
-rw-r--r--docs/dev/reference/ilr.html220
-rw-r--r--docs/dev/reference/index.html699
-rw-r--r--docs/dev/reference/loftest-1.pngbin0 -> 27354 bytes
-rw-r--r--docs/dev/reference/loftest-2.pngbin0 -> 27721 bytes
-rw-r--r--docs/dev/reference/loftest-3.pngbin0 -> 78754 bytes
-rw-r--r--docs/dev/reference/loftest-4.pngbin0 -> 76899 bytes
-rw-r--r--docs/dev/reference/loftest-5.pngbin0 -> 75806 bytes
-rw-r--r--docs/dev/reference/loftest.html349
-rw-r--r--docs/dev/reference/logLik.mkinfit.html229
-rw-r--r--docs/dev/reference/logistic.solution-1.pngbin0 -> 80598 bytes
-rw-r--r--docs/dev/reference/logistic.solution-2.pngbin0 -> 29336 bytes
-rw-r--r--docs/dev/reference/logistic.solution.html275
-rw-r--r--docs/dev/reference/lrtest.mkinfit.html265
-rw-r--r--docs/dev/reference/max_twa_parent.html270
-rw-r--r--docs/dev/reference/mccall81_245T.html245
-rw-r--r--docs/dev/reference/mkin_long_to_wide.html233
-rw-r--r--docs/dev/reference/mkin_wide_to_long.html213
-rw-r--r--docs/dev/reference/mkinds.html253
-rw-r--r--docs/dev/reference/mkinerrmin.html233
-rw-r--r--docs/dev/reference/mkinerrplot-1.pngbin0 -> 41458 bytes
-rw-r--r--docs/dev/reference/mkinerrplot.html272
-rw-r--r--docs/dev/reference/mkinfit.html1054
-rw-r--r--docs/dev/reference/mkinmod.html320
-rw-r--r--docs/dev/reference/mkinparplot-1.pngbin0 -> 16468 bytes
-rw-r--r--docs/dev/reference/mkinparplot.html203
-rw-r--r--docs/dev/reference/mkinplot.html198
-rw-r--r--docs/dev/reference/mkinpredict.html447
-rw-r--r--docs/dev/reference/mkinresplot-1.pngbin0 -> 14861 bytes
-rw-r--r--docs/dev/reference/mkinresplot.html275
-rw-r--r--docs/dev/reference/mkinsub.html228
-rw-r--r--docs/dev/reference/mmkin-1.pngbin0 -> 115683 bytes
-rw-r--r--docs/dev/reference/mmkin-2.pngbin0 -> 113464 bytes
-rw-r--r--docs/dev/reference/mmkin-3.pngbin0 -> 100817 bytes
-rw-r--r--docs/dev/reference/mmkin-4.pngbin0 -> 70430 bytes
-rw-r--r--docs/dev/reference/mmkin-5.pngbin0 -> 66959 bytes
-rw-r--r--docs/dev/reference/mmkin.html271
-rw-r--r--docs/dev/reference/nafta-1.pngbin0 -> 41379 bytes
-rw-r--r--docs/dev/reference/nafta.html283
-rw-r--r--docs/dev/reference/nlme-1.pngbin0 -> 71631 bytes
-rw-r--r--docs/dev/reference/nlme.html281
-rw-r--r--docs/dev/reference/nlme.mmkin-1.pngbin0 -> 81816 bytes
-rw-r--r--docs/dev/reference/nlme.mmkin-2.pngbin0 -> 82384 bytes
-rw-r--r--docs/dev/reference/nlme.mmkin-3.pngbin0 -> 82591 bytes
-rw-r--r--docs/dev/reference/nlme.mmkin-4.pngbin0 -> 86006 bytes
-rw-r--r--docs/dev/reference/nlme.mmkin-5.pngbin0 -> 85418 bytes
-rw-r--r--docs/dev/reference/nlme.mmkin-6.pngbin0 -> 84796 bytes
-rw-r--r--docs/dev/reference/nlme.mmkin-7.pngbin0 -> 84926 bytes
-rw-r--r--docs/dev/reference/nlme.mmkin.html463
-rw-r--r--docs/dev/reference/nobs.mkinfit.html197
-rw-r--r--docs/dev/reference/parms.html292
-rw-r--r--docs/dev/reference/plot.mkinfit-1.pngbin0 -> 53973 bytes
-rw-r--r--docs/dev/reference/plot.mkinfit-2.pngbin0 -> 75079 bytes
-rw-r--r--docs/dev/reference/plot.mkinfit-3.pngbin0 -> 70266 bytes
-rw-r--r--docs/dev/reference/plot.mkinfit-4.pngbin0 -> 74166 bytes
-rw-r--r--docs/dev/reference/plot.mkinfit-5.pngbin0 -> 68692 bytes
-rw-r--r--docs/dev/reference/plot.mkinfit-6.pngbin0 -> 75012 bytes
-rw-r--r--docs/dev/reference/plot.mkinfit-7.pngbin0 -> 75692 bytes
-rw-r--r--docs/dev/reference/plot.mkinfit.html379
-rw-r--r--docs/dev/reference/plot.mmkin-1.pngbin0 -> 34273 bytes
-rw-r--r--docs/dev/reference/plot.mmkin-2.pngbin0 -> 34629 bytes
-rw-r--r--docs/dev/reference/plot.mmkin-3.pngbin0 -> 32259 bytes
-rw-r--r--docs/dev/reference/plot.mmkin-4.pngbin0 -> 25550 bytes
-rw-r--r--docs/dev/reference/plot.mmkin-5.pngbin0 -> 38129 bytes
-rw-r--r--docs/dev/reference/plot.mmkin.html287
-rw-r--r--docs/dev/reference/plot.nafta.html210
-rw-r--r--docs/dev/reference/plot.nlme.mmkin-1.pngbin0 -> 35382 bytes
-rw-r--r--docs/dev/reference/plot.nlme.mmkin-2.pngbin0 -> 35346 bytes
-rw-r--r--docs/dev/reference/plot.nlme.mmkin.html275
-rw-r--r--docs/dev/reference/print.mkinds.html194
-rw-r--r--docs/dev/reference/print.mkinmod.html217
-rw-r--r--docs/dev/reference/reexports.html190
-rw-r--r--docs/dev/reference/residuals.mkinfit.html204
-rw-r--r--docs/dev/reference/saemix-1.pngbin0 -> 31551 bytes
-rw-r--r--docs/dev/reference/saemix-2.pngbin0 -> 58815 bytes
-rw-r--r--docs/dev/reference/saemix.html446
-rw-r--r--docs/dev/reference/schaefer07_complex_case-1.pngbin0 -> 67741 bytes
-rw-r--r--docs/dev/reference/schaefer07_complex_case.html239
-rw-r--r--docs/dev/reference/sigma_twocomp.html219
-rw-r--r--docs/dev/reference/summary.mkinfit.html337
-rw-r--r--docs/dev/reference/synthetic_data_for_UBA_2014-1.pngbin0 -> 70430 bytes
-rw-r--r--docs/dev/reference/synthetic_data_for_UBA_2014.html470
-rw-r--r--docs/dev/reference/test_data_from_UBA_2014-1.pngbin0 -> 59294 bytes
-rw-r--r--docs/dev/reference/test_data_from_UBA_2014-2.pngbin0 -> 78194 bytes
-rw-r--r--docs/dev/reference/test_data_from_UBA_2014.html251
-rw-r--r--docs/dev/reference/transform_odeparms.html319
-rw-r--r--docs/dev/reference/update.mkinfit-1.pngbin0 -> 28678 bytes
-rw-r--r--docs/dev/reference/update.mkinfit-2.pngbin0 -> 28541 bytes
-rw-r--r--docs/dev/reference/update.mkinfit.html214
123 files changed, 18305 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..517aff12
--- /dev/null
+++ b/docs/dev/reference/AIC.mmkin.html
@@ -0,0 +1,240 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Calculate the AIC for a column of an mmkin object — AIC.mmkin • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Calculate the AIC for a column of an mmkin object — AIC.mmkin" />
+<meta property="og:description" content="Provides a convenient way to compare different kinetic models fitted to the
+same dataset." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Calculate the AIC for a column of an mmkin object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/AIC.mmkin.R'><code>R/AIC.mmkin.R</code></a></small>
+ <div class="hidden name"><code>AIC.mmkin.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Provides a convenient way to compare different kinetic models fitted to the
+same dataset.</p>
+ </div>
+
+ <pre class="usage"><span class='co'># S3 method for mmkin</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>object</span>, <span class='no'>...</span>, <span class='kw'>k</span> <span class='kw'>=</span> <span class='fl'>2</span>)
+
+<span class='co'># S3 method for mmkin</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An object of class <code><a href='mmkin.html'>mmkin</a></code>, containing only one
+column.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>For compatibility with the generic method</p></td>
+ </tr>
+ <tr>
+ <th>k</th>
+ <td><p>As in the generic method</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='co'># skip, as it takes &gt; 10 s on winbuilder</span>
+ <span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"FOCUS A"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_A</span>,
+ <span class='st'>"FOCUS C"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_C</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Optimisation did not converge:</span>
+#&gt; <span class='warning'>false convergence (8)</span></div><div class='input'> <span class='co'># We get a warning because the FOMC model does not converge for the</span>
+ <span class='co'># FOCUS A dataset, as it is well described by SFO</span>
+
+ <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[<span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span>]) <span class='co'># We get a single number for a single fit</span></div><div class='output co'>#&gt; [1] 55.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span><span class='kw'>[[</span><span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span>]]) <span class='co'># or when extracting an mkinfit object</span></div><div class='output co'>#&gt; [1] 55.28197</div><div class='input'>
+ <span class='co'># For FOCUS A, the models fit almost equally well, so the higher the number</span>
+ <span class='co'># of parameters, the higher (worse) the AIC</span>
+ <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>])</div><div class='output co'>#&gt; df AIC
+#&gt; SFO 3 55.28197
+#&gt; FOMC 4 57.28202
+#&gt; DFOP 5 59.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>], <span class='kw'>k</span> <span class='kw'>=</span> <span class='fl'>0</span>) <span class='co'># If we do not penalize additional parameters, we get nearly the same</span></div><div class='output co'>#&gt; df AIC
+#&gt; SFO 3 49.28197
+#&gt; FOMC 4 49.28202
+#&gt; DFOP 5 49.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>]) <span class='co'># Comparing the BIC gives a very similar picture</span></div><div class='output co'>#&gt; df BIC
+#&gt; SFO 3 55.52030
+#&gt; FOMC 4 57.59979
+#&gt; DFOP 5 59.67918</div><div class='input'>
+ <span class='co'># For FOCUS C, the more complex models fit better</span>
+ <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='output co'>#&gt; df AIC
+#&gt; SFO 3 59.29336
+#&gt; FOMC 4 44.68652
+#&gt; DFOP 5 29.02372</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='output co'>#&gt; df BIC
+#&gt; SFO 3 59.88504
+#&gt; FOMC 4 45.47542
+#&gt; DFOP 5 30.00984</div><div class='input'>
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/CAKE_export.html b/docs/dev/reference/CAKE_export.html
new file mode 100644
index 00000000..ce8a3444
--- /dev/null
+++ b/docs/dev/reference/CAKE_export.html
@@ -0,0 +1,261 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Export a list of datasets format to a CAKE study file — CAKE_export • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Export a list of datasets format to a CAKE study file — CAKE_export" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Export a list of datasets format to a CAKE study file</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/CAKE_export.R'><code>R/CAKE_export.R</code></a></small>
+ <div class="hidden name"><code>CAKE_export.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>In addition to the datasets, the pathways in the degradation model can be
+specified as well.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>CAKE_export</span>(
+ <span class='no'>ds</span>,
+ <span class='kw'>map</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='st'>"Parent"</span>),
+ <span class='kw'>links</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
+ <span class='kw'>filename</span> <span class='kw'>=</span> <span class='st'>"CAKE_export.csf"</span>,
+ <span class='kw'>path</span> <span class='kw'>=</span> <span class='st'>"."</span>,
+ <span class='kw'>overwrite</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>study</span> <span class='kw'>=</span> <span class='st'>"Codlemone aerobic soil degradation"</span>,
+ <span class='kw'>description</span> <span class='kw'>=</span> <span class='st'>""</span>,
+ <span class='kw'>time_unit</span> <span class='kw'>=</span> <span class='st'>"days"</span>,
+ <span class='kw'>res_unit</span> <span class='kw'>=</span> <span class='st'>"% AR"</span>,
+ <span class='kw'>comment</span> <span class='kw'>=</span> <span class='st'>"Created using mkin::CAKE_export"</span>,
+ <span class='kw'>date</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Sys.time.html'>Sys.Date</a></span>(),
+ <span class='kw'>optimiser</span> <span class='kw'>=</span> <span class='st'>"IRLS"</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>ds</th>
+ <td><p>A named list of datasets in long format as compatible with
+<code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>map</th>
+ <td><p>A character vector with CAKE compartment names (Parent, A1, ...),
+named with the names used in the list of datasets.</p></td>
+ </tr>
+ <tr>
+ <th>links</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>filename</th>
+ <td><p>Where to write the result. Should end in .csf in order to be
+compatible with CAKE.</p></td>
+ </tr>
+ <tr>
+ <th>path</th>
+ <td><p>An optional path to the output file.</p></td>
+ </tr>
+ <tr>
+ <th>overwrite</th>
+ <td><p>If TRUE, existing files are overwritten.</p></td>
+ </tr>
+ <tr>
+ <th>study</th>
+ <td><p>The name of the study.</p></td>
+ </tr>
+ <tr>
+ <th>description</th>
+ <td><p>An optional description.</p></td>
+ </tr>
+ <tr>
+ <th>time_unit</th>
+ <td><p>The time unit for the residue data.</p></td>
+ </tr>
+ <tr>
+ <th>res_unit</th>
+ <td><p>The unit used for the residues.</p></td>
+ </tr>
+ <tr>
+ <th>comment</th>
+ <td><p>An optional comment.</p></td>
+ </tr>
+ <tr>
+ <th>date</th>
+ <td><p>The date of file creation.</p></td>
+ </tr>
+ <tr>
+ <th>optimiser</th>
+ <td><p>Can be OLS or IRLS.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The function is called for its side effect.</p>
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/DFOP.solution-1.png b/docs/dev/reference/DFOP.solution-1.png
new file mode 100644
index 00000000..a2d75ccc
--- /dev/null
+++ b/docs/dev/reference/DFOP.solution-1.png
Binary files differ
diff --git a/docs/dev/reference/DFOP.solution.html b/docs/dev/reference/DFOP.solution.html
new file mode 100644
index 00000000..48c3aabb
--- /dev/null
+++ b/docs/dev/reference/DFOP.solution.html
@@ -0,0 +1,236 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Double First-Order in Parallel kinetics — DFOP.solution • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Double First-Order in Parallel kinetics — DFOP.solution" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Double First-Order in Parallel kinetics</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
+ <div class="hidden name"><code>DFOP.solution.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Function describing decline from a defined starting value using the sum of
+two exponential decline functions.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>DFOP.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>g</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>t</th>
+ <td><p>Time.</p></td>
+ </tr>
+ <tr>
+ <th>parent_0</th>
+ <td><p>Starting value for the response variable at time zero.</p></td>
+ </tr>
+ <tr>
+ <th>k1</th>
+ <td><p>First kinetic constant.</p></td>
+ </tr>
+ <tr>
+ <th>k2</th>
+ <td><p>Second kinetic constant.</p></td>
+ </tr>
+ <tr>
+ <th>g</th>
+ <td><p>Fraction of the starting value declining according to the first
+kinetic constant.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The value of the response variable at time <code>t</code>.</p>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>
+FOCUS (2014) &#8220;Generic guidance for Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; 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'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>DFOP.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>5</span>, <span class='fl'>0.5</span>, <span class='fl'>0.3</span>), <span class='fl'>0</span>, <span class='fl'>4</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>,<span class='fl'>100</span>))</div><div class='img'><img src='DFOP.solution-1.png' alt='' width='700' height='433' /></div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/Extract.mmkin.html b/docs/dev/reference/Extract.mmkin.html
new file mode 100644
index 00000000..c69259b6
--- /dev/null
+++ b/docs/dev/reference/Extract.mmkin.html
@@ -0,0 +1,253 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Subsetting method for mmkin objects — [.mmkin • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Subsetting method for mmkin objects — [.mmkin" />
+<meta property="og:description" content="Subsetting method for mmkin objects." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Subsetting method for mmkin objects</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mmkin.R'><code>R/mmkin.R</code></a></small>
+ <div class="hidden name"><code>Extract.mmkin.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Subsetting method for mmkin objects.</p>
+ </div>
+
+ <pre class="usage"># S3 method for mmkin
+[(x, i, j, ..., drop = FALSE)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>An <code><a href='mmkin.html'>mmkin</a> object</code></p></td>
+ </tr>
+ <tr>
+ <th>i</th>
+ <td><p>Row index selecting the fits for specific models</p></td>
+ </tr>
+ <tr>
+ <th>j</th>
+ <td><p>Column index selecting the fits to specific datasets</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Not used, only there to satisfy the generic method definition</p></td>
+ </tr>
+ <tr>
+ <th>drop</th>
+ <td><p>If FALSE, the method always returns an mmkin object, otherwise
+either a list of mkinfit objects or a single mkinfit object.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>An object of class <code><a href='mmkin.html'>mmkin</a></code>.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='co'># Only use one core, to pass R CMD check --as-cran</span>
+ <span class='no'>fits</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>), <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>B</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_B</span>, <span class='kw'>C</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_C</span>),
+ <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ]</div><div class='output co'>#&gt; dataset
+#&gt; model B C
+#&gt; FOMC List,39 List,39
+#&gt; attr(,"class")
+#&gt; [1] "mmkin"</div><div class='input'> <span class='no'>fits</span>[, <span class='st'>"B"</span>]</div><div class='output co'>#&gt; dataset
+#&gt; model B
+#&gt; SFO List,39
+#&gt; FOMC List,39
+#&gt; attr(,"class")
+#&gt; [1] "mmkin"</div><div class='input'> <span class='no'>fits</span>[<span class='st'>"SFO"</span>, <span class='st'>"B"</span>]</div><div class='output co'>#&gt; dataset
+#&gt; model B
+#&gt; SFO List,39
+#&gt; attr(,"class")
+#&gt; [1] "mmkin"</div><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/utils/head.html'>head</a></span>(
+ <span class='co'># This extracts an mkinfit object with lots of components</span>
+ <span class='no'>fits</span><span class='kw'>[[</span><span class='st'>"FOMC"</span>, <span class='st'>"B"</span>]]
+ )</div><div class='output co'>#&gt; $par
+#&gt; parent_0 log_alpha log_beta sigma
+#&gt; 99.666193 2.549849 5.050586 1.890202
+#&gt;
+#&gt; $objective
+#&gt; [1] 28.58291
+#&gt;
+#&gt; $convergence
+#&gt; [1] 0
+#&gt;
+#&gt; $iterations
+#&gt; [1] 21
+#&gt;
+#&gt; $evaluations
+#&gt; function gradient
+#&gt; 25 72
+#&gt;
+#&gt; $message
+#&gt; [1] "both X-convergence and relative convergence (5)"
+#&gt; </div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/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..fcdfcf72
--- /dev/null
+++ b/docs/dev/reference/FOCUS_2006_DFOP_ref_A_to_B.html
@@ -0,0 +1,212 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Results of fitting the DFOP model to Datasets A to B of FOCUS (2006) — FOCUS_2006_DFOP_ref_A_to_B" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Results of fitting the DFOP model to Datasets A to B of FOCUS (2006)</h1>
+
+ <div class="hidden name"><code>FOCUS_2006_DFOP_ref_A_to_B.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='no'>FOCUS_2006_DFOP_ref_A_to_B</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence and
+ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
+ Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+ <a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='fu'><a href='https://rdrr.io/r/utils/data.html'>data</a></span>(<span class='no'>FOCUS_2006_DFOP_ref_A_to_B</span>)</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/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..666a1123
--- /dev/null
+++ b/docs/dev/reference/FOCUS_2006_FOMC_ref_A_to_F.html
@@ -0,0 +1,211 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Results of fitting the FOMC model to Datasets A to F of FOCUS (2006) — FOCUS_2006_FOMC_ref_A_to_F" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Results of fitting the FOMC model to Datasets A to F of FOCUS (2006)</h1>
+
+ <div class="hidden name"><code>FOCUS_2006_FOMC_ref_A_to_F.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='no'>FOCUS_2006_FOMC_ref_A_to_F</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence and
+ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
+ Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+ <a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='fu'><a href='https://rdrr.io/r/utils/data.html'>data</a></span>(<span class='no'>FOCUS_2006_FOMC_ref_A_to_F</span>)</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/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..b07abb0d
--- /dev/null
+++ b/docs/dev/reference/FOCUS_2006_HS_ref_A_to_F.html
@@ -0,0 +1,212 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Results of fitting the HS model to Datasets A to F of FOCUS (2006) — FOCUS_2006_HS_ref_A_to_F" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Results of fitting the HS model to Datasets A to F of FOCUS (2006)</h1>
+
+ <div class="hidden name"><code>FOCUS_2006_HS_ref_A_to_F.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='no'>FOCUS_2006_HS_ref_A_to_F</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence and
+ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
+ Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+ <a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='fu'><a href='https://rdrr.io/r/utils/data.html'>data</a></span>(<span class='no'>FOCUS_2006_HS_ref_A_to_F</span>)</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/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..1e3b91f6
--- /dev/null
+++ b/docs/dev/reference/FOCUS_2006_SFO_ref_A_to_F.html
@@ -0,0 +1,210 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Results of fitting the SFO model to Datasets A to F of FOCUS (2006) — FOCUS_2006_SFO_ref_A_to_F" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Results of fitting the SFO model to Datasets A to F of FOCUS (2006)</h1>
+
+ <div class="hidden name"><code>FOCUS_2006_SFO_ref_A_to_F.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='no'>FOCUS_2006_SFO_ref_A_to_F</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence and
+ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
+ Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+ <a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='fu'><a href='https://rdrr.io/r/utils/data.html'>data</a></span>(<span class='no'>FOCUS_2006_SFO_ref_A_to_F</span>)</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/FOCUS_2006_datasets.html b/docs/dev/reference/FOCUS_2006_datasets.html
new file mode 100644
index 00000000..9836adac
--- /dev/null
+++ b/docs/dev/reference/FOCUS_2006_datasets.html
@@ -0,0 +1,213 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Datasets A to F from the FOCUS Kinetics report from 2006 — FOCUS_2006_datasets" />
+<meta property="og:description" content="Data taken from FOCUS (2006), p. 258." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Datasets A to F from the FOCUS Kinetics report from 2006</h1>
+
+ <div class="hidden name"><code>FOCUS_2006_datasets.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Data taken from FOCUS (2006), p. 258.</p>
+ </div>
+
+ <pre class="usage"><span class='no'>FOCUS_2006_A</span>
+ <span class='no'>FOCUS_2006_B</span>
+ <span class='no'>FOCUS_2006_C</span>
+ <span class='no'>FOCUS_2006_D</span>
+ <span class='no'>FOCUS_2006_E</span>
+ <span class='no'>FOCUS_2006_F</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence and
+ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
+ Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+ <a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='no'>FOCUS_2006_C</span></div><div class='output co'>#&gt; name time value
+#&gt; 1 parent 0 85.1
+#&gt; 2 parent 1 57.9
+#&gt; 3 parent 3 29.9
+#&gt; 4 parent 7 14.6
+#&gt; 5 parent 14 9.7
+#&gt; 6 parent 28 6.6
+#&gt; 7 parent 63 4.0
+#&gt; 8 parent 91 3.9
+#&gt; 9 parent 119 0.6</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/FOMC.solution-1.png b/docs/dev/reference/FOMC.solution-1.png
new file mode 100644
index 00000000..aa41a253
--- /dev/null
+++ b/docs/dev/reference/FOMC.solution-1.png
Binary files differ
diff --git a/docs/dev/reference/FOMC.solution.html b/docs/dev/reference/FOMC.solution.html
new file mode 100644
index 00000000..8ed22157
--- /dev/null
+++ b/docs/dev/reference/FOMC.solution.html
@@ -0,0 +1,245 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>First-Order Multi-Compartment kinetics — FOMC.solution • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="First-Order Multi-Compartment kinetics — FOMC.solution" />
+<meta property="og:description" content="Function describing exponential decline from a defined starting value, with
+a decreasing rate constant." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>First-Order Multi-Compartment kinetics</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
+ <div class="hidden name"><code>FOMC.solution.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Function describing exponential decline from a defined starting value, with
+a decreasing rate constant.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>FOMC.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>alpha</span>, <span class='no'>beta</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>t</th>
+ <td><p>Time.</p></td>
+ </tr>
+ <tr>
+ <th>parent_0</th>
+ <td><p>Starting value for the response variable at time zero.</p></td>
+ </tr>
+ <tr>
+ <th>alpha</th>
+ <td><p>Shape parameter determined by coefficient of variation of rate
+constant values.</p></td>
+ </tr>
+ <tr>
+ <th>beta</th>
+ <td><p>Location parameter.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The value of the response variable at time <code>t</code>.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</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>
+ <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+<p>FOCUS (2014) &#8220;Generic guidance for Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; 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'>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>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>FOMC.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>10</span>, <span class='fl'>2</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>100</span>))</div><div class='img'><img src='FOMC.solution-1.png' alt='' width='700' height='433' /></div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/HS.solution-1.png b/docs/dev/reference/HS.solution-1.png
new file mode 100644
index 00000000..ae056d9b
--- /dev/null
+++ b/docs/dev/reference/HS.solution-1.png
Binary files differ
diff --git a/docs/dev/reference/HS.solution.html b/docs/dev/reference/HS.solution.html
new file mode 100644
index 00000000..5053542a
--- /dev/null
+++ b/docs/dev/reference/HS.solution.html
@@ -0,0 +1,237 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Hockey-Stick kinetics — HS.solution • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Hockey-Stick kinetics — HS.solution" />
+<meta property="og:description" content="Function describing two exponential decline functions with a break point
+between them." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Hockey-Stick kinetics</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
+ <div class="hidden name"><code>HS.solution.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Function describing two exponential decline functions with a break point
+between them.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>HS.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>tb</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>t</th>
+ <td><p>Time.</p></td>
+ </tr>
+ <tr>
+ <th>parent_0</th>
+ <td><p>Starting value for the response variable at time zero.</p></td>
+ </tr>
+ <tr>
+ <th>k1</th>
+ <td><p>First kinetic constant.</p></td>
+ </tr>
+ <tr>
+ <th>k2</th>
+ <td><p>Second kinetic constant.</p></td>
+ </tr>
+ <tr>
+ <th>tb</th>
+ <td><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></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The value of the response variable at time <code>t</code>.</p>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>
+FOCUS (2014) &#8220;Generic guidance for Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; 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'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>HS.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>2</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, <span class='kw'>ylim</span><span class='kw'>=</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>,<span class='fl'>100</span>))</div><div class='img'><img src='HS.solution-1.png' alt='' width='700' height='433' /></div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/IORE.solution-1.png b/docs/dev/reference/IORE.solution-1.png
new file mode 100644
index 00000000..00e28460
--- /dev/null
+++ b/docs/dev/reference/IORE.solution-1.png
Binary files differ
diff --git a/docs/dev/reference/IORE.solution.html b/docs/dev/reference/IORE.solution.html
new file mode 100644
index 00000000..9db7447c
--- /dev/null
+++ b/docs/dev/reference/IORE.solution.html
@@ -0,0 +1,245 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Indeterminate order rate equation kinetics — IORE.solution • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Indeterminate order rate equation kinetics — IORE.solution" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Indeterminate order rate equation kinetics</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
+ <div class="hidden name"><code>IORE.solution.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Function describing exponential decline from a defined starting value, with
+a concentration dependent rate constant.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>IORE.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k__iore</span>, <span class='no'>N</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>t</th>
+ <td><p>Time.</p></td>
+ </tr>
+ <tr>
+ <th>parent_0</th>
+ <td><p>Starting value for the response variable at time zero.</p></td>
+ </tr>
+ <tr>
+ <th>k__iore</th>
+ <td><p>Rate constant. Note that this depends on the concentration
+units used.</p></td>
+ </tr>
+ <tr>
+ <th>N</th>
+ <td><p>Exponent describing the nonlinearity of the rate equation</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The value of the response variable at time <code>t</code>.</p>
+ <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>NAFTA Technical Working Group on Pesticides (not dated) Guidance
+for Evaluating and Calculating Degradation Kinetics in Environmental Media</p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>IORE.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.2</span>, <span class='fl'>1.3</span>), <span class='fl'>0</span>, <span class='fl'>2</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>100</span>))</div><div class='img'><img src='IORE.solution-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='co'># \dontrun{</span>
+ <span class='no'>fit.fomc</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='no'>fit.iore</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"IORE"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='no'>fit.iore.deS</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"IORE"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+
+ <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(<span class='no'>fit.fomc</span>$<span class='no'>par</span>, <span class='no'>fit.iore</span>$<span class='no'>par</span>, <span class='no'>fit.iore.deS</span>$<span class='no'>par</span>,
+ <span class='kw'>row.names</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"model par"</span>, <span class='fl'>1</span>:<span class='fl'>4</span>)))</div><div class='output co'>#&gt; fit.fomc.par fit.iore.par fit.iore.deS.par
+#&gt; model par 1 85.87489063 85.874890 85.874890
+#&gt; model par 2 0.05192238 -4.826631 -4.826631
+#&gt; model par 3 0.65096665 1.949403 1.949403
+#&gt; model par 4 1.85744396 1.857444 1.857444</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/cbind.html'>rbind</a></span>(<span class='kw'>fomc</span> <span class='kw'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.fomc</span>)$<span class='no'>distimes</span>, <span class='kw'>iore</span> <span class='kw'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.iore</span>)$<span class='no'>distimes</span>,
+ <span class='kw'>iore.deS</span> <span class='kw'>=</span> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.iore</span>)$<span class='no'>distimes</span>))</div><div class='output co'>#&gt; DT50 DT90 DT50back
+#&gt; fomc 1.785233 15.1479 4.559973
+#&gt; iore 1.785233 15.1479 4.559973
+#&gt; iore.deS 1.785233 15.1479 4.559973</div><div class='input'> # }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/NAFTA_SOP_2015-1.png b/docs/dev/reference/NAFTA_SOP_2015-1.png
new file mode 100644
index 00000000..9025f2bb
--- /dev/null
+++ b/docs/dev/reference/NAFTA_SOP_2015-1.png
Binary files differ
diff --git a/docs/dev/reference/NAFTA_SOP_2015.html b/docs/dev/reference/NAFTA_SOP_2015.html
new file mode 100644
index 00000000..c7e20a45
--- /dev/null
+++ b/docs/dev/reference/NAFTA_SOP_2015.html
@@ -0,0 +1,240 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015 • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Example datasets from the NAFTA SOP published 2015 — NAFTA_SOP_2015" />
+<meta property="og:description" content="Data taken from US EPA (2015), p. 19 and 23." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Example datasets from the NAFTA SOP published 2015</h1>
+
+ <div class="hidden name"><code>NAFTA_SOP_2015.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Data taken from US EPA (2015), p. 19 and 23.</p>
+ </div>
+
+ <pre class="usage"><span class='no'>NAFTA_SOP_Appendix_B</span>
+ <span class='no'>NAFTA_SOP_Appendix_D</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</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'>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'>https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'> <span class='no'>nafta_evaluation</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='nafta.html'>nafta</a></span>(<span class='no'>NAFTA_SOP_Appendix_D</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)</div><div class='output co'>#&gt; <span class='message'>The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</span></div><div class='output co'>#&gt; <span class='message'>The representative half-life of the IORE model is longer than the one corresponding</span></div><div class='output co'>#&gt; <span class='message'>to the terminal degradation rate found with the DFOP model.</span></div><div class='output co'>#&gt; <span class='message'>The representative half-life obtained from the DFOP model may be used</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>nafta_evaluation</span>)</div><div class='output co'>#&gt; Sums of squares:
+#&gt; SFO IORE DFOP
+#&gt; 1378.6832 615.7730 517.8836
+#&gt;
+#&gt; Critical sum of squares for checking the SFO model:
+#&gt; [1] 717.4598
+#&gt;
+#&gt; Parameters:
+#&gt; $SFO
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 83.7558 1.80e-14 77.18268 90.3288
+#&gt; k_parent_sink 0.0017 7.43e-05 0.00112 0.0026
+#&gt; sigma 8.7518 1.22e-05 5.64278 11.8608
+#&gt;
+#&gt; $IORE
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 9.69e+01 NA 8.88e+01 1.05e+02
+#&gt; k__iore_parent_sink 8.40e-14 NA 1.79e-18 3.94e-09
+#&gt; N_parent 6.68e+00 NA 4.19e+00 9.17e+00
+#&gt; sigma 5.85e+00 NA 3.76e+00 7.94e+00
+#&gt;
+#&gt; $DFOP
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 9.76e+01 1.94e-13 9.02e+01 1.05e+02
+#&gt; k1 4.24e-02 5.92e-03 2.03e-02 8.88e-02
+#&gt; k2 8.24e-04 6.48e-03 3.89e-04 1.75e-03
+#&gt; g 2.88e-01 2.47e-05 1.95e-01 4.03e-01
+#&gt; sigma 5.36e+00 2.22e-05 3.43e+00 7.30e+00
+#&gt;
+#&gt;
+#&gt; DTx values:
+#&gt; DT50 DT90 DT50_rep
+#&gt; SFO 407 1350 407
+#&gt; IORE 541 5190000 1560000
+#&gt; DFOP 429 2380 841
+#&gt;
+#&gt; Representative half-life:
+#&gt; [1] 841.41</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>nafta_evaluation</span>)</div><div class='img'><img src='NAFTA_SOP_2015-1.png' alt='' width='700' height='433' /></div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/NAFTA_SOP_Attachment-1.png b/docs/dev/reference/NAFTA_SOP_Attachment-1.png
new file mode 100644
index 00000000..19da6da7
--- /dev/null
+++ b/docs/dev/reference/NAFTA_SOP_Attachment-1.png
Binary files differ
diff --git a/docs/dev/reference/NAFTA_SOP_Attachment.html b/docs/dev/reference/NAFTA_SOP_Attachment.html
new file mode 100644
index 00000000..7bc7817e
--- /dev/null
+++ b/docs/dev/reference/NAFTA_SOP_Attachment.html
@@ -0,0 +1,234 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Example datasets from Attachment 1 to the NAFTA SOP published 2015 — NAFTA_SOP_Attachment" />
+<meta property="og:description" content="Data taken from from Attachment 1 of the SOP." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Example datasets from Attachment 1 to the NAFTA SOP published 2015</h1>
+
+ <div class="hidden name"><code>NAFTA_SOP_Attachment.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Data taken from from Attachment 1 of the SOP.</p>
+ </div>
+
+ <pre class="usage"><span class='no'>NAFTA_SOP_Attachment</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
+
+ <p>A list (NAFTA_SOP_Attachment) containing 16 datasets suitable
+ for the evaluation with <code><a href='nafta.html'>nafta</a></code></p>
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</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'>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'>https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'> <span class='no'>nafta_att_p5a</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='nafta.html'>nafta</a></span>(<span class='no'>NAFTA_SOP_Attachment</span><span class='kw'>[[</span><span class='st'>"p5a"</span>]], <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)</div><div class='output co'>#&gt; <span class='message'>The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</span></div><div class='output co'>#&gt; <span class='message'>The half-life obtained from the IORE model may be used</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>nafta_att_p5a</span>)</div><div class='output co'>#&gt; Sums of squares:
+#&gt; SFO IORE DFOP
+#&gt; 465.21753 56.27506 32.06401
+#&gt;
+#&gt; Critical sum of squares for checking the SFO model:
+#&gt; [1] 64.4304
+#&gt;
+#&gt; Parameters:
+#&gt; $SFO
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 95.8401 4.67e-21 92.245 99.4357
+#&gt; k_parent_sink 0.0102 3.92e-12 0.009 0.0117
+#&gt; sigma 4.8230 3.81e-06 3.214 6.4318
+#&gt;
+#&gt; $IORE
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 1.01e+02 NA 9.91e+01 1.02e+02
+#&gt; k__iore_parent_sink 1.54e-05 NA 4.08e-06 5.84e-05
+#&gt; N_parent 2.57e+00 NA 2.25e+00 2.89e+00
+#&gt; sigma 1.68e+00 NA 1.12e+00 2.24e+00
+#&gt;
+#&gt; $DFOP
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 9.99e+01 1.41e-26 98.8116 101.0810
+#&gt; k1 2.67e-02 5.05e-06 0.0243 0.0295
+#&gt; k2 2.86e-12 5.00e-01 0.0000 Inf
+#&gt; g 6.47e-01 3.67e-06 0.6248 0.6677
+#&gt; sigma 1.27e+00 8.91e-06 0.8395 1.6929
+#&gt;
+#&gt;
+#&gt; DTx values:
+#&gt; DT50 DT90 DT50_rep
+#&gt; SFO 67.7 2.25e+02 6.77e+01
+#&gt; IORE 58.2 1.07e+03 3.22e+02
+#&gt; DFOP 55.5 4.42e+11 2.42e+11
+#&gt;
+#&gt; Representative half-life:
+#&gt; [1] 321.51</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>nafta_att_p5a</span>)</div><div class='img'><img src='NAFTA_SOP_Attachment-1.png' alt='' width='700' height='433' /></div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/SFO.solution-1.png b/docs/dev/reference/SFO.solution-1.png
new file mode 100644
index 00000000..b0b854bb
--- /dev/null
+++ b/docs/dev/reference/SFO.solution-1.png
Binary files differ
diff --git a/docs/dev/reference/SFO.solution.html b/docs/dev/reference/SFO.solution.html
new file mode 100644
index 00000000..02b3cf22
--- /dev/null
+++ b/docs/dev/reference/SFO.solution.html
@@ -0,0 +1,225 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Single First-Order kinetics — SFO.solution • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Single First-Order kinetics — SFO.solution" />
+<meta property="og:description" content="Function describing exponential decline from a defined starting value." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Single First-Order kinetics</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
+ <div class="hidden name"><code>SFO.solution.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Function describing exponential decline from a defined starting value.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>SFO.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>t</th>
+ <td><p>Time.</p></td>
+ </tr>
+ <tr>
+ <th>parent_0</th>
+ <td><p>Starting value for the response variable at time zero.</p></td>
+ </tr>
+ <tr>
+ <th>k</th>
+ <td><p>Kinetic rate constant.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The value of the response variable at time <code>t</code>.</p>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>
+FOCUS (2014) &#8220;Generic guidance for Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; 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'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>SFO.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>3</span>), <span class='fl'>0</span>, <span class='fl'>2</span>)</div><div class='img'><img src='SFO.solution-1.png' alt='' width='700' height='433' /></div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/SFORB.solution-1.png b/docs/dev/reference/SFORB.solution-1.png
new file mode 100644
index 00000000..cd58caec
--- /dev/null
+++ b/docs/dev/reference/SFORB.solution-1.png
Binary files differ
diff --git a/docs/dev/reference/SFORB.solution.html b/docs/dev/reference/SFORB.solution.html
new file mode 100644
index 00000000..87d39b4e
--- /dev/null
+++ b/docs/dev/reference/SFORB.solution.html
@@ -0,0 +1,243 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Single First-Order Reversible Binding kinetics — SFORB.solution • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Single First-Order Reversible Binding kinetics — SFORB.solution" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Single First-Order Reversible Binding kinetics</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
+ <div class="hidden name"><code>SFORB.solution.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>SFORB.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>k_12</span>, <span class='no'>k_21</span>, <span class='no'>k_1output</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>t</th>
+ <td><p>Time.</p></td>
+ </tr>
+ <tr>
+ <th>parent_0</th>
+ <td><p>Starting value for the response variable at time zero.</p></td>
+ </tr>
+ <tr>
+ <th>k_12</th>
+ <td><p>Kinetic constant describing transfer from free to bound.</p></td>
+ </tr>
+ <tr>
+ <th>k_21</th>
+ <td><p>Kinetic constant describing transfer from bound to free.</p></td>
+ </tr>
+ <tr>
+ <th>k_1output</th>
+ <td><p>Kinetic constant describing degradation of the free
+fraction.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The value of the response variable, which is the sum of free and
+bound fractions at time <code>t</code>.</p>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>
+FOCUS (2014) &#8220;Generic guidance for Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; 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'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>SFORB.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.5</span>, <span class='fl'>2</span>, <span class='fl'>3</span>), <span class='fl'>0</span>, <span class='fl'>2</span>)</div><div class='img'><img src='SFORB.solution-1.png' alt='' width='700' height='433' /></div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/add_err-1.png b/docs/dev/reference/add_err-1.png
new file mode 100644
index 00000000..88806d7b
--- /dev/null
+++ b/docs/dev/reference/add_err-1.png
Binary files differ
diff --git a/docs/dev/reference/add_err-2.png b/docs/dev/reference/add_err-2.png
new file mode 100644
index 00000000..6a806c2d
--- /dev/null
+++ b/docs/dev/reference/add_err-2.png
Binary files differ
diff --git a/docs/dev/reference/add_err-3.png b/docs/dev/reference/add_err-3.png
new file mode 100644
index 00000000..1919a566
--- /dev/null
+++ b/docs/dev/reference/add_err-3.png
Binary files differ
diff --git a/docs/dev/reference/add_err.html b/docs/dev/reference/add_err.html
new file mode 100644
index 00000000..a4317cd7
--- /dev/null
+++ b/docs/dev/reference/add_err.html
@@ -0,0 +1,287 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Add normally distributed errors to simulated kinetic degradation data — add_err • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Add normally distributed errors to simulated kinetic degradation data — add_err" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Add normally distributed errors to simulated kinetic degradation data</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/add_err.R'><code>R/add_err.R</code></a></small>
+ <div class="hidden name"><code>add_err.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>add_err</span>(
+ <span class='no'>prediction</span>,
+ <span class='no'>sdfunc</span>,
+ <span class='kw'>secondary</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>),
+ <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1000</span>,
+ <span class='kw'>LOD</span> <span class='kw'>=</span> <span class='fl'>0.1</span>,
+ <span class='kw'>reps</span> <span class='kw'>=</span> <span class='fl'>2</span>,
+ <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>1</span>,
+ <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>NA</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>prediction</th>
+ <td><p>A prediction from a kinetic model as produced by
+<code><a href='mkinpredict.html'>mkinpredict</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>sdfunc</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>secondary</th>
+ <td><p>The names of state variables that should have an initial
+value of zero</p></td>
+ </tr>
+ <tr>
+ <th>n</th>
+ <td><p>The number of datasets to be generated.</p></td>
+ </tr>
+ <tr>
+ <th>LOD</th>
+ <td><p>The limit of detection (LOD). Values that are below the LOD after
+adding the random error will be set to NA.</p></td>
+ </tr>
+ <tr>
+ <th>reps</th>
+ <td><p>The number of replicates to be generated within the datasets.</p></td>
+ </tr>
+ <tr>
+ <th>digits</th>
+ <td><p>The number of digits to which the values will be rounded.</p></td>
+ </tr>
+ <tr>
+ <th>seed</th>
+ <td><p>The seed used for the generation of random numbers. If NA, the
+seed is not set.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># The kinetic model</span>
+<span class='no'>m_SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M1"</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='co'># Generate a prediction for a specific set of parameters</span>
+<span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span>)
+
+<span class='co'># This is the prediction used for the "Type 2 datasets" on the Piacenza poster</span>
+<span class='co'># from 2015</span>
+<span class='no'>d_SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_SFO_SFO</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>,
+ <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Log.html'>log</a></span>(<span class='fl'>2</span>)/<span class='fl'>1000</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>),
+ <span class='no'>sampling_times</span>)
+
+<span class='co'># Add an error term with a constant (independent of the value) standard deviation</span>
+<span class='co'># of 10, and generate three datasets</span>
+<span class='no'>d_SFO_SFO_err</span> <span class='kw'>&lt;-</span> <span class='fu'>add_err</span>(<span class='no'>d_SFO_SFO</span>, <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fl'>10</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456789</span> )
+
+<span class='co'># Name the datasets for nicer plotting</span>
+<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>d_SFO_SFO_err</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>1</span>:<span class='fl'>3</span>)
+
+<span class='co'># Name the model in the list of models (with only one member in this case) for</span>
+<span class='co'># nicer plotting later on. Be quiet and use only one core not to offend CRAN</span>
+<span class='co'># checks</span>
+<span class='co'># \dontrun{</span>
+<span class='no'>f_SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>m_SFO_SFO</span>),
+ <span class='no'>d_SFO_SFO_err</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>,
+ <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_SFO_SFO</span>)</div><div class='img'><img src='add_err-1.png' alt='' width='700' height='433' /></div><div class='input'>
+<span class='co'># We would like to inspect the fit for dataset 3 more closely</span>
+<span class='co'># Using double brackets makes the returned object an mkinfit object</span>
+<span class='co'># instead of a list of mkinfit objects, so plot.mkinfit is used</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_SFO_SFO</span><span class='kw'>[[</span><span class='fl'>3</span>]], <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='add_err-2.png' alt='' width='700' height='433' /></div><div class='input'>
+<span class='co'># If we use single brackets, we should give two indices (model and dataset),</span>
+<span class='co'># and plot.mmkin is used</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_SFO_SFO</span>[<span class='fl'>1</span>, <span class='fl'>3</span>])</div><div class='img'><img src='add_err-3.png' alt='' width='700' height='433' /></div><div class='input'># }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/aw.html b/docs/dev/reference/aw.html
new file mode 100644
index 00000000..267c3b0b
--- /dev/null
+++ b/docs/dev/reference/aw.html
@@ -0,0 +1,221 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Calculate Akaike weights for model averaging — aw • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Calculate Akaike weights for model averaging — aw" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Calculate Akaike weights for model averaging</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/aw.R'><code>R/aw.R</code></a></small>
+ <div class="hidden name"><code>aw.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Akaike weights are calculated based on the relative
+expected Kullback-Leibler information as specified
+by Burnham and Anderson (2004).</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>aw</span>(<span class='no'>object</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for mkinfit</span>
+<span class='fu'>aw</span>(<span class='no'>object</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for mmkin</span>
+<span class='fu'>aw</span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An <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></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><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></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>Burnham KP and Anderson DR (2004) Multimodel
+Inference: Understanding AIC and BIC in Model Selection.
+<em>Sociological Methods &amp; Research</em> <strong>33</strong>(2) 261-304</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># \dontrun{</span>
+<span class='no'>f_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>f_dfop</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"DFOP"</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>aw_sfo_dfop</span> <span class='kw'>&lt;-</span> <span class='fu'>aw</span>(<span class='no'>f_sfo</span>, <span class='no'>f_dfop</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span>(<span class='no'>aw_sfo_dfop</span>)</div><div class='output co'>#&gt; [1] 1</div><div class='input'><span class='no'>aw_sfo_dfop</span> <span class='co'># SFO gets more weight as it has less parameters and a similar fit</span></div><div class='output co'>#&gt; [1] 0.5970258 0.4029742</div><div class='input'><span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"FOCUS D"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_D</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'>aw</span>(<span class='no'>f</span>)</div><div class='output co'>#&gt; [1] 0.4808722 0.1945539 0.3245740</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span>(<span class='fu'>aw</span>(<span class='no'>f</span>))</div><div class='output co'>#&gt; [1] 1</div><div class='input'><span class='fu'>aw</span>(<span class='no'>f</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"DFOP"</span>)])</div><div class='output co'>#&gt; [1] 0.5970258 0.4029742</div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/confint.mkinfit.html b/docs/dev/reference/confint.mkinfit.html
new file mode 100644
index 00000000..a03ecea8
--- /dev/null
+++ b/docs/dev/reference/confint.mkinfit.html
@@ -0,0 +1,419 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Confidence intervals for parameters of mkinfit objects — confint.mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Confidence intervals for parameters of mkinfit objects — confint.mkinfit" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Confidence intervals for parameters of mkinfit objects</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/confint.mkinfit.R'><code>R/confint.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>confint.mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='co'># S3 method for mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(
+ <span class='no'>object</span>,
+ <span class='no'>parm</span>,
+ <span class='kw'>level</span> <span class='kw'>=</span> <span class='fl'>0.95</span>,
+ <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>1</span> - <span class='no'>level</span>,
+ <span class='no'>cutoff</span>,
+ <span class='kw'>method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"quadratic"</span>, <span class='st'>"profile"</span>),
+ <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>backtransform</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>cores</span> <span class='kw'>=</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>(),
+ <span class='kw'>rel_tol</span> <span class='kw'>=</span> <span class='fl'>0.01</span>,
+ <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='no'>...</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An <code><a href='mkinfit.html'>mkinfit</a></code> object</p></td>
+ </tr>
+ <tr>
+ <th>parm</th>
+ <td><p>A vector of names of the parameters which are to be given
+confidence intervals. If missing, all parameters are considered.</p></td>
+ </tr>
+ <tr>
+ <th>level</th>
+ <td><p>The confidence level required</p></td>
+ </tr>
+ <tr>
+ <th>alpha</th>
+ <td><p>The allowed error probability, overrides 'level' if specified.</p></td>
+ </tr>
+ <tr>
+ <th>cutoff</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>method</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>transformed</th>
+ <td><p>If the quadratic approximation is used, should it be
+applied to the likelihood based on the transformed parameters?</p></td>
+ </tr>
+ <tr>
+ <th>backtransform</th>
+ <td><p>If we approximate the likelihood in terms of the
+transformed parameters, should we backtransform the parameters with
+their confidence intervals?</p></td>
+ </tr>
+ <tr>
+ <th>cores</th>
+ <td><p>The number of cores to be used for multicore processing.
+On Windows machines, cores &gt; 1 is currently not supported.</p></td>
+ </tr>
+ <tr>
+ <th>rel_tol</th>
+ <td><p>If the method is 'profile', what should be the accuracy
+of the lower and upper bounds, relative to the estimate obtained from
+the quadratic method?</p></td>
+ </tr>
+ <tr>
+ <th>quiet</th>
+ <td><p>Should we suppress the message "Profiling the likelihood"</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Not used</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A matrix with columns giving lower and upper confidence limits for
+each parameter.</p>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>Bates DM and Watts GW (1988) Nonlinear regression analysis &amp; 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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 71.8242430 93.1600766
+#&gt; k_parent_sink 0.2109541 0.4440528
+#&gt; sigma 1.9778868 7.3681380</div><div class='input'>
+<span class='co'># \dontrun{</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>)</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 73.0641834 92.1392181
+#&gt; k_parent_sink 0.2170293 0.4235348
+#&gt; sigma 3.1307772 8.0628314</div><div class='input'>
+<span class='co'># Set the number of cores for the profiling method for further examples</span>
+<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span>(<span class='st'>"NOT_CRAN"</span>), <span class='st'>"true"</span>)) {
+ <span class='no'>n_cores</span> <span class='kw'>&lt;-</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>() - <span class='fl'>1</span>
+} <span class='kw'>else</span> {
+ <span class='no'>n_cores</span> <span class='kw'>&lt;-</span> <span class='fl'>1</span>
+}
+<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/Sys.getenv.html'>Sys.getenv</a></span>(<span class='st'>"TRAVIS"</span>) <span class='kw'>!=</span> <span class='st'>""</span>) <span class='no'>n_cores</span> <span class='kw'>=</span> <span class='fl'>1</span>
+<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/Sys.info.html'>Sys.info</a></span>()[<span class='st'>"sysname"</span>] <span class='kw'>==</span> <span class='st'>"Windows"</span>) <span class='no'>n_cores</span> <span class='kw'>=</span> <span class='fl'>1</span>
+
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>SFO_SFO.ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>f_d_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#&gt; user system elapsed
+#&gt; 3.707 1.077 3.444 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span>
+<span class='co'># If we additionally exclude parent_0 (the confidence of which is often of</span>
+<span class='co'># minor interest), we get a nice performance improvement from about 50</span>
+<span class='co'># seconds to about 12 seconds if we use at least four cores</span>
+<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile_no_parent_0</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"k_parent_sink"</span>, <span class='st'>"k_parent_m1"</span>, <span class='st'>"k_m1_sink"</span>, <span class='st'>"sigma"</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>))</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='output co'>#&gt; <span class='warning'>Warning: scheduled cores 2, 1, 3 encountered errors in user code, all values of the jobs will be affected</span></div><div class='output co'>#&gt; <span class='error'>Error in dimnames(x) &lt;- dn: length of 'dimnames' [2] not equal to array extent</span></div><div class='output co'>#&gt; <span class='message'>Timing stopped at: 0.011 0.026 0.207</span></div><div class='input'><span class='no'>ci_profile</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.456003640 1.027703e+02
+#&gt; k_parent 0.090911032 1.071578e-01
+#&gt; k_m1 0.003892605 6.702778e-03
+#&gt; f_parent_to_m1 0.471328495 5.611550e-01
+#&gt; sigma 2.535612399 3.985263e+00</div><div class='input'><span class='no'>ci_quadratic_transformed</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)
+<span class='no'>ci_quadratic_transformed</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.403839476 1.027931e+02
+#&gt; k_parent 0.090823790 1.072543e-01
+#&gt; k_m1 0.004012216 6.897547e-03
+#&gt; f_parent_to_m1 0.469118713 5.595960e-01
+#&gt; sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>ci_quadratic_untransformed</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
+<span class='no'>ci_quadratic_untransformed</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.403839429 1.027931e+02
+#&gt; k_parent 0.090491931 1.069035e-01
+#&gt; k_m1 0.003835483 6.685819e-03
+#&gt; f_parent_to_m1 0.469113364 5.598386e-01
+#&gt; sigma 2.396089689 3.854918e+00</div><div class='input'><span class='co'># Against the expectation based on Bates and Watts (1988), the confidence</span>
+<span class='co'># intervals based on the internal parameter transformation are less</span>
+<span class='co'># congruent with the likelihood based intervals. Note the superiority of the</span>
+<span class='co'># interval based on the untransformed fit for k_m1_sink</span>
+<span class='no'>rel_diffs_transformed</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_transformed</span> - <span class='no'>ci_profile</span>)/<span class='no'>ci_profile</span>)
+<span class='no'>rel_diffs_untransformed</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_untransformed</span> - <span class='no'>ci_profile</span>)/<span class='no'>ci_profile</span>)
+<span class='no'>rel_diffs_transformed</span> <span class='kw'>&lt;</span> <span class='no'>rel_diffs_untransformed</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 TRUE TRUE
+#&gt; k_parent TRUE TRUE
+#&gt; k_m1 FALSE FALSE
+#&gt; f_parent_to_m1 TRUE FALSE
+#&gt; sigma FALSE TRUE</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span>(<span class='no'>rel_diffs_transformed</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 0.000541 0.000222
+#&gt; k_parent 0.000960 0.000900
+#&gt; k_m1 0.030700 0.029100
+#&gt; f_parent_to_m1 0.004690 0.002780
+#&gt; sigma 0.055000 0.032700</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>signif</a></span>(<span class='no'>rel_diffs_untransformed</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 0.000541 0.000222
+#&gt; k_parent 0.004610 0.002370
+#&gt; k_m1 0.014700 0.002530
+#&gt; f_parent_to_m1 0.004700 0.002350
+#&gt; sigma 0.055000 0.032700</div><div class='input'>
+
+<span class='co'># Investigate a case with formation fractions</span>
+<span class='no'>f_d_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>ci_profile_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>)</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='input'><span class='no'>ci_profile_ff</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.456003640 1.027703e+02
+#&gt; k_parent 0.090911032 1.071578e-01
+#&gt; k_m1 0.003892605 6.702778e-03
+#&gt; f_parent_to_m1 0.471328495 5.611550e-01
+#&gt; sigma 2.535612399 3.985263e+00</div><div class='input'><span class='no'>ci_quadratic_transformed_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)
+<span class='no'>ci_quadratic_transformed_ff</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.403839476 1.027931e+02
+#&gt; k_parent 0.090823790 1.072543e-01
+#&gt; k_m1 0.004012216 6.897547e-03
+#&gt; f_parent_to_m1 0.469118713 5.595960e-01
+#&gt; sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>ci_quadratic_untransformed_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
+<span class='no'>ci_quadratic_untransformed_ff</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 96.403839429 1.027931e+02
+#&gt; k_parent 0.090491931 1.069035e-01
+#&gt; k_m1 0.003835483 6.685819e-03
+#&gt; f_parent_to_m1 0.469113364 5.598386e-01
+#&gt; sigma 2.396089689 3.854918e+00</div><div class='input'><span class='no'>rel_diffs_transformed_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_transformed_ff</span> - <span class='no'>ci_profile_ff</span>)/<span class='no'>ci_profile_ff</span>)
+<span class='no'>rel_diffs_untransformed_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>abs</a></span>((<span class='no'>ci_quadratic_untransformed_ff</span> - <span class='no'>ci_profile_ff</span>)/<span class='no'>ci_profile_ff</span>)
+<span class='co'># While the confidence interval for the parent rate constant is closer to</span>
+<span class='co'># the profile based interval when using the internal parameter</span>
+<span class='co'># transformation, the interval for the metabolite rate constant is 'better</span>
+<span class='co'># without internal parameter transformation.</span>
+<span class='no'>rel_diffs_transformed_ff</span> <span class='kw'>&lt;</span> <span class='no'>rel_diffs_untransformed_ff</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 TRUE TRUE
+#&gt; k_parent TRUE TRUE
+#&gt; k_m1 FALSE FALSE
+#&gt; f_parent_to_m1 TRUE FALSE
+#&gt; sigma FALSE TRUE</div><div class='input'><span class='no'>rel_diffs_transformed_ff</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 0.0005408078 0.0002217796
+#&gt; k_parent 0.0009596417 0.0009003876
+#&gt; k_m1 0.0307277372 0.0290579184
+#&gt; f_parent_to_m1 0.0046884131 0.0027782558
+#&gt; sigma 0.0550252516 0.0327066836</div><div class='input'><span class='no'>rel_diffs_untransformed_ff</span></div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 0.0005408083 0.000221780
+#&gt; k_parent 0.0046100096 0.002373023
+#&gt; k_m1 0.0146746467 0.002530101
+#&gt; f_parent_to_m1 0.0046997600 0.002346022
+#&gt; sigma 0.0550252516 0.032706684</div><div class='input'>
+<span class='co'># The profiling for the following fit does not finish in a reasonable time,</span>
+<span class='co'># therefore we use the quadratic approximation</span>
+<span class='no'>m_synth_DFOP_par</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>DFOP_par_c</span> <span class='kw'>&lt;-</span> <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span>
+<span class='no'>f_tc_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_DFOP_par</span>, <span class='no'>DFOP_par_c</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>,
+ <span class='kw'>error_model_algorithm</span> <span class='kw'>=</span> <span class='st'>"direct"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Optimisation did not converge:</span>
+#&gt; <span class='warning'>iteration limit reached without convergence (10)</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 95.654015524 105.79279749
+#&gt; k_M1 0.037723773 0.04447598
+#&gt; k_M2 0.008586438 0.01078076
+#&gt; f_parent_to_M1 0.230403596 0.61953014
+#&gt; f_parent_to_M2 0.162909765 0.38019017
+#&gt; k1 0.275434628 0.33331386
+#&gt; k2 0.018602188 0.02249211
+#&gt; g 0.675149759 0.73520889
+#&gt; sigma_low 0.251416929 0.84272023
+#&gt; rsd_high 0.040371818 0.07666540</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_tc_2</span>, <span class='st'>"parent_0"</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"quadratic"</span>)</div><div class='output co'>#&gt; 2.5% 97.5%
+#&gt; parent_0 95.65402 105.7928</div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/create_deg_func.html b/docs/dev/reference/create_deg_func.html
new file mode 100644
index 00000000..59984b8c
--- /dev/null
+++ b/docs/dev/reference/create_deg_func.html
@@ -0,0 +1,225 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Create degradation functions for known analytical solutions — create_deg_func • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Create degradation functions for known analytical solutions — create_deg_func" />
+<meta property="og:description" content="Create degradation functions for known analytical solutions" />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Create degradation functions for known analytical solutions</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/create_deg_func.R'><code>R/create_deg_func.R</code></a></small>
+ <div class="hidden name"><code>create_deg_func.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Create degradation functions for known analytical solutions</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>create_deg_func</span>(<span class='no'>spec</span>, <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"min"</span>, <span class='st'>"max"</span>))</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>spec</th>
+ <td><p>List of model specifications as contained in mkinmod objects</p></td>
+ </tr>
+ <tr>
+ <th>use_of_ff</th>
+ <td><p>Minimum or maximum use of formation fractions</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>Degradation function to be attached to mkinmod objects</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>FOCUS_D</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>) <span class='co'># to avoid warnings</span>
+<span class='no'>fit_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>fit_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='co'># \dontrun{</span>
+<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/library.html'>require</a></span>(<span class='no'>rbenchmark</span>))
+ <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span>(
+ <span class='kw'>analytical</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
+ <span class='kw'>deSolve</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
+ <span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='output co'>#&gt; <span class='message'>Loading required package: rbenchmark</span></div><div class='output co'>#&gt; test replications elapsed relative user.self sys.self user.child
+#&gt; 1 analytical 2 0.422 1.000 0.421 0 0
+#&gt; 2 deSolve 2 0.722 1.711 0.721 0 0
+#&gt; sys.child
+#&gt; 1 0
+#&gt; 2 0</div><div class='input'> <span class='no'>DFOP_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span>(
+ <span class='kw'>analytical</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>DFOP_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
+ <span class='kw'>deSolve</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>DFOP_SFO</span>, <span class='no'>FOCUS_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
+ <span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='output co'>#&gt; test replications elapsed relative user.self sys.self user.child
+#&gt; 1 analytical 2 0.907 1.000 0.906 0 0
+#&gt; 2 deSolve 2 1.659 1.829 1.658 0 0
+#&gt; sys.child
+#&gt; 1 0
+#&gt; 2 0</div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/endpoints.html b/docs/dev/reference/endpoints.html
new file mode 100644
index 00000000..5751df93
--- /dev/null
+++ b/docs/dev/reference/endpoints.html
@@ -0,0 +1,232 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function to calculate endpoints for further use from kinetic models fitted
+with mkinfit — endpoints • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function to calculate endpoints for further use from kinetic models fitted
+with mkinfit — endpoints" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Function to calculate endpoints for further use from kinetic models fitted
+with mkinfit</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/endpoints.R'><code>R/endpoints.R</code></a></small>
+ <div class="hidden name"><code>endpoints.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>endpoints</span>(<span class='no'>fit</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>fit</th>
+ <td><p>An object of class <code><a href='mkinfit.html'>mkinfit</a></code> or
+<code><a href='nlme.mmkin.html'>nlme.mmkin</a></code></p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</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>
+ <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
+
+ <p>The function is used internally by <code><a href='summary.mkinfit.html'>summary.mkinfit</a></code>.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'>endpoints</span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; $distimes
+#&gt; DT50 DT90 DT50back
+#&gt; parent 1.785233 15.1479 4.559973
+#&gt; </div><div class='input'> <span class='co'># \dontrun{</span>
+ <span class='no'>fit_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFORB"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'>endpoints</span>(<span class='no'>fit_2</span>)</div><div class='output co'>#&gt; $ff
+#&gt; parent_free_sink
+#&gt; 1
+#&gt;
+#&gt; $SFORB
+#&gt; parent_b1 parent_b2
+#&gt; 0.4595574 0.0178488
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90 DT50_parent_b1 DT50_parent_b2
+#&gt; parent 1.886925 21.25106 1.508293 38.83438
+#&gt; </div><div class='input'> # }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/experimental_data_for_UBA-1.png b/docs/dev/reference/experimental_data_for_UBA-1.png
new file mode 100644
index 00000000..b316a5db
--- /dev/null
+++ b/docs/dev/reference/experimental_data_for_UBA-1.png
Binary files differ
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..d49924c7
--- /dev/null
+++ b/docs/dev/reference/experimental_data_for_UBA.html
@@ -0,0 +1,300 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019 • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Experimental datasets used for development and testing of error models — experimental_data_for_UBA_2019" />
+<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, 2013a, 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
+ (Germany, 2013b, 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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Experimental datasets used for development and testing of error models</h1>
+
+ <div class="hidden name"><code>experimental_data_for_UBA.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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, 2013a, 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
+ (Germany, 2013b, 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>
+
+ <pre class="usage"><span class='no'>experimental_data_for_UBA_2019</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</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) &#8220;Generic guidance for Estimating Persistence and
+ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
+ Registration&#8221; 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'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+<p>Germany (2013a). Renewal Assessment Report Glyphosate Volume 3 Annex B.8: Environmental Fate
+ and Behaviour</p>
+<p>Germany (2013b). 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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># \dontrun{</span>
+
+<span class='co'># Model definitions</span>
+<span class='no'>sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>
+)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>dfop_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>
+)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>sfo_sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"A2"</span>),
+ <span class='kw'>A2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>
+)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>dfop_sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"A2"</span>),
+ <span class='kw'>A2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>
+)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>d_1_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>1</span>:<span class='fl'>2</span>], <span class='kw'>function</span>(<span class='no'>x</span>) <span class='no'>x</span>$<span class='no'>data</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>d_1_2</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Soil"</span>, <span class='fl'>1</span>:<span class='fl'>2</span>)
+
+
+<span class='no'>f_1_2_tc</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"DFOP-SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>dfop_sfo_sfo</span>), <span class='no'>d_1_2</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)
+
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_1_2_tc</span>, <span class='kw'>resplot</span> <span class='kw'>=</span> <span class='st'>"errmod"</span>)</div><div class='img'><img src='experimental_data_for_UBA-1.png' alt='' width='700' height='433' /></div><div class='input'>
+# }</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/get_deg_func.html b/docs/dev/reference/get_deg_func.html
new file mode 100644
index 00000000..7500186b
--- /dev/null
+++ b/docs/dev/reference/get_deg_func.html
@@ -0,0 +1,185 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Retrieve a degradation function from the mmkin namespace — get_deg_func • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Retrieve a degradation function from the mmkin namespace — get_deg_func" />
+<meta property="og:description" content="Retrieve a degradation function from the mmkin namespace" />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Retrieve a degradation function from the mmkin namespace</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nlme.mmkin.R'><code>R/nlme.mmkin.R</code></a></small>
+ <div class="hidden name"><code>get_deg_func.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Retrieve a degradation function from the mmkin namespace</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>get_deg_func</span>()</pre>
+
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A function that was likely previously assigned from within
+nlme.mmkin</p>
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/ilr.html b/docs/dev/reference/ilr.html
new file mode 100644
index 00000000..245880f2
--- /dev/null
+++ b/docs/dev/reference/ilr.html
@@ -0,0 +1,220 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function to perform isometric log-ratio transformation — ilr • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function to perform isometric log-ratio transformation — ilr" />
+<meta property="og:description" content="This implementation is a special case of the class of isometric log-ratio
+transformations." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Function to perform isometric log-ratio transformation</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/ilr.R'><code>R/ilr.R</code></a></small>
+ <div class="hidden name"><code>ilr.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>This implementation is a special case of the class of isometric log-ratio
+transformations.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>ilr</span>(<span class='no'>x</span>)
+
+<span class='fu'>invilr</span>(<span class='no'>x</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>A numeric vector. Naturally, the forward transformation is only
+sensible for vectors with all elements being greater than zero.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>Peter Filzmoser, Karel Hron (2008) Outlier Detection for
+Compositional Data Using Robust Methods. Math Geosci 40 233-248</p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
+
+ <div class='dont-index'><p>Another implementation can be found in R package
+<code>robCompositions</code>.</p></div>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># Order matters</span>
+<span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.1</span>, <span class='fl'>1</span>, <span class='fl'>10</span>))</div><div class='output co'>#&gt; [1] -1.628174 -2.820079</div><div class='input'><span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>10</span>, <span class='fl'>1</span>, <span class='fl'>0.1</span>))</div><div class='output co'>#&gt; [1] 1.628174 2.820079</div><div class='input'><span class='co'># Equal entries give ilr transformations with zeros as elements</span>
+<span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>3</span>, <span class='fl'>3</span>))</div><div class='output co'>#&gt; [1] 0 0</div><div class='input'><span class='co'># Almost equal entries give small numbers</span>
+<span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.3</span>, <span class='fl'>0.4</span>, <span class='fl'>0.3</span>))</div><div class='output co'>#&gt; [1] -0.2034219 0.1174457</div><div class='input'><span class='co'># Only the ratio between the numbers counts, not their sum</span>
+<span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#&gt; [1] 0.70 0.29 0.01</div><div class='input'><span class='fu'>invilr</span>(<span class='fu'>ilr</span>(<span class='fl'>2.1</span> * <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.7</span>, <span class='fl'>0.29</span>, <span class='fl'>0.01</span>)))</div><div class='output co'>#&gt; [1] 0.70 0.29 0.01</div><div class='input'><span class='co'># Inverse transformation of larger numbers gives unequal elements</span>
+<span class='fu'>invilr</span>(-<span class='fl'>10</span>)</div><div class='output co'>#&gt; [1] 7.213536e-07 9.999993e-01</div><div class='input'><span class='fu'>invilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(-<span class='fl'>10</span>, <span class='fl'>0</span>))</div><div class='output co'>#&gt; [1] 7.207415e-07 9.991507e-01 8.486044e-04</div><div class='input'><span class='co'># The sum of the elements of the inverse ilr is 1</span>
+<span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span>(<span class='fu'>invilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(-<span class='fl'>10</span>, <span class='fl'>0</span>)))</div><div class='output co'>#&gt; [1] 1</div><div class='input'><span class='co'># This is why we do not need all elements of the inverse transformation to go back:</span>
+<span class='no'>a</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.1</span>, <span class='fl'>0.3</span>, <span class='fl'>0.5</span>)
+<span class='no'>b</span> <span class='kw'>&lt;-</span> <span class='fu'>invilr</span>(<span class='no'>a</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>b</span>) <span class='co'># Four elements</span></div><div class='output co'>#&gt; [1] 4</div><div class='input'><span class='fu'>ilr</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='fl'>1</span> - <span class='fu'><a href='https://rdrr.io/r/base/sum.html'>sum</a></span>(<span class='no'>b</span>[<span class='fl'>1</span>:<span class='fl'>3</span>]))) <span class='co'># Gives c(0.1, 0.3, 0.5)</span></div><div class='output co'>#&gt; [1] 0.1 0.3 0.5</div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html
new file mode 100644
index 00000000..906bc2f8
--- /dev/null
+++ b/docs/dev/reference/index.html
@@ -0,0 +1,699 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function reference • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function reference" />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-index">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="contents col-md-9">
+ <div class="page-header">
+ <h1>Reference</h1>
+ </div>
+
+ <table class="ref-index">
+
+ <colgroup>
+
+ <col class="alias" />
+ <col class="title" />
+ </colgroup>
+
+ <tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-main-functions" class="hasAnchor"><a href="#section-main-functions" class="anchor"></a>Main functions</h2>
+ <p class="section-desc"><p>Essential functionality</p></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="mkinmod.html">mkinmod()</a></code> </p>
+ </td>
+ <td><p>Function to set up a kinetic model with one or more state variables</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkinfit.html">mkinfit()</a></code> </p>
+ </td>
+ <td><p>Fit a kinetic model to data with one or more state variables</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mmkin.html">mmkin()</a></code> </p>
+ </td>
+ <td><p>Fit one or more kinetic models with one or more state variables to one or
+more datasets</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="nafta.html">nafta()</a></code> <code><a href="nafta.html">print(<i>&lt;nafta&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Evaluate parent kinetics using the NAFTA guidance</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-show-results" class="hasAnchor"><a href="#section-show-results" class="anchor"></a>Show results</h2>
+ <p class="section-desc"><p>Functions working with mkinfit objects</p></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="plot.mkinfit.html">plot(<i>&lt;mkinfit&gt;</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> </p>
+ </td>
+ <td><p>Plot the observed data and the fitted model of an mkinfit object</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="summary.mkinfit.html">summary(<i>&lt;mkinfit&gt;</i>)</a></code> <code><a href="summary.mkinfit.html">print(<i>&lt;summary.mkinfit&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Summary method for class "mkinfit"</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="parms.html">parms()</a></code> </p>
+ </td>
+ <td><p>Extract model parameters from mkinfit models</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="confint.mkinfit.html">confint(<i>&lt;mkinfit&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Confidence intervals for parameters of mkinfit objects</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="update.mkinfit.html">update(<i>&lt;mkinfit&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Update an mkinfit model with different arguments</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="lrtest.mkinfit.html">lrtest(<i>&lt;mkinfit&gt;</i>)</a></code> <code><a href="lrtest.mkinfit.html">lrtest(<i>&lt;mmkin&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Likelihood ratio test for mkinfit models</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="loftest.html">loftest()</a></code> </p>
+ </td>
+ <td><p>Lack-of-fit test for models fitted to data with replicates</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkinerrmin.html">mkinerrmin()</a></code> </p>
+ </td>
+ <td><p>Calculate the minimum error to assume in order to pass the variance test</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="endpoints.html">endpoints()</a></code> </p>
+ </td>
+ <td><p>Function to calculate endpoints for further use from kinetic models fitted
+with mkinfit</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="aw.html">aw()</a></code> </p>
+ </td>
+ <td><p>Calculate Akaike weights for model averaging</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="CAKE_export.html">CAKE_export()</a></code> </p>
+ </td>
+ <td><p>Export a list of datasets format to a CAKE study file</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-work-with-mmkin-objects" class="hasAnchor"><a href="#section-work-with-mmkin-objects" class="anchor"></a>Work with mmkin objects</h2>
+ <p class="section-desc"><p>Functions working with aggregated results</p></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="Extract.mmkin.html">`[`(<i>&lt;mmkin&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Subsetting method for mmkin objects</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="plot.mmkin.html">plot(<i>&lt;mmkin&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Plot model fits (observed and fitted) and the residuals for a row or column
+of an mmkin object</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="AIC.mmkin.html">AIC(<i>&lt;mmkin&gt;</i>)</a></code> <code><a href="AIC.mmkin.html">BIC(<i>&lt;mmkin&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Calculate the AIC for a column of an mmkin object</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-mixed-models" class="hasAnchor"><a href="#section-mixed-models" class="anchor"></a>Mixed models</h2>
+ <p class="section-desc"><p>Create and work with nonlinear mixed models</p></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="nlme.mmkin.html">nlme(<i>&lt;mmkin&gt;</i>)</a></code> <code><a href="nlme.mmkin.html">print(<i>&lt;nlme.mmkin&gt;</i>)</a></code> <code><a href="nlme.mmkin.html">update(<i>&lt;nlme.mmkin&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Create an nlme model for an mmkin row object</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="plot.nlme.mmkin.html">plot(<i>&lt;nlme.mmkin&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Plot a fitted nonlinear mixed model obtained via an mmkin row object</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="nlme.html">nlme_function()</a></code> <code><a href="nlme.html">mean_degparms()</a></code> <code><a href="nlme.html">nlme_data()</a></code> </p>
+ </td>
+ <td><p>Helper functions to create nlme models from mmkin row objects</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="saemix.html">saemix_model()</a></code> <code><a href="saemix.html">saemix_data()</a></code> </p>
+ </td>
+ <td><p>Create saemix models from mmkin row objects</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="get_deg_func.html">get_deg_func()</a></code> </p>
+ </td>
+ <td><p>Retrieve a degradation function from the mmkin namespace</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-datasets-and-known-results" class="hasAnchor"><a href="#section-datasets-and-known-results" class="anchor"></a>Datasets and known results</h2>
+ <p class="section-desc"></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><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> </p>
+ </td>
+ <td><p>Datasets A to F from the FOCUS Kinetics report from 2006</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="FOCUS_2006_SFO_ref_A_to_F.html">FOCUS_2006_SFO_ref_A_to_F</a></code> </p>
+ </td>
+ <td><p>Results of fitting the SFO model to Datasets A to F of FOCUS (2006)</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="FOCUS_2006_FOMC_ref_A_to_F.html">FOCUS_2006_FOMC_ref_A_to_F</a></code> </p>
+ </td>
+ <td><p>Results of fitting the FOMC model to Datasets A to F of FOCUS (2006)</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="FOCUS_2006_HS_ref_A_to_F.html">FOCUS_2006_HS_ref_A_to_F</a></code> </p>
+ </td>
+ <td><p>Results of fitting the HS model to Datasets A to F of FOCUS (2006)</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="FOCUS_2006_DFOP_ref_A_to_B.html">FOCUS_2006_DFOP_ref_A_to_B</a></code> </p>
+ </td>
+ <td><p>Results of fitting the DFOP model to Datasets A to B of FOCUS (2006)</p></td>
+ </tr><tr>
+
+ <td>
+ <p><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> </p>
+ </td>
+ <td><p>Example datasets from the NAFTA SOP published 2015</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="NAFTA_SOP_Attachment.html">NAFTA_SOP_Attachment</a></code> </p>
+ </td>
+ <td><p>Example datasets from Attachment 1 to the NAFTA SOP published 2015</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mccall81_245T.html">mccall81_245T</a></code> </p>
+ </td>
+ <td><p>Datasets on aerobic soil metabolism of 2,4,5-T in six soils</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="schaefer07_complex_case.html">schaefer07_complex_case</a></code> </p>
+ </td>
+ <td><p>Metabolism data set used for checking the software quality of KinGUI</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="synthetic_data_for_UBA_2014.html">synthetic_data_for_UBA_2014</a></code> </p>
+ </td>
+ <td><p>Synthetic datasets for one parent compound with two metabolites</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="experimental_data_for_UBA.html">experimental_data_for_UBA_2019</a></code> </p>
+ </td>
+ <td><p>Experimental datasets used for development and testing of error models</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="test_data_from_UBA_2014.html">test_data_from_UBA_2014</a></code> </p>
+ </td>
+ <td><p>Three experimental datasets from two water sediment systems and one soil</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkinds.html">mkinds</a></code> </p>
+ </td>
+ <td><p>A dataset class for mkin</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="print.mkinds.html">print(<i>&lt;mkinds&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Print mkinds objects</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-nafta-guidance" class="hasAnchor"><a href="#section-nafta-guidance" class="anchor"></a>NAFTA guidance</h2>
+ <p class="section-desc"></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="nafta.html">nafta()</a></code> <code><a href="nafta.html">print(<i>&lt;nafta&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Evaluate parent kinetics using the NAFTA guidance</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="plot.nafta.html">plot(<i>&lt;nafta&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Plot the results of the three models used in the NAFTA scheme.</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-helper-functions-mainly-used-internally" class="hasAnchor"><a href="#section-helper-functions-mainly-used-internally" class="anchor"></a>Helper functions mainly used internally</h2>
+ <p class="section-desc"></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="mkinsub.html">mkinsub()</a></code> </p>
+ </td>
+ <td><p>Function to set up a kinetic submodel for one state variable</p></td>
+ </tr><tr>
+
+ <td>
+ <p><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> </p>
+ </td>
+ <td><p>Function to calculate maximum time weighted average concentrations from
+kinetic models fitted with mkinfit</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkinpredict.html">mkinpredict()</a></code> </p>
+ </td>
+ <td><p>Produce predictions from a kinetic model using specific parameters</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkin_wide_to_long.html">mkin_wide_to_long()</a></code> </p>
+ </td>
+ <td><p>Convert a dataframe with observations over time into long format</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkin_long_to_wide.html">mkin_long_to_wide()</a></code> </p>
+ </td>
+ <td><p>Convert a dataframe from long to wide format</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="print.mkinmod.html">print(<i>&lt;mkinmod&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Print mkinmod objects</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="transform_odeparms.html">transform_odeparms()</a></code> <code><a href="transform_odeparms.html">backtransform_odeparms()</a></code> </p>
+ </td>
+ <td><p>Functions to transform and backtransform kinetic parameters for fitting</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="ilr.html">ilr()</a></code> <code><a href="ilr.html">invilr()</a></code> </p>
+ </td>
+ <td><p>Function to perform isometric log-ratio transformation</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="sigma_twocomp.html">sigma_twocomp()</a></code> </p>
+ </td>
+ <td><p>Two-component error model</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="logLik.mkinfit.html">logLik(<i>&lt;mkinfit&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Calculated the log-likelihood of a fitted mkinfit object</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="residuals.mkinfit.html">residuals(<i>&lt;mkinfit&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Extract residuals from an mkinfit model</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="nobs.mkinfit.html">nobs(<i>&lt;mkinfit&gt;</i>)</a></code> </p>
+ </td>
+ <td><p>Number of observations on which an mkinfit object was fitted</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkinresplot.html">mkinresplot()</a></code> </p>
+ </td>
+ <td><p>Function to plot residuals stored in an mkin object</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkinparplot.html">mkinparplot()</a></code> </p>
+ </td>
+ <td><p>Function to plot the confidence intervals obtained using mkinfit</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="mkinerrplot.html">mkinerrplot()</a></code> </p>
+ </td>
+ <td><p>Function to plot squared residuals and the error model for an mkin object</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="create_deg_func.html">create_deg_func()</a></code> </p>
+ </td>
+ <td><p>Create degradation functions for known analytical solutions</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-analytical-solutions" class="hasAnchor"><a href="#section-analytical-solutions" class="anchor"></a>Analytical solutions</h2>
+ <p class="section-desc"><p>Parent only model solutions</p></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="SFO.solution.html">SFO.solution()</a></code> </p>
+ </td>
+ <td><p>Single First-Order kinetics</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="FOMC.solution.html">FOMC.solution()</a></code> </p>
+ </td>
+ <td><p>First-Order Multi-Compartment kinetics</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="DFOP.solution.html">DFOP.solution()</a></code> </p>
+ </td>
+ <td><p>Double First-Order in Parallel kinetics</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="SFORB.solution.html">SFORB.solution()</a></code> </p>
+ </td>
+ <td><p>Single First-Order Reversible Binding kinetics</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="HS.solution.html">HS.solution()</a></code> </p>
+ </td>
+ <td><p>Hockey-Stick kinetics</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="IORE.solution.html">IORE.solution()</a></code> </p>
+ </td>
+ <td><p>Indeterminate order rate equation kinetics</p></td>
+ </tr><tr>
+
+ <td>
+ <p><code><a href="logistic.solution.html">logistic.solution()</a></code> </p>
+ </td>
+ <td><p>Logistic kinetics</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-generate-synthetic-datasets" class="hasAnchor"><a href="#section-generate-synthetic-datasets" class="anchor"></a>Generate synthetic datasets</h2>
+ <p class="section-desc"></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="add_err.html">add_err()</a></code> </p>
+ </td>
+ <td><p>Add normally distributed errors to simulated kinetic degradation data</p></td>
+ </tr>
+ </tbody><tbody>
+ <tr>
+ <th colspan="2">
+ <h2 id="section-deprecated-functions" class="hasAnchor"><a href="#section-deprecated-functions" class="anchor"></a>Deprecated functions</h2>
+ <p class="section-desc"><p>Functions that have been superseded</p></p>
+ </th>
+ </tr>
+
+
+ </tbody><tbody>
+
+
+ <tr>
+
+ <td>
+ <p><code><a href="mkinplot.html">mkinplot()</a></code> </p>
+ </td>
+ <td><p>Plot the observed data and the fitted model of an mkinfit object</p></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/loftest-1.png b/docs/dev/reference/loftest-1.png
new file mode 100644
index 00000000..3d20f41e
--- /dev/null
+++ b/docs/dev/reference/loftest-1.png
Binary files differ
diff --git a/docs/dev/reference/loftest-2.png b/docs/dev/reference/loftest-2.png
new file mode 100644
index 00000000..be8bf815
--- /dev/null
+++ b/docs/dev/reference/loftest-2.png
Binary files differ
diff --git a/docs/dev/reference/loftest-3.png b/docs/dev/reference/loftest-3.png
new file mode 100644
index 00000000..cb55838c
--- /dev/null
+++ b/docs/dev/reference/loftest-3.png
Binary files differ
diff --git a/docs/dev/reference/loftest-4.png b/docs/dev/reference/loftest-4.png
new file mode 100644
index 00000000..e2b8ac5c
--- /dev/null
+++ b/docs/dev/reference/loftest-4.png
Binary files differ
diff --git a/docs/dev/reference/loftest-5.png b/docs/dev/reference/loftest-5.png
new file mode 100644
index 00000000..a4d9fd48
--- /dev/null
+++ b/docs/dev/reference/loftest-5.png
Binary files differ
diff --git a/docs/dev/reference/loftest.html b/docs/dev/reference/loftest.html
new file mode 100644
index 00000000..b93b3aa3
--- /dev/null
+++ b/docs/dev/reference/loftest.html
@@ -0,0 +1,349 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Lack-of-fit test for models fitted to data with replicates — loftest • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Lack-of-fit test for models fitted to data with replicates — loftest" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Lack-of-fit test for models fitted to data with replicates</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/loftest.R'><code>R/loftest.R</code></a></small>
+ <div class="hidden name"><code>loftest.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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'>lrtest.default</a></code> from the lmtest package.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>loftest</span>(<span class='no'>object</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for mkinfit</span>
+<span class='fu'>loftest</span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>A model object with a defined loftest method</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Not used</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</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>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
+
+ <div class='dont-index'><p>lrtest</p></div>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># \dontrun{</span>
+<span class='no'>test_data</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span>, <span class='no'>name</span> <span class='kw'>==</span> <span class='st'>"parent"</span>)
+<span class='no'>sfo_fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>test_data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='plot.mkinfit.html'>plot_res</a></span>(<span class='no'>sfo_fit</span>) <span class='co'># We see a clear pattern in the residuals</span></div><div class='img'><img src='loftest-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>loftest</span>(<span class='no'>sfo_fit</span>) <span class='co'># We have a clear lack of fit</span></div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: ANOVA with error model const
+#&gt; Model 2: SFO with error model const
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 10 -40.710
+#&gt; 2 3 -63.954 -7 46.487 7.027e-08 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'><span class='co'>#</span>
+<span class='co'># We try a different model (the one that was used to generate the data)</span>
+<span class='no'>dfop_fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"DFOP"</span>, <span class='no'>test_data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='plot.mkinfit.html'>plot_res</a></span>(<span class='no'>dfop_fit</span>) <span class='co'># We don't see systematic deviations, but heteroscedastic residuals</span></div><div class='img'><img src='loftest-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># therefore we should consider adapting the error model, although we have</span>
+<span class='fu'>loftest</span>(<span class='no'>dfop_fit</span>) <span class='co'># no lack of fit</span></div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: ANOVA with error model const
+#&gt; Model 2: DFOP with error model const
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 10 -40.710
+#&gt; 2 5 -42.453 -5 3.485 0.6257</div><div class='input'><span class='co'>#</span>
+<span class='co'># This is the anova model used internally for the comparison</span>
+<span class='no'>test_data_anova</span> <span class='kw'>&lt;-</span> <span class='no'>test_data</span>
+<span class='no'>test_data_anova</span>$<span class='no'>time</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/factor.html'>as.factor</a></span>(<span class='no'>test_data_anova</span>$<span class='no'>time</span>)
+<span class='no'>anova_fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span>(<span class='no'>value</span> ~ <span class='no'>time</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>test_data_anova</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>anova_fit</span>)</div><div class='output co'>#&gt;
+#&gt; Call:
+#&gt; lm(formula = value ~ time, data = test_data_anova)
+#&gt;
+#&gt; Residuals:
+#&gt; Min 1Q Median 3Q Max
+#&gt; -6.1000 -0.5625 0.0000 0.5625 6.1000
+#&gt;
+#&gt; Coefficients:
+#&gt; Estimate Std. Error t value Pr(&gt;|t|)
+#&gt; (Intercept) 103.150 2.323 44.409 7.44e-12 ***
+#&gt; time1 -19.950 3.285 -6.073 0.000185 ***
+#&gt; time3 -50.800 3.285 -15.465 8.65e-08 ***
+#&gt; time7 -68.500 3.285 -20.854 6.28e-09 ***
+#&gt; time14 -79.750 3.285 -24.278 1.63e-09 ***
+#&gt; time28 -86.000 3.285 -26.181 8.35e-10 ***
+#&gt; time60 -94.900 3.285 -28.891 3.48e-10 ***
+#&gt; time90 -98.500 3.285 -29.986 2.49e-10 ***
+#&gt; time120 -100.450 3.285 -30.580 2.09e-10 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+#&gt;
+#&gt; Residual standard error: 3.285 on 9 degrees of freedom
+#&gt; Multiple R-squared: 0.9953, Adjusted R-squared: 0.9912
+#&gt; F-statistic: 240.5 on 8 and 9 DF, p-value: 1.417e-09
+#&gt; </div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/logLik.html'>logLik</a></span>(<span class='no'>anova_fit</span>) <span class='co'># We get the same likelihood and degrees of freedom</span></div><div class='output co'>#&gt; 'log Lik.' -40.71015 (df=10)</div><div class='input'><span class='co'>#</span>
+<span class='no'>test_data_2</span> <span class='kw'>&lt;-</span> <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span>
+<span class='no'>m_synth_SFO_lin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"M1"</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"M2"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>sfo_lin_fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_SFO_lin</span>, <span class='no'>test_data_2</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='plot.mkinfit.html'>plot_res</a></span>(<span class='no'>sfo_lin_fit</span>) <span class='co'># not a good model, we try parallel formation</span></div><div class='img'><img src='loftest-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>loftest</span>(<span class='no'>sfo_lin_fit</span>)</div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: ANOVA with error model const
+#&gt; Model 2: m_synth_SFO_lin with error model const and fixed parameter(s) M1_0, M2_0
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 28 -93.606
+#&gt; 2 7 -171.927 -21 156.64 &lt; 2.2e-16 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'><span class='co'>#</span>
+<span class='no'>m_synth_SFO_par</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>sfo_par_fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_SFO_par</span>, <span class='no'>test_data_2</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='plot.mkinfit.html'>plot_res</a></span>(<span class='no'>sfo_par_fit</span>) <span class='co'># much better for metabolites</span></div><div class='img'><img src='loftest-4.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>loftest</span>(<span class='no'>sfo_par_fit</span>)</div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: ANOVA with error model const
+#&gt; Model 2: m_synth_SFO_par with error model const and fixed parameter(s) M1_0, M2_0
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 28 -93.606
+#&gt; 2 7 -156.331 -21 125.45 &lt; 2.2e-16 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'><span class='co'>#</span>
+<span class='no'>m_synth_DFOP_par</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"DFOP"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>dfop_par_fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_DFOP_par</span>, <span class='no'>test_data_2</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='plot.mkinfit.html'>plot_res</a></span>(<span class='no'>dfop_par_fit</span>) <span class='co'># No visual lack of fit</span></div><div class='img'><img src='loftest-5.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>loftest</span>(<span class='no'>dfop_par_fit</span>) <span class='co'># no lack of fit found by the test</span></div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: ANOVA with error model const
+#&gt; Model 2: m_synth_DFOP_par with error model const and fixed parameter(s) M1_0, M2_0
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 28 -93.606
+#&gt; 2 9 -102.763 -19 18.313 0.5016</div><div class='input'><span class='co'>#</span>
+<span class='co'># The anova model used for comparison in the case of transformation products</span>
+<span class='no'>test_data_anova_2</span> <span class='kw'>&lt;-</span> <span class='no'>dfop_par_fit</span>$<span class='no'>data</span>
+<span class='no'>test_data_anova_2</span>$<span class='no'>variable</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/factor.html'>as.factor</a></span>(<span class='no'>test_data_anova_2</span>$<span class='no'>variable</span>)
+<span class='no'>test_data_anova_2</span>$<span class='no'>time</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/factor.html'>as.factor</a></span>(<span class='no'>test_data_anova_2</span>$<span class='no'>time</span>)
+<span class='no'>anova_fit_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/lm.html'>lm</a></span>(<span class='no'>observed</span> ~ <span class='no'>time</span>:<span class='no'>variable</span> - <span class='fl'>1</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>test_data_anova_2</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>anova_fit_2</span>)</div><div class='output co'>#&gt;
+#&gt; Call:
+#&gt; lm(formula = observed ~ time:variable - 1, data = test_data_anova_2)
+#&gt;
+#&gt; Residuals:
+#&gt; Min 1Q Median 3Q Max
+#&gt; -6.1000 -0.5875 0.0000 0.5875 6.1000
+#&gt;
+#&gt; Coefficients: (2 not defined because of singularities)
+#&gt; Estimate Std. Error t value Pr(&gt;|t|)
+#&gt; time0:variableparent 103.150 1.573 65.562 &lt; 2e-16 ***
+#&gt; time1:variableparent 83.200 1.573 52.882 &lt; 2e-16 ***
+#&gt; time3:variableparent 52.350 1.573 33.274 &lt; 2e-16 ***
+#&gt; time7:variableparent 34.650 1.573 22.024 &lt; 2e-16 ***
+#&gt; time14:variableparent 23.400 1.573 14.873 6.35e-14 ***
+#&gt; time28:variableparent 17.150 1.573 10.901 5.47e-11 ***
+#&gt; time60:variableparent 8.250 1.573 5.244 1.99e-05 ***
+#&gt; time90:variableparent 4.650 1.573 2.956 0.006717 **
+#&gt; time120:variableparent 2.700 1.573 1.716 0.098507 .
+#&gt; time0:variableM1 NA NA NA NA
+#&gt; time1:variableM1 11.850 1.573 7.532 6.93e-08 ***
+#&gt; time3:variableM1 22.700 1.573 14.428 1.26e-13 ***
+#&gt; time7:variableM1 33.050 1.573 21.007 &lt; 2e-16 ***
+#&gt; time14:variableM1 31.250 1.573 19.863 &lt; 2e-16 ***
+#&gt; time28:variableM1 18.900 1.573 12.013 7.02e-12 ***
+#&gt; time60:variableM1 7.550 1.573 4.799 6.28e-05 ***
+#&gt; time90:variableM1 3.850 1.573 2.447 0.021772 *
+#&gt; time120:variableM1 2.050 1.573 1.303 0.204454
+#&gt; time0:variableM2 NA NA NA NA
+#&gt; time1:variableM2 6.700 1.573 4.259 0.000254 ***
+#&gt; time3:variableM2 16.750 1.573 10.646 8.93e-11 ***
+#&gt; time7:variableM2 25.800 1.573 16.399 6.89e-15 ***
+#&gt; time14:variableM2 28.600 1.573 18.178 6.35e-16 ***
+#&gt; time28:variableM2 25.400 1.573 16.144 9.85e-15 ***
+#&gt; time60:variableM2 21.600 1.573 13.729 3.81e-13 ***
+#&gt; time90:variableM2 17.800 1.573 11.314 2.51e-11 ***
+#&gt; time120:variableM2 14.100 1.573 8.962 2.79e-09 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+#&gt;
+#&gt; Residual standard error: 2.225 on 25 degrees of freedom
+#&gt; Multiple R-squared: 0.9979, Adjusted R-squared: 0.9957
+#&gt; F-statistic: 469.2 on 25 and 25 DF, p-value: &lt; 2.2e-16
+#&gt; </div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/logLik.mkinfit.html b/docs/dev/reference/logLik.mkinfit.html
new file mode 100644
index 00000000..840a4821
--- /dev/null
+++ b/docs/dev/reference/logLik.mkinfit.html
@@ -0,0 +1,229 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Calculated the log-likelihood of a fitted mkinfit object — logLik.mkinfit" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Calculated the log-likelihood of a fitted mkinfit object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/logLik.mkinfit.R'><code>R/logLik.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>logLik.mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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'>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>
+
+ <pre class="usage"><span class='co'># S3 method for mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/logLik.html'>logLik</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An object of class <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>For compatibility with the generic method</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>An object of class <code><a href='https://rdrr.io/r/stats/logLik.html'>logLik</a></code> with the number of estimated
+parameters (degradation model parameters plus variance model parameters)
+as attribute.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</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>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='co'># \dontrun{</span>
+ <span class='no'>sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)
+ )</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='no'>d_t</span> <span class='kw'>&lt;-</span> <span class='no'>FOCUS_2006_D</span>
+ <span class='no'>f_nw</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># no weighting (weights are unity)</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='no'>f_obs</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='no'>f_tc</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>sfo_sfo</span>, <span class='no'>d_t</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f_nw</span>, <span class='no'>f_obs</span>, <span class='no'>f_tc</span>)</div><div class='output co'>#&gt; df AIC
+#&gt; f_nw 5 204.4486
+#&gt; f_obs 6 205.8727
+#&gt; f_tc 6 141.9656</div><div class='input'> # }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/logistic.solution-1.png b/docs/dev/reference/logistic.solution-1.png
new file mode 100644
index 00000000..fd11d0c0
--- /dev/null
+++ b/docs/dev/reference/logistic.solution-1.png
Binary files differ
diff --git a/docs/dev/reference/logistic.solution-2.png b/docs/dev/reference/logistic.solution-2.png
new file mode 100644
index 00000000..78a31f93
--- /dev/null
+++ b/docs/dev/reference/logistic.solution-2.png
Binary files differ
diff --git a/docs/dev/reference/logistic.solution.html b/docs/dev/reference/logistic.solution.html
new file mode 100644
index 00000000..4804fc73
--- /dev/null
+++ b/docs/dev/reference/logistic.solution.html
@@ -0,0 +1,275 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Logistic kinetics — logistic.solution • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Logistic kinetics — logistic.solution" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Logistic kinetics</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parent_solutions.R'><code>R/parent_solutions.R</code></a></small>
+ <div class="hidden name"><code>logistic.solution.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Function describing exponential decline from a defined starting value, with
+an increasing rate constant, supposedly caused by microbial growth</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>logistic.solution</span>(<span class='no'>t</span>, <span class='no'>parent_0</span>, <span class='no'>kmax</span>, <span class='no'>k0</span>, <span class='no'>r</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>t</th>
+ <td><p>Time.</p></td>
+ </tr>
+ <tr>
+ <th>parent_0</th>
+ <td><p>Starting value for the response variable at time zero.</p></td>
+ </tr>
+ <tr>
+ <th>kmax</th>
+ <td><p>Maximum rate constant.</p></td>
+ </tr>
+ <tr>
+ <th>k0</th>
+ <td><p>Minimum rate constant effective at time zero.</p></td>
+ </tr>
+ <tr>
+ <th>r</th>
+ <td><p>Growth rate of the increase in the rate constant.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The value of the response variable at time <code>t</code>.</p>
+ <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>
+FOCUS (2014) &#8220;Generic guidance for Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; 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'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='co'># Reproduce the plot on page 57 of FOCUS (2014)</span>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.2</span>),
+ <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>100</span>),
+ <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>, <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Residue"</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.4</span>),
+ <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>2</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.8</span>),
+ <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>3</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.001</span>, <span class='fl'>0.2</span>),
+ <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>4</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>4</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'>logistic.solution</span>(<span class='no'>x</span>, <span class='fl'>100</span>, <span class='fl'>0.08</span>, <span class='fl'>0.08</span>, <span class='fl'>0.2</span>),
+ <span class='kw'>from</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>5</span>)</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/legend.html'>legend</a></span>(<span class='st'>"topright"</span>, <span class='kw'>inset</span> <span class='kw'>=</span> <span class='fl'>0.05</span>,
+ <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='st'>"k0 = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.0001</span>, <span class='fl'>0.001</span>, <span class='fl'>0.08</span>),
+ <span class='st'>", r = "</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.2</span>, <span class='fl'>0.4</span>, <span class='fl'>0.8</span>, <span class='fl'>0.2</span>, <span class='fl'>0.2</span>)),
+ <span class='kw'>lty</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fl'>5</span>, <span class='kw'>col</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fl'>5</span>)</div><div class='img'><img src='logistic.solution-1.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='co'># Fit with synthetic data</span>
+ <span class='no'>logistic</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"logistic"</span>))
+
+ <span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span>)
+ <span class='no'>parms_logistic</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>kmax</span> <span class='kw'>=</span> <span class='fl'>0.08</span>, <span class='kw'>k0</span> <span class='kw'>=</span> <span class='fl'>0.0001</span>, <span class='kw'>r</span> <span class='kw'>=</span> <span class='fl'>0.2</span>)
+ <span class='no'>d_logistic</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>logistic</span>,
+ <span class='no'>parms_logistic</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>),
+ <span class='no'>sampling_times</span>)
+ <span class='no'>d_2_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_logistic</span>,
+ <span class='kw'>sdfunc</span> <span class='kw'>=</span> <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='sigma_twocomp.html'>sigma_twocomp</a></span>(<span class='no'>x</span>, <span class='fl'>0.5</span>, <span class='fl'>0.07</span>),
+ <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>reps</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>LOD</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456</span>)<span class='kw'>[[</span><span class='fl'>1</span>]]
+
+ <span class='no'>m</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"logistic"</span>, <span class='no'>d_2_1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>m</span>)</div><div class='img'><img src='logistic.solution-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>m</span>)$<span class='no'>bpar</span></div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t) Lower
+#&gt; parent_0 1.057896e+02 1.9023449649 55.610120 3.768361e-16 1.016451e+02
+#&gt; kmax 6.398190e-02 0.0143201029 4.467978 3.841828e-04 3.929235e-02
+#&gt; k0 1.612775e-04 0.0005866813 0.274898 3.940351e-01 5.846685e-08
+#&gt; r 2.263946e-01 0.1718110773 1.317695 1.061044e-01 4.335843e-02
+#&gt; sigma 5.332935e+00 0.9145907310 5.830952 4.036926e-05 3.340213e+00
+#&gt; Upper
+#&gt; parent_0 109.9341588
+#&gt; kmax 0.1041853
+#&gt; k0 0.4448750
+#&gt; r 1.1821121
+#&gt; sigma 7.3256566</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>m</span>)$<span class='no'>distimes</span></div><div class='output co'>#&gt; DT50 DT90 DT50_k0 DT50_kmax
+#&gt; parent 36.86533 62.41511 4297.854 10.83349</div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/lrtest.mkinfit.html b/docs/dev/reference/lrtest.mkinfit.html
new file mode 100644
index 00000000..712cfcfb
--- /dev/null
+++ b/docs/dev/reference/lrtest.mkinfit.html
@@ -0,0 +1,265 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Likelihood ratio test for mkinfit models — lrtest.mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Likelihood ratio test for mkinfit models — lrtest.mkinfit" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Likelihood ratio test for mkinfit models</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/lrtest.mkinfit.R'><code>R/lrtest.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>lrtest.mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='co'># S3 method for mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>object</span>, <span class='kw'>object_2</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for mmkin</span>
+<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An <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></td>
+ </tr>
+ <tr>
+ <th>object_2</th>
+ <td><p>Optionally, another mkinfit object fitted to the same data.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><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></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</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'>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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># \dontrun{</span>
+<span class='no'>test_data</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span>, <span class='no'>name</span> <span class='kw'>==</span> <span class='st'>"parent"</span>)
+<span class='no'>sfo_fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>test_data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>dfop_fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"DFOP"</span>, <span class='no'>test_data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>dfop_fit</span>, <span class='no'>sfo_fit</span>)</div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: DFOP with error model const
+#&gt; Model 2: SFO with error model const
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 5 -42.453
+#&gt; 2 3 -63.954 -2 43.002 4.594e-10 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>sfo_fit</span>, <span class='no'>dfop_fit</span>)</div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: DFOP with error model const
+#&gt; Model 2: SFO with error model const
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 5 -42.453
+#&gt; 2 3 -63.954 -2 43.002 4.594e-10 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'>
+<span class='co'># The following two examples are commented out as they fail during</span>
+<span class='co'># generation of the static help pages by pkgdown</span>
+<span class='co'>#lrtest(dfop_fit, error_model = "tc")</span>
+<span class='co'>#lrtest(dfop_fit, fixed_parms = c(k2 = 0))</span>
+
+<span class='co'># However, this equivalent syntax also works for static help pages</span>
+<span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>dfop_fit</span>, <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>dfop_fit</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>))</div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: DFOP with error model tc
+#&gt; Model 2: DFOP with error model const
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 6 -34.587
+#&gt; 2 5 -42.453 -1 15.731 7.302e-05 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a></span>(<span class='no'>dfop_fit</span>, <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>dfop_fit</span>, <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k2</span> <span class='kw'>=</span> <span class='fl'>0</span>)))</div><div class='output co'>#&gt; Likelihood ratio test
+#&gt;
+#&gt; Model 1: DFOP with error model const
+#&gt; Model 2: DFOP with error model const and fixed parameter(s) k2
+#&gt; #Df LogLik Df Chisq Pr(&gt;Chisq)
+#&gt; 1 5 -42.453
+#&gt; 2 4 -57.340 -1 29.776 4.851e-08 ***
+#&gt; ---
+#&gt; Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/max_twa_parent.html b/docs/dev/reference/max_twa_parent.html
new file mode 100644
index 00000000..77166d00
--- /dev/null
+++ b/docs/dev/reference/max_twa_parent.html
@@ -0,0 +1,270 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function to calculate maximum time weighted average concentrations from
+kinetic models fitted with mkinfit — max_twa_parent • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function to calculate maximum time weighted average concentrations from
+kinetic models fitted with mkinfit — max_twa_parent" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Function to calculate maximum time weighted average concentrations from
+kinetic models fitted with mkinfit</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/max_twa_parent.R'><code>R/max_twa_parent.R</code></a></small>
+ <div class="hidden name"><code>max_twa_parent.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>max_twa_parent</span>(<span class='no'>fit</span>, <span class='no'>windows</span>)
+
+<span class='fu'>max_twa_sfo</span>(<span class='kw'>M0</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>k</span>, <span class='no'>t</span>)
+
+<span class='fu'>max_twa_fomc</span>(<span class='kw'>M0</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>alpha</span>, <span class='no'>beta</span>, <span class='no'>t</span>)
+
+<span class='fu'>max_twa_dfop</span>(<span class='kw'>M0</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>g</span>, <span class='no'>t</span>)
+
+<span class='fu'>max_twa_hs</span>(<span class='kw'>M0</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>k1</span>, <span class='no'>k2</span>, <span class='no'>tb</span>, <span class='no'>t</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>fit</th>
+ <td><p>An object of class <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>windows</th>
+ <td><p>The width of the time windows for which the TWAs should be
+calculated.</p></td>
+ </tr>
+ <tr>
+ <th>M0</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>k</th>
+ <td><p>The rate constant in the case of SFO kinetics.</p></td>
+ </tr>
+ <tr>
+ <th>t</th>
+ <td><p>The width of the time window.</p></td>
+ </tr>
+ <tr>
+ <th>alpha</th>
+ <td><p>Parameter of the FOMC model.</p></td>
+ </tr>
+ <tr>
+ <th>beta</th>
+ <td><p>Parameter of the FOMC model.</p></td>
+ </tr>
+ <tr>
+ <th>k1</th>
+ <td><p>The first rate constant of the DFOP or the HS kinetics.</p></td>
+ </tr>
+ <tr>
+ <th>k2</th>
+ <td><p>The second rate constant of the DFOP or the HS kinetics.</p></td>
+ </tr>
+ <tr>
+ <th>g</th>
+ <td><p>Parameter of the DFOP model.</p></td>
+ </tr>
+ <tr>
+ <th>tb</th>
+ <td><p>Parameter of the HS model.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'>max_twa_parent</span>(<span class='no'>fit</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>7</span>, <span class='fl'>21</span>))</div><div class='output co'>#&gt; 7 21
+#&gt; 34.71343 18.22124 </div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mccall81_245T.html b/docs/dev/reference/mccall81_245T.html
new file mode 100644
index 00000000..dc0dfbf8
--- /dev/null
+++ b/docs/dev/reference/mccall81_245T.html
@@ -0,0 +1,245 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Datasets on aerobic soil metabolism of 2,4,5-T in six soils — mccall81_245T" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Datasets on aerobic soil metabolism of 2,4,5-T in six soils</h1>
+
+ <div class="hidden name"><code>mccall81_245T.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='no'>mccall81_245T</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</h2>
+
+ <p>A dataframe containing the following variables.</p><dl'>
+ <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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</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='http://dx.doi.org/10.1021/jf00103a026'>http://dx.doi.org/10.1021/jf00103a026</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'> <span class='no'>SFO_SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>T245</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"phenol"</span>),
+ <span class='kw'>phenol</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"anisole"</span>),
+ <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># \dontrun{</span>
+ <span class='no'>fit.1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.1</span>)$<span class='no'>bpar</span></div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t)
+#&gt; T245_0 1.038550e+02 2.184707509 47.537272 4.472189e-18
+#&gt; k_T245 4.337042e-02 0.001898397 22.845818 2.276912e-13
+#&gt; k_phenol 4.050581e-01 0.298699410 1.356073 9.756993e-02
+#&gt; k_anisole 6.678742e-03 0.000802144 8.326114 2.623179e-07
+#&gt; f_T245_to_phenol 6.227599e-01 0.398534147 1.562626 6.949418e-02
+#&gt; f_phenol_to_anisole 1.000000e+00 0.671844135 1.488440 7.867793e-02
+#&gt; sigma 2.514628e+00 0.490755933 5.123989 6.233163e-05
+#&gt; Lower Upper
+#&gt; T245_0 99.246061427 1.084640e+02
+#&gt; k_T245 0.039631621 4.746194e-02
+#&gt; k_phenol 0.218013878 7.525762e-01
+#&gt; k_anisole 0.005370739 8.305299e-03
+#&gt; f_T245_to_phenol 0.547559082 6.924813e-01
+#&gt; f_phenol_to_anisole 0.000000000 1.000000e+00
+#&gt; sigma 1.706607296 3.322649e+00</div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.1</span>)</div><div class='output co'>#&gt; $ff
+#&gt; T245_phenol T245_sink phenol_anisole phenol_sink
+#&gt; 6.227599e-01 3.772401e-01 1.000000e+00 1.005127e-10
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; T245 15.982025 53.09114
+#&gt; phenol 1.711229 5.68458
+#&gt; anisole 103.784092 344.76329
+#&gt; </div><div class='input'> <span class='co'># k_phenol_sink is really small, therefore fix it to zero</span>
+ <span class='no'>fit.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>),
+ <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_phenol_sink</span> <span class='kw'>=</span> <span class='fl'>0</span>),
+ <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='st'>"k_phenol_sink"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Initial parameter(s) k_phenol_sink not used in the model</span></div><div class='output co'>#&gt; <span class='error'>Error in data.frame(value = c(state.ini.fixed, parms.fixed)): row names contain missing values</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.2</span>)$<span class='no'>bpar</span></div><div class='output co'>#&gt; <span class='error'>Error in summary(fit.2): object 'fit.2' not found</span></div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.1</span>)</div><div class='output co'>#&gt; $ff
+#&gt; T245_phenol T245_sink phenol_anisole phenol_sink
+#&gt; 6.227599e-01 3.772401e-01 1.000000e+00 1.005127e-10
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; T245 15.982025 53.09114
+#&gt; phenol 1.711229 5.68458
+#&gt; anisole 103.784092 344.76329
+#&gt; </div><div class='input'> <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fit.2</span>)</div><div class='output co'>#&gt; <span class='error'>Error in identical(fit$err_mod, "const"): object 'fit.2' not found</span></div><div class='input'> # }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkin_long_to_wide.html b/docs/dev/reference/mkin_long_to_wide.html
new file mode 100644
index 00000000..143eb12a
--- /dev/null
+++ b/docs/dev/reference/mkin_long_to_wide.html
@@ -0,0 +1,233 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Convert a dataframe from long to wide format — mkin_long_to_wide • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Convert a dataframe from long to wide format — mkin_long_to_wide" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Convert a dataframe from long to wide format</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkin_long_to_wide.R'><code>R/mkin_long_to_wide.R</code></a></small>
+ <div class="hidden name"><code>mkin_long_to_wide.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>mkin_long_to_wide</span>(<span class='no'>long_data</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>, <span class='kw'>outtime</span> <span class='kw'>=</span> <span class='st'>"time"</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>long_data</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>time</th>
+ <td><p>The name of the time variable in the long input data.</p></td>
+ </tr>
+ <tr>
+ <th>outtime</th>
+ <td><p>The name of the time variable in the wide output data.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>Dataframe in wide format.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='fu'>mkin_long_to_wide</span>(<span class='no'>FOCUS_2006_D</span>)</div><div class='output co'>#&gt; time parent m1
+#&gt; 1 0 99.46 0.00
+#&gt; 2 0 102.04 0.00
+#&gt; 3 1 93.50 4.84
+#&gt; 4 1 92.50 5.64
+#&gt; 5 3 63.23 12.91
+#&gt; 6 3 68.99 12.96
+#&gt; 7 7 52.32 22.97
+#&gt; 8 7 55.13 24.47
+#&gt; 9 14 27.27 41.69
+#&gt; 10 14 26.64 33.21
+#&gt; 11 21 11.50 44.37
+#&gt; 12 21 11.64 46.44
+#&gt; 13 35 2.85 41.22
+#&gt; 14 35 2.91 37.95
+#&gt; 15 50 0.69 41.19
+#&gt; 16 50 0.63 40.01
+#&gt; 17 75 0.05 40.09
+#&gt; 18 75 0.06 33.85
+#&gt; 19 100 NA 31.04
+#&gt; 20 100 NA 33.13
+#&gt; 21 120 NA 25.15
+#&gt; 22 120 NA 33.31</div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkin_wide_to_long.html b/docs/dev/reference/mkin_wide_to_long.html
new file mode 100644
index 00000000..14419558
--- /dev/null
+++ b/docs/dev/reference/mkin_wide_to_long.html
@@ -0,0 +1,213 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Convert a dataframe with observations over time into long format — mkin_wide_to_long • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Convert a dataframe with observations over time into long format — mkin_wide_to_long" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Convert a dataframe with observations over time into long format</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkin_wide_to_long.R'><code>R/mkin_wide_to_long.R</code></a></small>
+ <div class="hidden name"><code>mkin_wide_to_long.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>mkin_wide_to_long</span>(<span class='no'>wide_data</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"t"</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>wide_data</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>time</th>
+ <td><p>The name of the time variable.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>Dataframe in long format as needed for <code><a href='mkinfit.html'>mkinfit</a></code>.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='no'>wide</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(<span class='kw'>t</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>1</span>,<span class='fl'>2</span>,<span class='fl'>3</span>), <span class='kw'>x</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>1</span>,<span class='fl'>4</span>,<span class='fl'>7</span>), <span class='kw'>y</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>3</span>,<span class='fl'>4</span>,<span class='fl'>5</span>))
+<span class='fu'>mkin_wide_to_long</span>(<span class='no'>wide</span>)</div><div class='output co'>#&gt; name time value
+#&gt; 1 x 1 1
+#&gt; 2 x 2 4
+#&gt; 3 x 3 7
+#&gt; 4 y 1 3
+#&gt; 5 y 2 4
+#&gt; 6 y 3 5</div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinds.html b/docs/dev/reference/mkinds.html
new file mode 100644
index 00000000..5c7d9490
--- /dev/null
+++ b/docs/dev/reference/mkinds.html
@@ -0,0 +1,253 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>A dataset class for mkin — mkinds • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="A dataset class for mkin — mkinds" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>A dataset class for mkin</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinds.R'><code>R/mkinds.R</code></a></small>
+ <div class="hidden name"><code>mkinds.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+
+
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
+
+ <div class='dont-index'><p>The S3 printing method <code><a href='print.mkinds.html'>print.mkinds</a></code></p></div>
+ <h2 class="hasAnchor" id="public-fields"><a class="anchor" href="#public-fields"></a>Public fields</h2>
+
+ <p><div class="r6-fields"></p><dl'>
+<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></div></p>
+ <h2 class="hasAnchor" id="methods"><a class="anchor" href="#methods"></a>Methods</h2>
+
+
+<h3>Public methods</h3>
+
+<ul>
+<li><p><a href='#method-new'><code>mkinds$new()</code></a></p></li>
+<li><p><a href='#method-clone'><code>mkinds$clone()</code></a></p></li>
+</ul>
+<p><hr>
+<a id="method-new"></a></p><h3>Method <code>new()</code></h3>
+<p>Create a new mkinds object</p><h3>Usage</h3>
+<p><div class="r"></p><pre><span class='no'>mkinds</span>$<span class='fu'>new</span>(<span class='kw'>title</span> <span class='kw'>=</span> <span class='st'>""</span>, <span class='no'>data</span>, <span class='kw'>time_unit</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>unit</span> <span class='kw'>=</span> <span class='fl'>NA</span>)</pre><p></div></p>
+
+<h3>Arguments</h3>
+<p><div class="arguments"></p><dl'>
+<dt><code>title</code></dt><dd><p>The dataset title</p></dd>
+
+<dt><code>data</code></dt><dd><p>The data</p></dd>
+
+<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></div></p>
+<p><hr>
+<a id="method-clone"></a></p><h3>Method <code>clone()</code></h3>
+<p>The objects of this class are cloneable with this method.</p><h3>Usage</h3>
+<p><div class="r"></p><pre><span class='no'>mkinds</span>$<span class='fu'>clone</span>(<span class='kw'>deep</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre><p></div></p>
+
+<h3>Arguments</h3>
+<p><div class="arguments"></p><dl'>
+<dt><code>deep</code></dt><dd><p>Whether to make a deep clone.</p></dd>
+
+</dl><p></div></p>
+
+
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='no'>mds</span> <span class='kw'>&lt;-</span> <span class='no'>mkinds</span>$<span class='fu'>new</span>(<span class='st'>"FOCUS A"</span>, <span class='no'>FOCUS_2006_A</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>mds</span>)</div><div class='output co'>#&gt; &lt;mkinds&gt; with $title: FOCUS A
+#&gt; Observed compounds $observed: parent
+#&gt; Sampling times $sampling_times: 0, 3, 7, 14, 30, 62, 90, 118
+#&gt; With a maximum of 1 replicates</div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinerrmin.html b/docs/dev/reference/mkinerrmin.html
new file mode 100644
index 00000000..9f58dfaa
--- /dev/null
+++ b/docs/dev/reference/mkinerrmin.html
@@ -0,0 +1,233 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Calculate the minimum error to assume in order to pass the variance test — mkinerrmin • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Calculate the minimum error to assume in order to pass the variance test — mkinerrmin" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Calculate the minimum error to assume in order to pass the variance test</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinerrmin.R'><code>R/mkinerrmin.R</code></a></small>
+ <div class="hidden name"><code>mkinerrmin.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>mkinerrmin</span>(<span class='no'>fit</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.05</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>fit</th>
+ <td><p>an object of class <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>alpha</th>
+ <td><p>The confidence level chosen for the chi-squared test.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A dataframe with the following components:</p>
+<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> The
+dataframe has one row for the total dataset and one further row for each
+observed state variable in the model.
+
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>This function is used internally by <code><a href='summary.mkinfit.html'>summary.mkinfit</a></code>.</p>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
+Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics, EC
+Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='no'>SFO_SFO</span> <span class='kw'>=</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>fit_FOCUS_D</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>mkinerrmin</span>(<span class='no'>fit_FOCUS_D</span>), <span class='fl'>4</span>)</div><div class='output co'>#&gt; err.min n.optim df
+#&gt; All data 0.0640 4 15
+#&gt; parent 0.0646 2 7
+#&gt; m1 0.0469 2 8</div><div class='input'><span class='co'># \dontrun{</span>
+ <span class='no'>fit_FOCUS_E</span> <span class='kw'>=</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_E</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>mkinerrmin</span>(<span class='no'>fit_FOCUS_E</span>), <span class='fl'>4</span>)</div><div class='output co'>#&gt; err.min n.optim df
+#&gt; All data 0.1544 4 13
+#&gt; parent 0.1659 2 7
+#&gt; m1 0.1095 2 6</div><div class='input'># }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinerrplot-1.png b/docs/dev/reference/mkinerrplot-1.png
new file mode 100644
index 00000000..c5d3495f
--- /dev/null
+++ b/docs/dev/reference/mkinerrplot-1.png
Binary files differ
diff --git a/docs/dev/reference/mkinerrplot.html b/docs/dev/reference/mkinerrplot.html
new file mode 100644
index 00000000..940a6861
--- /dev/null
+++ b/docs/dev/reference/mkinerrplot.html
@@ -0,0 +1,272 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function to plot squared residuals and the error model for an mkin object — mkinerrplot • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function to plot squared residuals and the error model for an mkin object — mkinerrplot" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Function to plot squared residuals and the error model for an mkin object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinerrplot.R'><code>R/mkinerrplot.R</code></a></small>
+ <div class="hidden name"><code>mkinerrplot.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>mkinerrplot</span>(
+ <span class='no'>object</span>,
+ <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>object</span>$<span class='no'>mkinmod</span>$<span class='no'>map</span>),
+ <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1.1</span> * <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span>(<span class='no'>object</span>$<span class='no'>data</span>$<span class='no'>predicted</span>)),
+ <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Predicted"</span>,
+ <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Squared residual"</span>,
+ <span class='kw'>maxy</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='st'>"topright"</span>,
+ <span class='kw'>col_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>pch_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>frame</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='no'>...</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>A fit represented in an <code><a href='mkinfit.html'>mkinfit</a></code> object.</p></td>
+ </tr>
+ <tr>
+ <th>obs_vars</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>xlim</th>
+ <td><p>plot range in x direction.</p></td>
+ </tr>
+ <tr>
+ <th>xlab</th>
+ <td><p>Label for the x axis.</p></td>
+ </tr>
+ <tr>
+ <th>ylab</th>
+ <td><p>Label for the y axis.</p></td>
+ </tr>
+ <tr>
+ <th>maxy</th>
+ <td><p>Maximum value of the residuals. This is used for the scaling of
+the y axis and defaults to "auto".</p></td>
+ </tr>
+ <tr>
+ <th>legend</th>
+ <td><p>Should a legend be plotted?</p></td>
+ </tr>
+ <tr>
+ <th>lpos</th>
+ <td><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'>legend</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>col_obs</th>
+ <td><p>Colors for the observed variables.</p></td>
+ </tr>
+ <tr>
+ <th>pch_obs</th>
+ <td><p>Symbols to be used for the observed variables.</p></td>
+ </tr>
+ <tr>
+ <th>frame</th>
+ <td><p>Should a frame be drawn around the plots?</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>further arguments passed to <code><a href='https://rdrr.io/r/base/plot.html'>plot</a></code>.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>Nothing is returned by this function, as it is called for its side
+effect, namely to produce a plot.</p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># \dontrun{</span>
+<span class='no'>model</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinerrplot</span>(<span class='no'>fit</span>)</div><div class='img'><img src='mkinerrplot-1.png' alt='' width='700' height='433' /></div><div class='input'># }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinfit.html b/docs/dev/reference/mkinfit.html
new file mode 100644
index 00000000..49e896fc
--- /dev/null
+++ b/docs/dev/reference/mkinfit.html
@@ -0,0 +1,1054 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Fit a kinetic model to data with one or more state variables — mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Fit a kinetic model to data with one or more state variables — mkinfit" />
+<meta property="og:description" content="This function maximises the likelihood of the observed data using the Port
+algorithm stats::nlminb(), and the specified initial or fixed
+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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Fit a kinetic model to data with one or more state variables</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinfit.R'><code>R/mkinfit.R</code></a></small>
+ <div class="hidden name"><code>mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>This function maximises the likelihood of the observed data using the Port
+algorithm <code><a href='https://rdrr.io/r/stats/nlminb.html'>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>
+
+ <pre class="usage"><span class='fu'>mkinfit</span>(
+ <span class='no'>mkinmod</span>,
+ <span class='no'>observed</span>,
+ <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>state.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>err.ini</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>fixed_parms</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
+ <span class='kw'>fixed_initials</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>mkinmod</span>$<span class='no'>diffs</span>)[-<span class='fl'>1</span>],
+ <span class='kw'>from_max_mean</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"auto"</span>, <span class='st'>"analytical"</span>, <span class='st'>"eigen"</span>, <span class='st'>"deSolve"</span>),
+ <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>,
+ <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>eval.max</span> <span class='kw'>=</span> <span class='fl'>300</span>, <span class='kw'>iter.max</span> <span class='kw'>=</span> <span class='fl'>200</span>),
+ <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>,
+ <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>,
+ <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"const"</span>, <span class='st'>"obs"</span>, <span class='st'>"tc"</span>),
+ <span class='kw'>error_model_algorithm</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"auto"</span>, <span class='st'>"d_3"</span>, <span class='st'>"direct"</span>, <span class='st'>"twostep"</span>, <span class='st'>"threestep"</span>,
+ <span class='st'>"fourstep"</span>, <span class='st'>"IRLS"</span>, <span class='st'>"OLS"</span>),
+ <span class='kw'>reweight.tol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>,
+ <span class='kw'>reweight.max.iter</span> <span class='kw'>=</span> <span class='fl'>10</span>,
+ <span class='kw'>trace_parms</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='no'>...</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>mkinmod</th>
+ <td><p>A list of class <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></td>
+ </tr>
+ <tr>
+ <th>observed</th>
+ <td><p>A dataframe 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></td>
+ </tr>
+ <tr>
+ <th>parms.ini</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>state.ini</th>
+ <td><p>A named vector of initial values for the state variables of
+the model. In case the observed variables are represented by more than one
+model variable, the names will differ from the names of the observed
+variables (see <code>map</code> component of <a href='mkinmod.html'>mkinmod</a>). The default
+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></td>
+ </tr>
+ <tr>
+ <th>err.ini</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>fixed_parms</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>fixed_initials</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>from_max_mean</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>solution_type</th>
+ <td><p>If set to "eigen", the solution of the system of
+differential equations is based on the spectral decomposition of the
+coefficient matrix in cases that this is possible. If set to "deSolve", a
+numerical <a href='https://rdrr.io/pkg/deSolve/man/ode.html'>ode solver from package deSolve</a> is used. If
+set to "analytical", an analytical solution of the model is used. This is
+only implemented for relatively simple degradation models. The default is
+"auto", which uses "analytical" if possible, otherwise "deSolve" if a
+compiler is present, and "eigen" if no compiler is present and the model
+can be expressed using eigenvalues and eigenvectors.</p></td>
+ </tr>
+ <tr>
+ <th>method.ode</th>
+ <td><p>The solution method passed via <code><a href='mkinpredict.html'>mkinpredict()</a></code>
+to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code> in case the solution type is "deSolve". The default
+"lsoda" is performant, but sometimes fails to converge.</p></td>
+ </tr>
+ <tr>
+ <th>use_compiled</th>
+ <td><p>If set to <code>FALSE</code>, no compiled version of the
+<a href='mkinmod.html'>mkinmod</a> model is used in the calls to <code><a href='mkinpredict.html'>mkinpredict()</a></code> even if a compiled
+version is present.</p></td>
+ </tr>
+ <tr>
+ <th>control</th>
+ <td><p>A list of control arguments passed to <code><a href='https://rdrr.io/r/stats/nlminb.html'>stats::nlminb()</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>transform_rates</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>transform_fractions</th>
+ <td><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. If TRUE,
+the g parameter of the DFOP and HS models are also transformed, as they
+can also be seen as compositional data. The transformation used for these
+transformations is the <code><a href='ilr.html'>ilr()</a></code> transformation.</p></td>
+ </tr>
+ <tr>
+ <th>quiet</th>
+ <td><p>Suppress printing out the current value of the negative
+log-likelihood after each improvement?</p></td>
+ </tr>
+ <tr>
+ <th>atol</th>
+ <td><p>Absolute error tolerance, passed to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>. Default
+is 1e-8, which is lower than the default in the <code><a href='https://rdrr.io/pkg/deSolve/man/lsoda.html'>deSolve::lsoda()</a></code>
+function which is used per default.</p></td>
+ </tr>
+ <tr>
+ <th>rtol</th>
+ <td><p>Absolute error tolerance, passed to <code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>. Default
+is 1e-10, much lower than in <code><a href='https://rdrr.io/pkg/deSolve/man/lsoda.html'>deSolve::lsoda()</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>error_model</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>error_model_algorithm</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>reweight.tol</th>
+ <td><p>Tolerance for the convergence criterion calculated from
+the error model parameters in IRLS fits.</p></td>
+ </tr>
+ <tr>
+ <th>reweight.max.iter</th>
+ <td><p>Maximum number of iterations in IRLS fits.</p></td>
+ </tr>
+ <tr>
+ <th>trace_parms</th>
+ <td><p>Should a trace of the parameter values be listed?</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments that will be passed on to
+<code><a href='https://rdrr.io/pkg/deSolve/man/ode.html'>deSolve::ode()</a></code>.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A list with "mkinfit" in the class attribute.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>Per default, parameters in the kinetic models are internally transformed in
+order to better satisfy the assumption of a normal distribution of their
+estimators.</p>
+ <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</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'>doi:10.3390/environments6120124</a>.</p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
+
+ <div class='dont-index'><p><a href='summary.mkinfit.html'>summary.mkinfit</a>, <a href='plot.mkinfit.html'>plot.mkinfit</a>, <a href='parms.html'>parms</a> and <a href='https://rdrr.io/pkg/lmtest/man/lrtest.html'>lrtest</a>.</p>
+<p>Comparisons of models fitted to the same data can be made using
+<code><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></code> by virtue of the method <code><a href='logLik.mkinfit.html'>logLik.mkinfit</a></code>.</p>
+<p>Fitting of several models to several datasets in a single call to
+<code><a href='mmkin.html'>mmkin</a></code>.</p></div>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># Use shorthand notation for parent only degradation</span>
+<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.50.3
+#&gt; R version used for fitting: 4.0.0
+#&gt; Date of fit: Wed May 27 05:54:13 2020
+#&gt; Date of summary: Wed May 27 05:54:13 2020
+#&gt;
+#&gt; Equations:
+#&gt; d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
+#&gt;
+#&gt; Model predictions using solution type analytical
+#&gt;
+#&gt; Fitted using 222 model solutions performed in 0.043 s
+#&gt;
+#&gt; Error model: Constant variance
+#&gt;
+#&gt; Error model algorithm: OLS
+#&gt;
+#&gt; Starting values for parameters to be optimised:
+#&gt; value type
+#&gt; parent_0 85.1 state
+#&gt; alpha 1.0 deparm
+#&gt; beta 10.0 deparm
+#&gt;
+#&gt; Starting values for the transformed parameters actually optimised:
+#&gt; value lower upper
+#&gt; parent_0 85.100000 -Inf Inf
+#&gt; log_alpha 0.000000 -Inf Inf
+#&gt; log_beta 2.302585 -Inf Inf
+#&gt;
+#&gt; Fixed parameter values:
+#&gt; None
+#&gt;
+#&gt; Results:
+#&gt;
+#&gt; AIC BIC logLik
+#&gt; 44.68652 45.47542 -18.34326
+#&gt;
+#&gt; Optimised, transformed parameters with symmetric confidence intervals:
+#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 85.87000 1.8070 81.23000 90.5200
+#&gt; log_alpha 0.05192 0.1353 -0.29580 0.3996
+#&gt; log_beta 0.65100 0.2287 0.06315 1.2390
+#&gt; sigma 1.85700 0.4378 0.73200 2.9830
+#&gt;
+#&gt; Parameter correlation:
+#&gt; parent_0 log_alpha log_beta sigma
+#&gt; parent_0 1.000e+00 -1.565e-01 -3.142e-01 4.770e-08
+#&gt; log_alpha -1.565e-01 1.000e+00 9.564e-01 9.974e-08
+#&gt; log_beta -3.142e-01 9.564e-01 1.000e+00 8.468e-08
+#&gt; sigma 4.770e-08 9.974e-08 8.468e-08 1.000e+00
+#&gt;
+#&gt; Backtransformed parameters:
+#&gt; Confidence intervals for internally transformed parameters are asymmetric.
+#&gt; t-test (unrealistically) based on the assumption of normal distribution
+#&gt; for estimators of untransformed parameters.
+#&gt; Estimate t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 85.870 47.530 3.893e-08 81.2300 90.520
+#&gt; alpha 1.053 7.393 3.562e-04 0.7439 1.491
+#&gt; beta 1.917 4.373 3.601e-03 1.0650 3.451
+#&gt; sigma 1.857 4.243 4.074e-03 0.7320 2.983
+#&gt;
+#&gt; FOCUS Chi2 error levels in percent:
+#&gt; err.min n.optim df
+#&gt; All data 6.657 3 6
+#&gt; parent 6.657 3 6
+#&gt;
+#&gt; Estimated disappearance times:
+#&gt; DT50 DT90 DT50back
+#&gt; parent 1.785 15.15 4.56
+#&gt;
+#&gt; Data:
+#&gt; time variable observed predicted residual
+#&gt; 0 parent 85.1 85.875 -0.7749
+#&gt; 1 parent 57.9 55.191 2.7091
+#&gt; 3 parent 29.9 31.845 -1.9452
+#&gt; 7 parent 14.6 17.012 -2.4124
+#&gt; 14 parent 9.7 9.241 0.4590
+#&gt; 28 parent 6.6 4.754 1.8460
+#&gt; 63 parent 4.0 2.102 1.8977
+#&gt; 91 parent 3.9 1.441 2.4590
+#&gt; 119 parent 0.6 1.092 -0.4919</div><div class='input'>
+<span class='co'># One parent compound, one metabolite, both single first order.</span>
+<span class='co'># Use mkinsub for convenience in model formulation. Pathway to sink included per default.</span>
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)))</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#&gt; user system elapsed
+#&gt; 0.414 0.000 0.418 </div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; parent_0 k_parent k_m1 f_parent_to_m1 sigma
+#&gt; 99.598481046 0.098697740 0.005260651 0.514475962 3.125503875 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; $ff
+#&gt; parent_m1 parent_sink
+#&gt; 0.514476 0.485524
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; parent 7.022929 23.32966
+#&gt; m1 131.760724 437.69965
+#&gt; </div><div class='input'><span class='co'># \dontrun{</span>
+<span class='co'># deSolve is slower when no C compiler (gcc) was available during model generation</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fit.deSolve</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)))</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#&gt; <span class='message'>Ordinary least squares optimisation</span></div><div class='output co'>#&gt; Sum of squared residuals at call 1: 15156.12
+#&gt; Sum of squared residuals at call 2: 15156.12
+#&gt; Sum of squared residuals at call 6: 8243.645
+#&gt; Sum of squared residuals at call 12: 6290.712
+#&gt; Sum of squared residuals at call 13: 6290.683
+#&gt; Sum of squared residuals at call 15: 6290.452
+#&gt; Sum of squared residuals at call 18: 1700.749
+#&gt; Sum of squared residuals at call 20: 1700.611
+#&gt; Sum of squared residuals at call 24: 1190.923
+#&gt; Sum of squared residuals at call 26: 1190.922
+#&gt; Sum of squared residuals at call 29: 1017.417
+#&gt; Sum of squared residuals at call 31: 1017.417
+#&gt; Sum of squared residuals at call 33: 1017.416
+#&gt; Sum of squared residuals at call 34: 644.0472
+#&gt; Sum of squared residuals at call 36: 644.047
+#&gt; Sum of squared residuals at call 38: 644.047
+#&gt; Sum of squared residuals at call 39: 590.5025
+#&gt; Sum of squared residuals at call 41: 590.5022
+#&gt; Sum of squared residuals at call 43: 590.5016
+#&gt; Sum of squared residuals at call 44: 543.2196
+#&gt; Sum of squared residuals at call 45: 543.2193
+#&gt; Sum of squared residuals at call 46: 543.2192
+#&gt; Sum of squared residuals at call 50: 391.348
+#&gt; Sum of squared residuals at call 51: 391.3479
+#&gt; Sum of squared residuals at call 56: 386.479
+#&gt; Sum of squared residuals at call 58: 386.479
+#&gt; Sum of squared residuals at call 60: 386.4779
+#&gt; Sum of squared residuals at call 61: 384.0686
+#&gt; Sum of squared residuals at call 63: 384.0686
+#&gt; Sum of squared residuals at call 66: 382.7813
+#&gt; Sum of squared residuals at call 68: 382.7813
+#&gt; Sum of squared residuals at call 70: 382.7813
+#&gt; Sum of squared residuals at call 71: 378.9273
+#&gt; Sum of squared residuals at call 73: 378.9273
+#&gt; Sum of squared residuals at call 75: 378.9272
+#&gt; Sum of squared residuals at call 76: 377.4847
+#&gt; Sum of squared residuals at call 78: 377.4846
+#&gt; Sum of squared residuals at call 81: 375.9738
+#&gt; Sum of squared residuals at call 83: 375.9738
+#&gt; Sum of squared residuals at call 86: 375.3387
+#&gt; Sum of squared residuals at call 88: 375.3387
+#&gt; Sum of squared residuals at call 91: 374.5774
+#&gt; Sum of squared residuals at call 93: 374.5774
+#&gt; Sum of squared residuals at call 95: 374.5774
+#&gt; Sum of squared residuals at call 96: 373.5438
+#&gt; Sum of squared residuals at call 100: 373.5438
+#&gt; Sum of squared residuals at call 102: 373.265
+#&gt; Sum of squared residuals at call 104: 373.265
+#&gt; Sum of squared residuals at call 107: 372.6825
+#&gt; Sum of squared residuals at call 111: 372.6825
+#&gt; Sum of squared residuals at call 114: 372.6356
+#&gt; Sum of squared residuals at call 116: 372.6356
+#&gt; Sum of squared residuals at call 119: 372.6199
+#&gt; Sum of squared residuals at call 121: 372.6199
+#&gt; Sum of squared residuals at call 123: 372.6199
+#&gt; Sum of squared residuals at call 124: 372.5881
+#&gt; Sum of squared residuals at call 126: 372.5881
+#&gt; Sum of squared residuals at call 129: 372.5418
+#&gt; Sum of squared residuals at call 130: 372.4866
+#&gt; Sum of squared residuals at call 131: 372.2242
+#&gt; Sum of squared residuals at call 132: 371.5237
+#&gt; Sum of squared residuals at call 134: 371.5237
+#&gt; Sum of squared residuals at call 137: 371.292
+#&gt; Sum of squared residuals at call 139: 371.292
+#&gt; Sum of squared residuals at call 143: 371.2256
+#&gt; Sum of squared residuals at call 144: 371.2256
+#&gt; Sum of squared residuals at call 146: 371.2256
+#&gt; Sum of squared residuals at call 149: 371.2194
+#&gt; Sum of squared residuals at call 150: 371.2147
+#&gt; Sum of squared residuals at call 153: 371.2147
+#&gt; Sum of squared residuals at call 155: 371.2137
+#&gt; Sum of squared residuals at call 156: 371.2137
+#&gt; Sum of squared residuals at call 157: 371.2137
+#&gt; Sum of squared residuals at call 160: 371.2134
+#&gt; Sum of squared residuals at call 164: 371.2134
+#&gt; Sum of squared residuals at call 165: 371.2134
+#&gt; Sum of squared residuals at call 167: 371.2134
+#&gt; Negative log-likelihood at call 177: 97.22429</div><div class='output co'>#&gt; <span class='message'>Optimisation successfully terminated.</span></div><div class='output co'>#&gt; user system elapsed
+#&gt; 0.371 0.001 0.370 </div><div class='input'><span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#&gt; parent_0 k_parent k_m1 f_parent_to_m1 sigma
+#&gt; 99.598480300 0.098697739 0.005260651 0.514475968 3.125503874 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#&gt; $ff
+#&gt; parent_m1 parent_sink
+#&gt; 0.514476 0.485524
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; parent 7.022929 23.32966
+#&gt; m1 131.760721 437.69964
+#&gt; </div><div class='input'><span class='co'># }</span>
+
+<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, FOMC</span>
+<span class='co'># \dontrun{</span>
+<span class='no'>FOMC_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span>
+<span class='no'>fit.FOMC_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>FOMC_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='co'># Use starting parameters from parent only FOMC fit</span>
+<span class='no'>fit.FOMC</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>fit.FOMC_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>FOMC_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='no'>fit.FOMC</span>$<span class='no'>bparms.ode</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'>
+<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, SFORB</span>
+<span class='no'>SFORB_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFORB"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span>
+<span class='no'>fit.SFORB_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='no'>fit.SFORB_SFO.deSolve</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>,
+ <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='co'># Use starting parameters from parent only SFORB fit (not really needed in this case)</span>
+<span class='no'>fit.SFORB</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='st'>"SFORB"</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>fit.SFORB_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='no'>fit.SFORB</span>$<span class='no'>bparms.ode</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Initial parameter(s) k_parent_free_sink not used in the model</span></div><div class='input'><span class='co'># }</span>
+
+<span class='co'># \dontrun{</span>
+<span class='co'># Weighted fits, including IRLS (error_model = "obs")</span>
+<span class='no'>SFO_SFO.ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>f.noweight</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.50.3
+#&gt; R version used for fitting: 4.0.0
+#&gt; Date of fit: Wed May 27 05:54:19 2020
+#&gt; Date of summary: Wed May 27 05:54:19 2020
+#&gt;
+#&gt; Equations:
+#&gt; d_parent/dt = - k_parent * parent
+#&gt; d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1
+#&gt;
+#&gt; Model predictions using solution type analytical
+#&gt;
+#&gt; Fitted using 421 model solutions performed in 0.126 s
+#&gt;
+#&gt; Error model: Constant variance
+#&gt;
+#&gt; Error model algorithm: OLS
+#&gt;
+#&gt; Starting values for parameters to be optimised:
+#&gt; value type
+#&gt; parent_0 100.7500 state
+#&gt; k_parent 0.1000 deparm
+#&gt; k_m1 0.1001 deparm
+#&gt; f_parent_to_m1 0.5000 deparm
+#&gt;
+#&gt; Starting values for the transformed parameters actually optimised:
+#&gt; value lower upper
+#&gt; parent_0 100.750000 -Inf Inf
+#&gt; log_k_parent -2.302585 -Inf Inf
+#&gt; log_k_m1 -2.301586 -Inf Inf
+#&gt; f_parent_ilr_1 0.000000 -Inf Inf
+#&gt;
+#&gt; Fixed parameter values:
+#&gt; value type
+#&gt; m1_0 0 state
+#&gt;
+#&gt; Results:
+#&gt;
+#&gt; AIC BIC logLik
+#&gt; 204.4486 212.6365 -97.22429
+#&gt;
+#&gt; Optimised, transformed parameters with symmetric confidence intervals:
+#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 99.60000 1.57000 96.40000 102.8000
+#&gt; log_k_parent -2.31600 0.04087 -2.39900 -2.2330
+#&gt; log_k_m1 -5.24800 0.13320 -5.51800 -4.9770
+#&gt; f_parent_ilr_1 0.04096 0.06312 -0.08746 0.1694
+#&gt; sigma 3.12600 0.35850 2.39600 3.8550
+#&gt;
+#&gt; Parameter correlation:
+#&gt; parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma
+#&gt; parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -3.190e-07
+#&gt; log_k_parent 5.174e-01 1.000e+00 -3.263e-01 -5.426e-01 3.168e-07
+#&gt; log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.406e-07
+#&gt; f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 -1.587e-10
+#&gt; sigma -3.190e-07 3.168e-07 -1.406e-07 -1.587e-10 1.000e+00
+#&gt;
+#&gt; Backtransformed parameters:
+#&gt; Confidence intervals for internally transformed parameters are asymmetric.
+#&gt; t-test (unrealistically) based on the assumption of normal distribution
+#&gt; for estimators of untransformed parameters.
+#&gt; Estimate t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 99.600000 63.430 2.298e-36 96.400000 1.028e+02
+#&gt; k_parent 0.098700 24.470 4.955e-23 0.090820 1.073e-01
+#&gt; k_m1 0.005261 7.510 6.165e-09 0.004012 6.898e-03
+#&gt; f_parent_to_m1 0.514500 23.070 3.104e-22 0.469100 5.596e-01
+#&gt; sigma 3.126000 8.718 2.235e-10 2.396000 3.855e+00
+#&gt;
+#&gt; FOCUS Chi2 error levels in percent:
+#&gt; err.min n.optim df
+#&gt; All data 6.398 4 15
+#&gt; parent 6.459 2 7
+#&gt; m1 4.690 2 8
+#&gt;
+#&gt; Resulting formation fractions:
+#&gt; ff
+#&gt; parent_m1 0.5145
+#&gt; parent_sink 0.4855
+#&gt;
+#&gt; Estimated disappearance times:
+#&gt; DT50 DT90
+#&gt; parent 7.023 23.33
+#&gt; m1 131.761 437.70
+#&gt;
+#&gt; Data:
+#&gt; time variable observed predicted residual
+#&gt; 0 parent 99.46 99.59848 -1.385e-01
+#&gt; 0 parent 102.04 99.59848 2.442e+00
+#&gt; 1 parent 93.50 90.23787 3.262e+00
+#&gt; 1 parent 92.50 90.23787 2.262e+00
+#&gt; 3 parent 63.23 74.07319 -1.084e+01
+#&gt; 3 parent 68.99 74.07319 -5.083e+00
+#&gt; 7 parent 52.32 49.91206 2.408e+00
+#&gt; 7 parent 55.13 49.91206 5.218e+00
+#&gt; 14 parent 27.27 25.01257 2.257e+00
+#&gt; 14 parent 26.64 25.01257 1.627e+00
+#&gt; 21 parent 11.50 12.53462 -1.035e+00
+#&gt; 21 parent 11.64 12.53462 -8.946e-01
+#&gt; 35 parent 2.85 3.14787 -2.979e-01
+#&gt; 35 parent 2.91 3.14787 -2.379e-01
+#&gt; 50 parent 0.69 0.71624 -2.624e-02
+#&gt; 50 parent 0.63 0.71624 -8.624e-02
+#&gt; 75 parent 0.05 0.06074 -1.074e-02
+#&gt; 75 parent 0.06 0.06074 -7.381e-04
+#&gt; 1 m1 4.84 4.80296 3.704e-02
+#&gt; 1 m1 5.64 4.80296 8.370e-01
+#&gt; 3 m1 12.91 13.02400 -1.140e-01
+#&gt; 3 m1 12.96 13.02400 -6.400e-02
+#&gt; 7 m1 22.97 25.04476 -2.075e+00
+#&gt; 7 m1 24.47 25.04476 -5.748e-01
+#&gt; 14 m1 41.69 36.69002 5.000e+00
+#&gt; 14 m1 33.21 36.69002 -3.480e+00
+#&gt; 21 m1 44.37 41.65310 2.717e+00
+#&gt; 21 m1 46.44 41.65310 4.787e+00
+#&gt; 35 m1 41.22 43.31312 -2.093e+00
+#&gt; 35 m1 37.95 43.31312 -5.363e+00
+#&gt; 50 m1 41.19 41.21831 -2.831e-02
+#&gt; 50 m1 40.01 41.21831 -1.208e+00
+#&gt; 75 m1 40.09 36.44703 3.643e+00
+#&gt; 75 m1 33.85 36.44703 -2.597e+00
+#&gt; 100 m1 31.04 31.98163 -9.416e-01
+#&gt; 100 m1 33.13 31.98163 1.148e+00
+#&gt; 120 m1 25.15 28.78984 -3.640e+00
+#&gt; 120 m1 33.31 28.78984 4.520e+00</div><div class='input'><span class='no'>f.obs</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.obs</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.50.3
+#&gt; R version used for fitting: 4.0.0
+#&gt; Date of fit: Wed May 27 05:54:19 2020
+#&gt; Date of summary: Wed May 27 05:54:19 2020
+#&gt;
+#&gt; Equations:
+#&gt; d_parent/dt = - k_parent * parent
+#&gt; d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1
+#&gt;
+#&gt; Model predictions using solution type analytical
+#&gt;
+#&gt; Fitted using 978 model solutions performed in 0.33 s
+#&gt;
+#&gt; Error model: Variance unique to each observed variable
+#&gt;
+#&gt; Error model algorithm: d_3
+#&gt; Direct fitting and three-step fitting yield approximately the same likelihood
+#&gt;
+#&gt; Starting values for parameters to be optimised:
+#&gt; value type
+#&gt; parent_0 100.7500 state
+#&gt; k_parent 0.1000 deparm
+#&gt; k_m1 0.1001 deparm
+#&gt; f_parent_to_m1 0.5000 deparm
+#&gt; sigma_parent 3.0000 error
+#&gt; sigma_m1 3.0000 error
+#&gt;
+#&gt; Starting values for the transformed parameters actually optimised:
+#&gt; value lower upper
+#&gt; parent_0 100.750000 -Inf Inf
+#&gt; log_k_parent -2.302585 -Inf Inf
+#&gt; log_k_m1 -2.301586 -Inf Inf
+#&gt; f_parent_ilr_1 0.000000 -Inf Inf
+#&gt; sigma_parent 3.000000 0 Inf
+#&gt; sigma_m1 3.000000 0 Inf
+#&gt;
+#&gt; Fixed parameter values:
+#&gt; value type
+#&gt; m1_0 0 state
+#&gt;
+#&gt; Results:
+#&gt;
+#&gt; AIC BIC logLik
+#&gt; 205.8727 215.6982 -96.93634
+#&gt;
+#&gt; Optimised, transformed parameters with symmetric confidence intervals:
+#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 99.65000 1.70200 96.19000 103.1000
+#&gt; log_k_parent -2.31300 0.04376 -2.40200 -2.2240
+#&gt; log_k_m1 -5.25000 0.12430 -5.50400 -4.9970
+#&gt; f_parent_ilr_1 0.03861 0.06171 -0.08708 0.1643
+#&gt; sigma_parent 3.40100 0.56820 2.24400 4.5590
+#&gt; sigma_m1 2.85500 0.45240 1.93400 3.7770
+#&gt;
+#&gt; Parameter correlation:
+#&gt; parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma_parent
+#&gt; parent_0 1.00000 0.51078 -0.19133 -0.59997 0.035670
+#&gt; log_k_parent 0.51078 1.00000 -0.37458 -0.59239 0.069833
+#&gt; log_k_m1 -0.19133 -0.37458 1.00000 0.74398 -0.026158
+#&gt; f_parent_ilr_1 -0.59997 -0.59239 0.74398 1.00000 -0.041369
+#&gt; sigma_parent 0.03567 0.06983 -0.02616 -0.04137 1.000000
+#&gt; sigma_m1 -0.03385 -0.06627 0.02482 0.03926 -0.004628
+#&gt; sigma_m1
+#&gt; parent_0 -0.033847
+#&gt; log_k_parent -0.066265
+#&gt; log_k_m1 0.024823
+#&gt; f_parent_ilr_1 0.039256
+#&gt; sigma_parent -0.004628
+#&gt; sigma_m1 1.000000
+#&gt;
+#&gt; Backtransformed parameters:
+#&gt; Confidence intervals for internally transformed parameters are asymmetric.
+#&gt; t-test (unrealistically) based on the assumption of normal distribution
+#&gt; for estimators of untransformed parameters.
+#&gt; Estimate t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 99.650000 58.560 2.004e-34 96.190000 1.031e+02
+#&gt; k_parent 0.098970 22.850 1.099e-21 0.090530 1.082e-01
+#&gt; k_m1 0.005245 8.046 1.732e-09 0.004072 6.756e-03
+#&gt; f_parent_to_m1 0.513600 23.560 4.352e-22 0.469300 5.578e-01
+#&gt; sigma_parent 3.401000 5.985 5.662e-07 2.244000 4.559e+00
+#&gt; sigma_m1 2.855000 6.311 2.215e-07 1.934000 3.777e+00
+#&gt;
+#&gt; FOCUS Chi2 error levels in percent:
+#&gt; err.min n.optim df
+#&gt; All data 6.398 4 15
+#&gt; parent 6.464 2 7
+#&gt; m1 4.682 2 8
+#&gt;
+#&gt; Resulting formation fractions:
+#&gt; ff
+#&gt; parent_m1 0.5136
+#&gt; parent_sink 0.4864
+#&gt;
+#&gt; Estimated disappearance times:
+#&gt; DT50 DT90
+#&gt; parent 7.003 23.26
+#&gt; m1 132.154 439.01
+#&gt;
+#&gt; Data:
+#&gt; time variable observed predicted residual
+#&gt; 0 parent 99.46 99.65417 -1.942e-01
+#&gt; 0 parent 102.04 99.65417 2.386e+00
+#&gt; 1 parent 93.50 90.26332 3.237e+00
+#&gt; 1 parent 92.50 90.26332 2.237e+00
+#&gt; 3 parent 63.23 74.05306 -1.082e+01
+#&gt; 3 parent 68.99 74.05306 -5.063e+00
+#&gt; 7 parent 52.32 49.84325 2.477e+00
+#&gt; 7 parent 55.13 49.84325 5.287e+00
+#&gt; 14 parent 27.27 24.92971 2.340e+00
+#&gt; 14 parent 26.64 24.92971 1.710e+00
+#&gt; 21 parent 11.50 12.46890 -9.689e-01
+#&gt; 21 parent 11.64 12.46890 -8.289e-01
+#&gt; 35 parent 2.85 3.11925 -2.692e-01
+#&gt; 35 parent 2.91 3.11925 -2.092e-01
+#&gt; 50 parent 0.69 0.70679 -1.679e-02
+#&gt; 50 parent 0.63 0.70679 -7.679e-02
+#&gt; 75 parent 0.05 0.05952 -9.523e-03
+#&gt; 75 parent 0.06 0.05952 4.772e-04
+#&gt; 1 m1 4.84 4.81075 2.925e-02
+#&gt; 1 m1 5.64 4.81075 8.292e-01
+#&gt; 3 m1 12.91 13.04196 -1.320e-01
+#&gt; 3 m1 12.96 13.04196 -8.196e-02
+#&gt; 7 m1 22.97 25.06847 -2.098e+00
+#&gt; 7 m1 24.47 25.06847 -5.985e-01
+#&gt; 14 m1 41.69 36.70308 4.987e+00
+#&gt; 14 m1 33.21 36.70308 -3.493e+00
+#&gt; 21 m1 44.37 41.65115 2.719e+00
+#&gt; 21 m1 46.44 41.65115 4.789e+00
+#&gt; 35 m1 41.22 43.29465 -2.075e+00
+#&gt; 35 m1 37.95 43.29465 -5.345e+00
+#&gt; 50 m1 41.19 41.19948 -9.479e-03
+#&gt; 50 m1 40.01 41.19948 -1.189e+00
+#&gt; 75 m1 40.09 36.44035 3.650e+00
+#&gt; 75 m1 33.85 36.44035 -2.590e+00
+#&gt; 100 m1 31.04 31.98773 -9.477e-01
+#&gt; 100 m1 33.13 31.98773 1.142e+00
+#&gt; 120 m1 25.15 28.80429 -3.654e+00
+#&gt; 120 m1 33.31 28.80429 4.506e+00</div><div class='input'><span class='no'>f.tc</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f.tc</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.50.3
+#&gt; R version used for fitting: 4.0.0
+#&gt; Date of fit: Wed May 27 05:54:20 2020
+#&gt; Date of summary: Wed May 27 05:54:20 2020
+#&gt;
+#&gt; Equations:
+#&gt; d_parent/dt = - k_parent * parent
+#&gt; d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1
+#&gt;
+#&gt; Model predictions using solution type analytical
+#&gt;
+#&gt; Fitted using 2088 model solutions performed in 0.714 s
+#&gt;
+#&gt; Error model: Two-component variance function
+#&gt;
+#&gt; Error model algorithm: d_3
+#&gt; Direct fitting and three-step fitting yield approximately the same likelihood
+#&gt;
+#&gt; Starting values for parameters to be optimised:
+#&gt; value type
+#&gt; parent_0 100.7500 state
+#&gt; k_parent 0.1000 deparm
+#&gt; k_m1 0.1001 deparm
+#&gt; f_parent_to_m1 0.5000 deparm
+#&gt; sigma_low 0.1000 error
+#&gt; rsd_high 0.1000 error
+#&gt;
+#&gt; Starting values for the transformed parameters actually optimised:
+#&gt; value lower upper
+#&gt; parent_0 100.750000 -Inf Inf
+#&gt; log_k_parent -2.302585 -Inf Inf
+#&gt; log_k_m1 -2.301586 -Inf Inf
+#&gt; f_parent_ilr_1 0.000000 -Inf Inf
+#&gt; sigma_low 0.100000 0 Inf
+#&gt; rsd_high 0.100000 0 Inf
+#&gt;
+#&gt; Fixed parameter values:
+#&gt; value type
+#&gt; m1_0 0 state
+#&gt;
+#&gt; Results:
+#&gt;
+#&gt; AIC BIC logLik
+#&gt; 141.9656 151.7911 -64.98278
+#&gt;
+#&gt; Optimised, transformed parameters with symmetric confidence intervals:
+#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 100.70000 2.621000 95.400000 106.10000
+#&gt; log_k_parent -2.29700 0.008862 -2.315000 -2.27900
+#&gt; log_k_m1 -5.26600 0.091310 -5.452000 -5.08000
+#&gt; f_parent_ilr_1 0.02374 0.055300 -0.088900 0.13640
+#&gt; sigma_low 0.00305 0.004829 -0.006786 0.01289
+#&gt; rsd_high 0.07928 0.009418 0.060100 0.09847
+#&gt;
+#&gt; Parameter correlation:
+#&gt; parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma_low rsd_high
+#&gt; parent_0 1.00000 0.67644 -0.10215 -0.76822 0.14294 -0.08783
+#&gt; log_k_parent 0.67644 1.00000 -0.15102 -0.59491 0.34611 -0.08125
+#&gt; log_k_m1 -0.10215 -0.15102 1.00000 0.51808 -0.05236 0.01240
+#&gt; f_parent_ilr_1 -0.76822 -0.59491 0.51808 1.00000 -0.13900 0.03248
+#&gt; sigma_low 0.14294 0.34611 -0.05236 -0.13900 1.00000 -0.16546
+#&gt; rsd_high -0.08783 -0.08125 0.01240 0.03248 -0.16546 1.00000
+#&gt;
+#&gt; Backtransformed parameters:
+#&gt; Confidence intervals for internally transformed parameters are asymmetric.
+#&gt; t-test (unrealistically) based on the assumption of normal distribution
+#&gt; for estimators of untransformed parameters.
+#&gt; Estimate t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 1.007e+02 38.4300 1.180e-28 95.400000 1.061e+02
+#&gt; k_parent 1.006e-01 112.8000 1.718e-43 0.098760 1.024e-01
+#&gt; k_m1 5.167e-03 10.9500 1.171e-12 0.004290 6.223e-03
+#&gt; f_parent_to_m1 5.084e-01 26.0100 2.146e-23 0.468600 5.481e-01
+#&gt; sigma_low 3.050e-03 0.6314 2.661e-01 -0.006786 1.289e-02
+#&gt; rsd_high 7.928e-02 8.4170 6.418e-10 0.060100 9.847e-02
+#&gt;
+#&gt; FOCUS Chi2 error levels in percent:
+#&gt; err.min n.optim df
+#&gt; All data 6.475 4 15
+#&gt; parent 6.573 2 7
+#&gt; m1 4.671 2 8
+#&gt;
+#&gt; Resulting formation fractions:
+#&gt; ff
+#&gt; parent_m1 0.5084
+#&gt; parent_sink 0.4916
+#&gt;
+#&gt; Estimated disappearance times:
+#&gt; DT50 DT90
+#&gt; parent 6.893 22.9
+#&gt; m1 134.156 445.7
+#&gt;
+#&gt; Data:
+#&gt; time variable observed predicted residual
+#&gt; 0 parent 99.46 100.73434 -1.274340
+#&gt; 0 parent 102.04 100.73434 1.305660
+#&gt; 1 parent 93.50 91.09751 2.402486
+#&gt; 1 parent 92.50 91.09751 1.402486
+#&gt; 3 parent 63.23 74.50141 -11.271410
+#&gt; 3 parent 68.99 74.50141 -5.511410
+#&gt; 7 parent 52.32 49.82880 2.491200
+#&gt; 7 parent 55.13 49.82880 5.301200
+#&gt; 14 parent 27.27 24.64809 2.621908
+#&gt; 14 parent 26.64 24.64809 1.991908
+#&gt; 21 parent 11.50 12.19232 -0.692315
+#&gt; 21 parent 11.64 12.19232 -0.552315
+#&gt; 35 parent 2.85 2.98327 -0.133266
+#&gt; 35 parent 2.91 2.98327 -0.073266
+#&gt; 50 parent 0.69 0.66013 0.029874
+#&gt; 50 parent 0.63 0.66013 -0.030126
+#&gt; 75 parent 0.05 0.05344 -0.003438
+#&gt; 75 parent 0.06 0.05344 0.006562
+#&gt; 1 m1 4.84 4.88645 -0.046451
+#&gt; 1 m1 5.64 4.88645 0.753549
+#&gt; 3 m1 12.91 13.22867 -0.318669
+#&gt; 3 m1 12.96 13.22867 -0.268669
+#&gt; 7 m1 22.97 25.36417 -2.394166
+#&gt; 7 m1 24.47 25.36417 -0.894166
+#&gt; 14 m1 41.69 37.00974 4.680263
+#&gt; 14 m1 33.21 37.00974 -3.799737
+#&gt; 21 m1 44.37 41.90133 2.468669
+#&gt; 21 m1 46.44 41.90133 4.538669
+#&gt; 35 m1 41.22 43.45691 -2.236913
+#&gt; 35 m1 37.95 43.45691 -5.506913
+#&gt; 50 m1 41.19 41.34199 -0.151985
+#&gt; 50 m1 40.01 41.34199 -1.331985
+#&gt; 75 m1 40.09 36.61471 3.475295
+#&gt; 75 m1 33.85 36.61471 -2.764705
+#&gt; 100 m1 31.04 32.20082 -1.160823
+#&gt; 100 m1 33.13 32.20082 0.929177
+#&gt; 120 m1 25.15 29.04130 -3.891304
+#&gt; 120 m1 33.31 29.04130 4.268696</div><div class='input'># }
+
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinmod.html b/docs/dev/reference/mkinmod.html
new file mode 100644
index 00000000..80a72b2b
--- /dev/null
+++ b/docs/dev/reference/mkinmod.html
@@ -0,0 +1,320 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function to set up a kinetic model with one or more state variables — mkinmod • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function to set up a kinetic model with one or more state variables — mkinmod" />
+<meta property="og:description" content="The function usually takes several expressions, each assigning a compound
+name to a list, specifying the kinetic model type and reaction or transfer
+to other observed compartments. Instead of specifying several expressions, a
+list of lists can be given in the speclist argument." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Function to set up a kinetic model with one or more state variables</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinmod.R'><code>R/mkinmod.R</code></a></small>
+ <div class="hidden name"><code>mkinmod.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>The function usually takes several expressions, each assigning a compound
+name to a list, specifying the kinetic model type and reaction or transfer
+to other observed compartments. Instead of specifying several expressions, a
+list of lists can be given in the speclist argument.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>mkinmod</span>(
+ <span class='no'>...</span>,
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>,
+ <span class='kw'>speclist</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
+ <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>...</th>
+ <td><p>For each observed variable, a list has to be specified as an
+argument, containing at least a component <code>type</code>, specifying the type
+of kinetics to use for the variable. Currently, single first order
+kinetics "SFO", indeterminate order rate equation kinetics "IORE", or
+single first order with reversible binding "SFORB" are implemented for all
+variables, while "FOMC", "DFOP" and "HS" can additionally be chosen for
+the first variable which is assumed to be the source compartment.
+Additionally, each component of the list can include a character vector
+<code>to</code>, specifying names of variables to which a transfer is to be
+assumed in the model. If the argument <code>use_of_ff</code> is set to "min"
+(default) and the model for the compartment is "SFO" or "SFORB", an
+additional component of the list can be "sink=FALSE" effectively fixing
+the flux to sink to zero.</p></td>
+ </tr>
+ <tr>
+ <th>use_of_ff</th>
+ <td><p>Specification of the use of formation fractions in the
+model equations and, if applicable, the coefficient matrix. If "min", a
+minimum use of formation fractions is made in order to avoid fitting the
+product of formation fractions and rate constants. If "max", formation
+fractions are always used.</p></td>
+ </tr>
+ <tr>
+ <th>speclist</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>quiet</th>
+ <td><p>Should messages be suppressed?</p></td>
+ </tr>
+ <tr>
+ <th>verbose</th>
+ <td><p>If <code>TRUE</code>, passed to <code>cfunction</code> if
+applicable to give detailed information about the C function being built.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A list of class <code>mkinmod</code> for use with <code><a href='mkinfit.html'>mkinfit</a></code>,
+containing, among others,</p>
+<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>
+
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>For the definition of model types and their parameters, the equations given
+in the FOCUS and NAFTA guidance documents are used.</p>
+ <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2>
+
+ <p>The IORE submodel is not well tested for metabolites. When using this
+model for metabolites, you may want to read the second note in the help
+page to <code><a href='mkinfit.html'>mkinfit</a></code>.</p>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+<p>NAFTA Technical Working Group on Pesticides (not dated) Guidance for
+Evaluating and Calculating Degradation Kinetics in Environmental Media</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># Specify the SFO model (this is not needed any more, as we can now mkinfit("SFO", ...)</span>
+<span class='no'>SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))
+
+<span class='co'># One parent compound, one metabolite, both single first order</span>
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinmod</span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='co'># \dontrun{</span>
+<span class='co'># The above model used to be specified like this, before the advent of mkinsub()</span>
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinmod</span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='co'># Show details of creating the C function</span>
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinmod</span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; Compilation argument:
+#&gt; /usr/lib/R/bin/R CMD SHLIB file1bc3f55ac46.c 2&gt; file1bc3f55ac46.c.err.txt
+#&gt; Program source:
+#&gt; 1: #include &lt;R.h&gt;
+#&gt; 2:
+#&gt; 3:
+#&gt; 4: static double parms [3];
+#&gt; 5: #define k_parent parms[0]
+#&gt; 6: #define f_parent_to_m1 parms[1]
+#&gt; 7: #define k_m1 parms[2]
+#&gt; 8:
+#&gt; 9: void initpar(void (* odeparms)(int *, double *)) {
+#&gt; 10: int N = 3;
+#&gt; 11: odeparms(&amp;N, parms);
+#&gt; 12: }
+#&gt; 13:
+#&gt; 14:
+#&gt; 15: void func ( int * n, double * t, double * y, double * f, double * rpar, int * ipar ) {
+#&gt; 16:
+#&gt; 17: f[0] = - k_parent * y[0];
+#&gt; 18: f[1] = + f_parent_to_m1 * k_parent * y[0] - k_m1 * y[1];
+#&gt; 19: }</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='co'># If we have several parallel metabolites</span>
+<span class='co'># (compare tests/testthat/test_synthetic_data_for_UBA_2014.R)</span>
+<span class='no'>m_synth_DFOP_par</span> <span class='kw'>&lt;-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+
+<span class='no'>fit_DFOP_par_c</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_DFOP_par</span>,
+ <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span>,
+ <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='co'># }</span></div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinparplot-1.png b/docs/dev/reference/mkinparplot-1.png
new file mode 100644
index 00000000..31800c09
--- /dev/null
+++ b/docs/dev/reference/mkinparplot-1.png
Binary files differ
diff --git a/docs/dev/reference/mkinparplot.html b/docs/dev/reference/mkinparplot.html
new file mode 100644
index 00000000..790f5e7e
--- /dev/null
+++ b/docs/dev/reference/mkinparplot.html
@@ -0,0 +1,203 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function to plot the confidence intervals obtained using mkinfit — mkinparplot • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function to plot the confidence intervals obtained using mkinfit — mkinparplot" />
+<meta property="og:description" content="This function plots the confidence intervals for the parameters fitted using
+mkinfit." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Function to plot the confidence intervals obtained using mkinfit</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinparplot.R'><code>R/mkinparplot.R</code></a></small>
+ <div class="hidden name"><code>mkinparplot.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>This function plots the confidence intervals for the parameters fitted using
+<code><a href='mkinfit.html'>mkinfit</a></code>.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>mkinparplot</span>(<span class='no'>object</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>A fit represented in an <code><a href='mkinfit.html'>mkinfit</a></code> object.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>Nothing is returned by this function, as it is called for its side
+effect, namely to produce a plot.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># \dontrun{</span>
+<span class='no'>model</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>T245</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"phenol"</span>), <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>),
+ <span class='kw'>phenol</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"anisole"</span>)),
+ <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>mccall81_245T</span>, <span class='no'>soil</span> <span class='kw'>==</span> <span class='st'>"Commerce"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinparplot</span>(<span class='no'>fit</span>)</div><div class='img'><img src='mkinparplot-1.png' alt='' width='700' height='433' /></div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinplot.html b/docs/dev/reference/mkinplot.html
new file mode 100644
index 00000000..b36bcfc2
--- /dev/null
+++ b/docs/dev/reference/mkinplot.html
@@ -0,0 +1,198 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Plot the observed data and the fitted model of an mkinfit object — mkinplot • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Plot the observed data and the fitted model of an mkinfit object — mkinplot" />
+<meta property="og:description" content="Deprecated function. It now only calls the plot method
+plot.mkinfit." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Plot the observed data and the fitted model of an mkinfit object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/plot.mkinfit.R'><code>R/plot.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>mkinplot.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Deprecated function. It now only calls the plot method
+<code><a href='plot.mkinfit.html'>plot.mkinfit</a></code>.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>mkinplot</span>(<span class='no'>fit</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>fit</th>
+ <td><p>an object of class <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>further arguments passed to <code><a href='plot.mkinfit.html'>plot.mkinfit</a></code>.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The function is called for its side effect.</p>
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinpredict.html b/docs/dev/reference/mkinpredict.html
new file mode 100644
index 00000000..6d83e56f
--- /dev/null
+++ b/docs/dev/reference/mkinpredict.html
@@ -0,0 +1,447 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Produce predictions from a kinetic model using specific parameters — mkinpredict • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Produce predictions from a kinetic model using specific parameters — mkinpredict" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Produce predictions from a kinetic model using specific parameters</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinpredict.R'><code>R/mkinpredict.R</code></a></small>
+ <div class="hidden name"><code>mkinpredict.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>This function produces a time series for all the observed variables in a
+kinetic model as specified by <code><a href='mkinmod.html'>mkinmod</a></code>, using a specific set of
+kinetic parameters and initial values for the state variables.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>mkinpredict</span>(
+ <span class='no'>x</span>,
+ <span class='no'>odeparms</span>,
+ <span class='no'>odeini</span>,
+ <span class='kw'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>,
+ <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>,
+ <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>,
+ <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>,
+ <span class='kw'>map_output</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='no'>...</span>
+)
+
+<span class='co'># S3 method for mkinmod</span>
+<span class='fu'>mkinpredict</span>(
+ <span class='no'>x</span>,
+ <span class='kw'>odeparms</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='kw'>odeini</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>),
+ <span class='kw'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>,
+ <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>,
+ <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>,
+ <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>,
+ <span class='kw'>map_output</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='no'>...</span>
+)
+
+<span class='co'># S3 method for mkinfit</span>
+<span class='fu'>mkinpredict</span>(
+ <span class='no'>x</span>,
+ <span class='kw'>odeparms</span> <span class='kw'>=</span> <span class='no'>x</span>$<span class='no'>bparms.ode</span>,
+ <span class='kw'>odeini</span> <span class='kw'>=</span> <span class='no'>x</span>$<span class='no'>bparms.state</span>,
+ <span class='kw'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>,
+ <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>,
+ <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>,
+ <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>,
+ <span class='kw'>map_output</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='no'>...</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>A kinetic model as produced by <code><a href='mkinmod.html'>mkinmod</a></code>, or a kinetic
+fit as fitted by <code><a href='mkinfit.html'>mkinfit</a></code>. In the latter case, the fitted
+parameters are used for the prediction.</p></td>
+ </tr>
+ <tr>
+ <th>odeparms</th>
+ <td><p>A numeric vector specifying the parameters used in the
+kinetic model, which is generally defined as a set of ordinary
+differential equations.</p></td>
+ </tr>
+ <tr>
+ <th>odeini</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>outtimes</th>
+ <td><p>A numeric vector specifying the time points for which model
+predictions should be generated.</p></td>
+ </tr>
+ <tr>
+ <th>solution_type</th>
+ <td><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 faster but not applicable to
+some models e.g. using FOMC for the parent compound.</p></td>
+ </tr>
+ <tr>
+ <th>use_compiled</th>
+ <td><p>If set to <code>FALSE</code>, no compiled version of the
+<code><a href='mkinmod.html'>mkinmod</a></code> model is used, even if is present.</p></td>
+ </tr>
+ <tr>
+ <th>method.ode</th>
+ <td><p>The solution method passed via <code>mkinpredict</code>
+to <code>ode</code> in case the solution type is "deSolve". The default
+"lsoda" is performant, but sometimes fails to converge.</p></td>
+ </tr>
+ <tr>
+ <th>atol</th>
+ <td><p>Absolute error tolerance, passed to <code>ode</code>. Default
+is 1e-8, lower than in <code>lsoda</code>.</p></td>
+ </tr>
+ <tr>
+ <th>rtol</th>
+ <td><p>Absolute error tolerance, passed to <code>ode</code>. Default
+is 1e-10, much lower than in <code>lsoda</code>.</p></td>
+ </tr>
+ <tr>
+ <th>map_output</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments passed to the ode solver in case such a
+solver is used.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A matrix with the numeric solution in wide format</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='no'>SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))
+<span class='co'># Compare solution types</span>
+<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)</div><div class='output co'>#&gt; time degradinol
+#&gt; 0 0 100.0000000
+#&gt; 1 1 74.0818221
+#&gt; 2 2 54.8811636
+#&gt; 3 3 40.6569660
+#&gt; 4 4 30.1194212
+#&gt; 5 5 22.3130160
+#&gt; 6 6 16.5298888
+#&gt; 7 7 12.2456428
+#&gt; 8 8 9.0717953
+#&gt; 9 9 6.7205513
+#&gt; 10 10 4.9787068
+#&gt; 11 11 3.6883167
+#&gt; 12 12 2.7323722
+#&gt; 13 13 2.0241911
+#&gt; 14 14 1.4995577
+#&gt; 15 15 1.1108997
+#&gt; 16 16 0.8229747
+#&gt; 17 17 0.6096747
+#&gt; 18 18 0.4516581
+#&gt; 19 19 0.3345965
+#&gt; 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)</div><div class='output co'>#&gt; time degradinol
+#&gt; 0 0 100.0000000
+#&gt; 1 1 74.0818221
+#&gt; 2 2 54.8811636
+#&gt; 3 3 40.6569660
+#&gt; 4 4 30.1194212
+#&gt; 5 5 22.3130160
+#&gt; 6 6 16.5298888
+#&gt; 7 7 12.2456428
+#&gt; 8 8 9.0717953
+#&gt; 9 9 6.7205513
+#&gt; 10 10 4.9787068
+#&gt; 11 11 3.6883167
+#&gt; 12 12 2.7323722
+#&gt; 13 13 2.0241911
+#&gt; 14 14 1.4995577
+#&gt; 15 15 1.1108996
+#&gt; 16 16 0.8229747
+#&gt; 17 17 0.6096747
+#&gt; 18 18 0.4516581
+#&gt; 19 19 0.3345965
+#&gt; 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; time degradinol
+#&gt; 0 0 100.0000000
+#&gt; 1 1 74.0818221
+#&gt; 2 2 54.8811636
+#&gt; 3 3 40.6569660
+#&gt; 4 4 30.1194212
+#&gt; 5 5 22.3130160
+#&gt; 6 6 16.5298888
+#&gt; 7 7 12.2456428
+#&gt; 8 8 9.0717953
+#&gt; 9 9 6.7205513
+#&gt; 10 10 4.9787068
+#&gt; 11 11 3.6883167
+#&gt; 12 12 2.7323722
+#&gt; 13 13 2.0241911
+#&gt; 14 14 1.4995577
+#&gt; 15 15 1.1108996
+#&gt; 16 16 0.8229747
+#&gt; 17 17 0.6096747
+#&gt; 18 18 0.4516581
+#&gt; 19 19 0.3345965
+#&gt; 20 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)</div><div class='output co'>#&gt; time degradinol
+#&gt; 0 0 100.0000000
+#&gt; 1 1 74.0818221
+#&gt; 2 2 54.8811636
+#&gt; 3 3 40.6569660
+#&gt; 4 4 30.1194212
+#&gt; 5 5 22.3130160
+#&gt; 6 6 16.5298888
+#&gt; 7 7 12.2456428
+#&gt; 8 8 9.0717953
+#&gt; 9 9 6.7205513
+#&gt; 10 10 4.9787068
+#&gt; 11 11 3.6883167
+#&gt; 12 12 2.7323722
+#&gt; 13 13 2.0241911
+#&gt; 14 14 1.4995577
+#&gt; 15 15 1.1108997
+#&gt; 16 16 0.8229747
+#&gt; 17 17 0.6096747
+#&gt; 18 18 0.4516581
+#&gt; 19 19 0.3345965
+#&gt; 20 20 0.2478752</div><div class='input'>
+<span class='co'># Compare integration methods to analytical solution</span>
+<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"ode45"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"rk4"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2480043 </div><div class='input'><span class='co'># rk4 is not as precise here</span>
+
+<span class='co'># The number of output times used to make a lot of difference until the</span>
+<span class='co'># default for atol was adjusted</span>
+<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>))[<span class='fl'>201</span>,]</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.01</span>))[<span class='fl'>2001</span>,]</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'>
+<span class='co'># Comparison of the performance of solution types</span>
+<span class='no'>SFO_SFO</span> <span class='kw'>=</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='kw'>if</span>(<span class='fu'><a href='https://rdrr.io/r/base/library.html'>require</a></span>(<span class='no'>rbenchmark</span>)) {
+ <span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span>(<span class='kw'>replications</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>order</span> <span class='kw'>=</span> <span class='st'>"relative"</span>, <span class='kw'>columns</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"test"</span>, <span class='st'>"relative"</span>, <span class='st'>"elapsed"</span>),
+ <span class='kw'>eigen</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)[<span class='fl'>201</span>,],
+ <span class='kw'>deSolve_compiled</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)[<span class='fl'>201</span>,],
+ <span class='kw'>deSolve</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)[<span class='fl'>201</span>,],
+ <span class='kw'>analytical</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)[<span class='fl'>201</span>,])
+}</div><div class='output co'>#&gt; test relative elapsed
+#&gt; 2 deSolve_compiled 1.0 0.005
+#&gt; 4 analytical 1.0 0.005
+#&gt; 1 eigen 4.0 0.020
+#&gt; 3 deSolve 45.6 0.228</div><div class='input'>
+<span class='co'># \dontrun{</span>
+ <span class='co'># Predict from a fitted model</span>
+ <span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)
+ <span class='fu'><a href='https://rdrr.io/r/utils/head.html'>head</a></span>(<span class='fu'>mkinpredict</span>(<span class='no'>f</span>))</div><div class='output co'>#&gt; time parent m1
+#&gt; 0 0.0 82.49216 0.000000
+#&gt; 0.1 0.1 80.00562 1.236198
+#&gt; 0.2 0.2 77.59404 2.422818
+#&gt; 0.3 0.3 75.25514 3.561476
+#&gt; 0.4 0.4 72.98675 4.653740
+#&gt; 0.5 0.5 70.78673 5.701130</div><div class='input'># }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinresplot-1.png b/docs/dev/reference/mkinresplot-1.png
new file mode 100644
index 00000000..bb9657b4
--- /dev/null
+++ b/docs/dev/reference/mkinresplot-1.png
Binary files differ
diff --git a/docs/dev/reference/mkinresplot.html b/docs/dev/reference/mkinresplot.html
new file mode 100644
index 00000000..11e0914e
--- /dev/null
+++ b/docs/dev/reference/mkinresplot.html
@@ -0,0 +1,275 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function to plot residuals stored in an mkin object — mkinresplot • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function to plot residuals stored in an mkin object — mkinresplot" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Function to plot residuals stored in an mkin object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinresplot.R'><code>R/mkinresplot.R</code></a></small>
+ <div class="hidden name"><code>mkinresplot.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>mkinresplot</span>(
+ <span class='no'>object</span>,
+ <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>object</span>$<span class='no'>mkinmod</span>$<span class='no'>map</span>),
+ <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1.1</span> * <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span>(<span class='no'>object</span>$<span class='no'>data</span>$<span class='no'>time</span>)),
+ <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>,
+ <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='no'>standardized</span>, <span class='st'>"Standardized residual"</span>, <span class='st'>"Residual"</span>),
+ <span class='kw'>maxabs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='st'>"topright"</span>,
+ <span class='kw'>col_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>pch_obs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>frame</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='no'>...</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>A fit represented in an <code><a href='mkinfit.html'>mkinfit</a></code> object.</p></td>
+ </tr>
+ <tr>
+ <th>obs_vars</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>xlim</th>
+ <td><p>plot range in x direction.</p></td>
+ </tr>
+ <tr>
+ <th>standardized</th>
+ <td><p>Should the residuals be standardized by dividing by the
+standard deviation given by the error model of the fit?</p></td>
+ </tr>
+ <tr>
+ <th>xlab</th>
+ <td><p>Label for the x axis.</p></td>
+ </tr>
+ <tr>
+ <th>ylab</th>
+ <td><p>Label for the y axis.</p></td>
+ </tr>
+ <tr>
+ <th>maxabs</th>
+ <td><p>Maximum absolute value of the residuals. This is used for the
+scaling of the y axis and defaults to "auto".</p></td>
+ </tr>
+ <tr>
+ <th>legend</th>
+ <td><p>Should a legend be plotted?</p></td>
+ </tr>
+ <tr>
+ <th>lpos</th>
+ <td><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'>legend</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>col_obs</th>
+ <td><p>Colors for the observed variables.</p></td>
+ </tr>
+ <tr>
+ <th>pch_obs</th>
+ <td><p>Symbols to be used for the observed variables.</p></td>
+ </tr>
+ <tr>
+ <th>frame</th>
+ <td><p>Should a frame be drawn around the plots?</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>further arguments passed to <code><a href='https://rdrr.io/r/base/plot.html'>plot</a></code>.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>Nothing is returned by this function, as it is called for its side
+effect, namely to produce a plot.</p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='no'>model</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'>mkinresplot</span>(<span class='no'>fit</span>, <span class='st'>"m1"</span>)</div><div class='img'><img src='mkinresplot-1.png' alt='' width='700' height='433' /></div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mkinsub.html b/docs/dev/reference/mkinsub.html
new file mode 100644
index 00000000..dc4faf0d
--- /dev/null
+++ b/docs/dev/reference/mkinsub.html
@@ -0,0 +1,228 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Function to set up a kinetic submodel for one state variable — mkinsub • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Function to set up a kinetic submodel for one state variable — mkinsub" />
+<meta property="og:description" content="This is a convenience function to set up the lists used as arguments for
+mkinmod." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Function to set up a kinetic submodel for one state variable</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinsub.R'><code>R/mkinsub.R</code></a></small>
+ <div class="hidden name"><code>mkinsub.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>This is a convenience function to set up the lists used as arguments for
+<code><a href='mkinmod.html'>mkinmod</a></code>.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>mkinsub</span>(<span class='no'>submodel</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='fl'>NA</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>submodel</th>
+ <td><p>Character vector of length one to specify the submodel type.
+See <code><a href='mkinmod.html'>mkinmod</a></code> for the list of allowed submodel names.</p></td>
+ </tr>
+ <tr>
+ <th>to</th>
+ <td><p>Vector of the names of the state variable to which a
+transformation shall be included in the model.</p></td>
+ </tr>
+ <tr>
+ <th>sink</th>
+ <td><p>Should a pathway to sink be included in the model in addition to
+the pathways to other state variables?</p></td>
+ </tr>
+ <tr>
+ <th>full_name</th>
+ <td><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></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A list for use with <code><a href='mkinmod.html'>mkinmod</a></code>.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># One parent compound, one metabolite, both single first order.</span>
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='co'># The same model using mkinsub</span>
+<span class='no'>SFO_SFO.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='co'># \dontrun{</span>
+ <span class='co'># Now supplying full names</span>
+ <span class='no'>SFO_SFO.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='st'>"Test compound"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>mkinsub</span>(<span class='st'>"SFO"</span>, <span class='kw'>full_name</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> # }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/mmkin-1.png b/docs/dev/reference/mmkin-1.png
new file mode 100644
index 00000000..135d5446
--- /dev/null
+++ b/docs/dev/reference/mmkin-1.png
Binary files differ
diff --git a/docs/dev/reference/mmkin-2.png b/docs/dev/reference/mmkin-2.png
new file mode 100644
index 00000000..40109afc
--- /dev/null
+++ b/docs/dev/reference/mmkin-2.png
Binary files differ
diff --git a/docs/dev/reference/mmkin-3.png b/docs/dev/reference/mmkin-3.png
new file mode 100644
index 00000000..e80448ab
--- /dev/null
+++ b/docs/dev/reference/mmkin-3.png
Binary files differ
diff --git a/docs/dev/reference/mmkin-4.png b/docs/dev/reference/mmkin-4.png
new file mode 100644
index 00000000..02976ced
--- /dev/null
+++ b/docs/dev/reference/mmkin-4.png
Binary files differ
diff --git a/docs/dev/reference/mmkin-5.png b/docs/dev/reference/mmkin-5.png
new file mode 100644
index 00000000..4c771bc9
--- /dev/null
+++ b/docs/dev/reference/mmkin-5.png
Binary files differ
diff --git a/docs/dev/reference/mmkin.html b/docs/dev/reference/mmkin.html
new file mode 100644
index 00000000..1b5c1592
--- /dev/null
+++ b/docs/dev/reference/mmkin.html
@@ -0,0 +1,271 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Fit one or more kinetic models with one or more state variables to one or
+more datasets — mmkin • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Fit one or more kinetic models with one or more state variables to one or
+more datasets — mmkin" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Fit one or more kinetic models with one or more state variables to one or
+more datasets</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mmkin.R'><code>R/mmkin.R</code></a></small>
+ <div class="hidden name"><code>mmkin.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>mmkin</span>(
+ <span class='kw'>models</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>),
+ <span class='no'>datasets</span>,
+ <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'>detectCores</span>(),
+ <span class='kw'>cluster</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
+ <span class='no'>...</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>models</th>
+ <td><p>Either a character vector of shorthand names like
+<code><a href='https://rdrr.io/r/base/c.html'>c("SFO", "FOMC", "DFOP", "HS", "SFORB")</a></code>, or an optionally named
+list of <code><a href='mkinmod.html'>mkinmod</a></code> objects.</p></td>
+ </tr>
+ <tr>
+ <th>datasets</th>
+ <td><p>An optionally named list of datasets suitable as observed
+data for <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>cores</th>
+ <td><p>The number of cores to be used for multicore processing. This
+is only used when the <code>cluster</code> argument is <code>NULL</code>. On Windows
+machines, cores &gt; 1 is not supported, you need to use the <code>cluster</code>
+argument to use multiple logical processors. Per default, all cores
+detected by <code><a href='https://rdrr.io/r/parallel/detectCores.html'>parallel::detectCores()</a></code> are used.</p></td>
+ </tr>
+ <tr>
+ <th>cluster</th>
+ <td><p>A cluster as returned by <code>makeCluster</code> to be used
+for parallel execution.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments that will be passed to <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A two-dimensional <code><a href='https://rdrr.io/r/base/array.html'>array</a></code> of <code><a href='mkinfit.html'>mkinfit</a></code>
+objects that can be indexed using the model names for the first index (row index)
+and the dataset names for the second index (column index).</p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
+
+ <div class='dont-index'><p><code><a href='Extract.mmkin.html'>[.mmkin</a></code> for subsetting, <code><a href='plot.mmkin.html'>plot.mmkin</a></code> for
+plotting.</p></div>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># \dontrun{</span>
+<span class='no'>m_synth_SFO_lin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M1"</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M2"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>m_synth_FOMC_lin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"M1"</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M2"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>models</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>SFO_lin</span> <span class='kw'>=</span> <span class='no'>m_synth_SFO_lin</span>, <span class='kw'>FOMC_lin</span> <span class='kw'>=</span> <span class='no'>m_synth_FOMC_lin</span>)
+<span class='no'>datasets</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>synthetic_data_for_UBA_2014</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='kw'>function</span>(<span class='no'>x</span>) <span class='no'>x</span>$<span class='no'>data</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>datasets</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>1</span>:<span class='fl'>3</span>)
+
+<span class='no'>time_default</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fits.0</span> <span class='kw'>&lt;-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))
+<span class='no'>time_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fits.4</span> <span class='kw'>&lt;-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#&gt; <span class='warning'>Warning: Optimisation did not converge:</span>
+#&gt; <span class='warning'>false convergence (8)</span></div><div class='input'>
+<span class='no'>time_default</span></div><div class='output co'>#&gt; user system elapsed
+#&gt; 4.516 0.456 1.976 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#&gt; user system elapsed
+#&gt; 5.957 0.001 5.961 </div><div class='input'>
+<span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span>]])</div><div class='output co'>#&gt; $ff
+#&gt; parent_M1 parent_sink M1_M2 M1_sink
+#&gt; 0.7340479 0.2659521 0.7505687 0.2494313
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; parent 0.8777688 2.915885
+#&gt; M1 2.3257457 7.725960
+#&gt; M2 33.7200848 112.015697
+#&gt; </div><div class='input'>
+<span class='co'># plot.mkinfit handles rows or columns of mmkin result objects</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, ])</div><div class='img'><img src='mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, ], <span class='kw'>obs_var</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>))</div><div class='img'><img src='mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[, <span class='fl'>1</span>])</div><div class='img'><img src='mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='co'># Use double brackets to extract a single mkinfit object, which will be plotted</span>
+<span class='co'># by plot.mkinfit and can be plotted using plot_sep</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='fl'>1</span>, <span class='fl'>1</span>]], <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='fl'>1</span>, <span class='fl'>1</span>]])
+<span class='co'># Plotting with mmkin (single brackets, extracting an mmkin object) does not</span>
+<span class='co'># allow to plot the observed variables separately</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, <span class='fl'>1</span>])</div><div class='img'><img src='mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'># }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/nafta-1.png b/docs/dev/reference/nafta-1.png
new file mode 100644
index 00000000..9025f2bb
--- /dev/null
+++ b/docs/dev/reference/nafta-1.png
Binary files differ
diff --git a/docs/dev/reference/nafta.html b/docs/dev/reference/nafta.html
new file mode 100644
index 00000000..fe802c1b
--- /dev/null
+++ b/docs/dev/reference/nafta.html
@@ -0,0 +1,283 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Evaluate parent kinetics using the NAFTA guidance — nafta • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Evaluate parent kinetics using the NAFTA guidance — nafta" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Evaluate parent kinetics using the NAFTA guidance</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nafta.R'><code>R/nafta.R</code></a></small>
+ <div class="hidden name"><code>nafta.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>nafta</span>(<span class='no'>ds</span>, <span class='kw'>title</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for nafta</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fl'>3</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>ds</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>title</th>
+ <td><p>Optional title of the dataset</p></td>
+ </tr>
+ <tr>
+ <th>quiet</th>
+ <td><p>Should the evaluation text be shown?</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments passed to <code><a href='mmkin.html'>mmkin</a></code> (not for the
+printing method).</p></td>
+ </tr>
+ <tr>
+ <th>x</th>
+ <td><p>An <code>nafta</code> object.</p></td>
+ </tr>
+ <tr>
+ <th>digits</th>
+ <td><p>Number of digits to be used for printing parameters and
+dissipation times.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</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'>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'>https://www.epa.gov/pesticide-science-and-assessing-pesticide-risks/standard-operating-procedure-using-nafta-guidance</a></p>
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='no'>nafta_evaluation</span> <span class='kw'>&lt;-</span> <span class='fu'>nafta</span>(<span class='no'>NAFTA_SOP_Appendix_D</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)</div><div class='output co'>#&gt; <span class='message'>The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</span></div><div class='output co'>#&gt; <span class='message'>The representative half-life of the IORE model is longer than the one corresponding</span></div><div class='output co'>#&gt; <span class='message'>to the terminal degradation rate found with the DFOP model.</span></div><div class='output co'>#&gt; <span class='message'>The representative half-life obtained from the DFOP model may be used</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>nafta_evaluation</span>)</div><div class='output co'>#&gt; Sums of squares:
+#&gt; SFO IORE DFOP
+#&gt; 1378.6832 615.7730 517.8836
+#&gt;
+#&gt; Critical sum of squares for checking the SFO model:
+#&gt; [1] 717.4598
+#&gt;
+#&gt; Parameters:
+#&gt; $SFO
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 83.7558 1.80e-14 77.18268 90.3288
+#&gt; k_parent_sink 0.0017 7.43e-05 0.00112 0.0026
+#&gt; sigma 8.7518 1.22e-05 5.64278 11.8608
+#&gt;
+#&gt; $IORE
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 9.69e+01 NA 8.88e+01 1.05e+02
+#&gt; k__iore_parent_sink 8.40e-14 NA 1.79e-18 3.94e-09
+#&gt; N_parent 6.68e+00 NA 4.19e+00 9.17e+00
+#&gt; sigma 5.85e+00 NA 3.76e+00 7.94e+00
+#&gt;
+#&gt; $DFOP
+#&gt; Estimate Pr(&gt;t) Lower Upper
+#&gt; parent_0 9.76e+01 1.94e-13 9.02e+01 1.05e+02
+#&gt; k1 4.24e-02 5.92e-03 2.03e-02 8.88e-02
+#&gt; k2 8.24e-04 6.48e-03 3.89e-04 1.75e-03
+#&gt; g 2.88e-01 2.47e-05 1.95e-01 4.03e-01
+#&gt; sigma 5.36e+00 2.22e-05 3.43e+00 7.30e+00
+#&gt;
+#&gt;
+#&gt; DTx values:
+#&gt; DT50 DT90 DT50_rep
+#&gt; SFO 407 1350 407
+#&gt; IORE 541 5190000 1560000
+#&gt; DFOP 429 2380 841
+#&gt;
+#&gt; Representative half-life:
+#&gt; [1] 841.41</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>nafta_evaluation</span>)</div><div class='img'><img src='nafta-1.png' alt='' width='700' height='433' /></div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/nlme-1.png b/docs/dev/reference/nlme-1.png
new file mode 100644
index 00000000..bc04dea8
--- /dev/null
+++ b/docs/dev/reference/nlme-1.png
Binary files differ
diff --git a/docs/dev/reference/nlme.html b/docs/dev/reference/nlme.html
new file mode 100644
index 00000000..8c64fb47
--- /dev/null
+++ b/docs/dev/reference/nlme.html
@@ -0,0 +1,281 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Helper functions to create nlme models from mmkin row objects — nlme_function • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Helper functions to create nlme models from mmkin row objects — nlme_function" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Helper functions to create nlme models from mmkin row objects</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nlme.R'><code>R/nlme.R</code></a></small>
+ <div class="hidden name"><code>nlme.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='fu'>nlme_function</span>(<span class='no'>object</span>)
+
+<span class='fu'>mean_degparms</span>(<span class='no'>object</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
+
+<span class='fu'>nlme_data</span>(<span class='no'>object</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An mmkin row object containing several fits of the same model to different datasets</p></td>
+ </tr>
+ <tr>
+ <th>random</th>
+ <td><p>Should a list with fixed and random effects be returned?</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A function that can be used with nlme</p>
+<p>If random is FALSE (default), a named vector containing mean values
+of the fitted degradation model parameters. If random is TRUE, a list with
+fixed and random effects, in the format required by the start argument of
+nlme for the case of a single grouping variable ds.</p>
+<p>A <code><a href='https://rdrr.io/pkg/nlme/man/groupedData.html'>groupedData</a></code> object</p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
+
+ <div class='dont-index'><p><code><a href='nlme.mmkin.html'>nlme.mmkin</a></code></p></div>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span>)
+<span class='no'>m_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))
+<span class='no'>d_SFO_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_SFO</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>98</span>), <span class='no'>sampling_times</span>)
+<span class='no'>d_SFO_1_long</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span>(<span class='no'>d_SFO_1</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>)
+<span class='no'>d_SFO_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_SFO</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.05</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>102</span>), <span class='no'>sampling_times</span>)
+<span class='no'>d_SFO_2_long</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span>(<span class='no'>d_SFO_2</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>)
+<span class='no'>d_SFO_3</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_SFO</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.02</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>103</span>), <span class='no'>sampling_times</span>)
+<span class='no'>d_SFO_3_long</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span>(<span class='no'>d_SFO_3</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>)
+
+<span class='no'>d1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_SFO_1</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>3</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>)
+<span class='no'>d2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_SFO_2</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>2</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>)
+<span class='no'>d3</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_SFO_3</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>4</span>, <span class='kw'>n</span> <span class='kw'>=</span> <span class='fl'>1</span>)
+<span class='no'>ds</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>d1</span> <span class='kw'>=</span> <span class='no'>d1</span>, <span class='kw'>d2</span> <span class='kw'>=</span> <span class='no'>d2</span>, <span class='kw'>d3</span> <span class='kw'>=</span> <span class='no'>d3</span>)
+
+<span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='st'>"SFO"</span>, <span class='no'>ds</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='no'>mean_dp</span> <span class='kw'>&lt;-</span> <span class='fu'>mean_degparms</span>(<span class='no'>f</span>)
+<span class='no'>grouped_data</span> <span class='kw'>&lt;-</span> <span class='fu'>nlme_data</span>(<span class='no'>f</span>)
+<span class='no'>nlme_f</span> <span class='kw'>&lt;-</span> <span class='fu'>nlme_function</span>(<span class='no'>f</span>)
+<span class='co'># These assignments are necessary for these objects to be</span>
+<span class='co'># visible to nlme and augPred when evaluation is done by</span>
+<span class='co'># pkgdown to generated the html docs.</span>
+<span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='st'>"nlme_f"</span>, <span class='no'>nlme_f</span>, <span class='fu'><a href='https://rdrr.io/r/base/environment.html'>globalenv</a></span>())
+<span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='st'>"grouped_data"</span>, <span class='no'>grouped_data</span>, <span class='fu'><a href='https://rdrr.io/r/base/environment.html'>globalenv</a></span>())
+
+<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>nlme</span>)
+<span class='no'>m_nlme</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>value</span> ~ <span class='fu'>nlme_f</span>(<span class='no'>name</span>, <span class='no'>time</span>, <span class='no'>parent_0</span>, <span class='no'>log_k_parent_sink</span>),
+ <span class='kw'>data</span> <span class='kw'>=</span> <span class='no'>grouped_data</span>,
+ <span class='kw'>fixed</span> <span class='kw'>=</span> <span class='no'>parent_0</span> + <span class='no'>log_k_parent_sink</span> ~ <span class='fl'>1</span>,
+ <span class='kw'>random</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/pdDiag.html'>pdDiag</a></span>(<span class='no'>parent_0</span> + <span class='no'>log_k_parent_sink</span> ~ <span class='fl'>1</span>),
+ <span class='kw'>start</span> <span class='kw'>=</span> <span class='no'>mean_dp</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>m_nlme</span>)</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by maximum likelihood
+#&gt; Model: value ~ nlme_f(name, time, parent_0, log_k_parent_sink)
+#&gt; Data: grouped_data
+#&gt; AIC BIC logLik
+#&gt; 252.7798 262.1358 -121.3899
+#&gt;
+#&gt; Random effects:
+#&gt; Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1)
+#&gt; Level: ds
+#&gt; Structure: Diagonal
+#&gt; parent_0 log_k_parent_sink Residual
+#&gt; StdDev: 0.004139378 0.6800778 2.489396
+#&gt;
+#&gt; Fixed effects: parent_0 + log_k_parent_sink ~ 1
+#&gt; Value Std.Error DF t-value p-value
+#&gt; parent_0 101.74884 0.6456057 44 157.60213 0
+#&gt; log_k_parent_sink -3.05575 0.4015812 44 -7.60929 0
+#&gt; Correlation:
+#&gt; prnt_0
+#&gt; log_k_parent_sink 0.026
+#&gt;
+#&gt; Standardized Within-Group Residuals:
+#&gt; Min Q1 Med Q3 Max
+#&gt; -2.13168782 -0.68780415 0.08282907 0.85913228 2.95298904
+#&gt;
+#&gt; Number of Observations: 48
+#&gt; Number of Groups: 3 </div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='fu'><a href='https://rdrr.io/pkg/nlme/man/augPred.html'>augPred</a></span>(<span class='no'>m_nlme</span>, <span class='kw'>level</span> <span class='kw'>=</span> <span class='fl'>0</span>:<span class='fl'>1</span>), <span class='kw'>layout</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>3</span>, <span class='fl'>1</span>))</div><div class='img'><img src='nlme-1.png' alt='' width='700' height='433' /></div><div class='input'># augPred does not seem to work on fits with more than one state
+# variable
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/nlme.mmkin-1.png b/docs/dev/reference/nlme.mmkin-1.png
new file mode 100644
index 00000000..67f279da
--- /dev/null
+++ b/docs/dev/reference/nlme.mmkin-1.png
Binary files differ
diff --git a/docs/dev/reference/nlme.mmkin-2.png b/docs/dev/reference/nlme.mmkin-2.png
new file mode 100644
index 00000000..16a5d7bd
--- /dev/null
+++ b/docs/dev/reference/nlme.mmkin-2.png
Binary files differ
diff --git a/docs/dev/reference/nlme.mmkin-3.png b/docs/dev/reference/nlme.mmkin-3.png
new file mode 100644
index 00000000..73426834
--- /dev/null
+++ b/docs/dev/reference/nlme.mmkin-3.png
Binary files differ
diff --git a/docs/dev/reference/nlme.mmkin-4.png b/docs/dev/reference/nlme.mmkin-4.png
new file mode 100644
index 00000000..9b46b425
--- /dev/null
+++ b/docs/dev/reference/nlme.mmkin-4.png
Binary files differ
diff --git a/docs/dev/reference/nlme.mmkin-5.png b/docs/dev/reference/nlme.mmkin-5.png
new file mode 100644
index 00000000..3398dd4a
--- /dev/null
+++ b/docs/dev/reference/nlme.mmkin-5.png
Binary files differ
diff --git a/docs/dev/reference/nlme.mmkin-6.png b/docs/dev/reference/nlme.mmkin-6.png
new file mode 100644
index 00000000..7b663991
--- /dev/null
+++ b/docs/dev/reference/nlme.mmkin-6.png
Binary files differ
diff --git a/docs/dev/reference/nlme.mmkin-7.png b/docs/dev/reference/nlme.mmkin-7.png
new file mode 100644
index 00000000..d2c38a63
--- /dev/null
+++ b/docs/dev/reference/nlme.mmkin-7.png
Binary files differ
diff --git a/docs/dev/reference/nlme.mmkin.html b/docs/dev/reference/nlme.mmkin.html
new file mode 100644
index 00000000..a6716c0f
--- /dev/null
+++ b/docs/dev/reference/nlme.mmkin.html
@@ -0,0 +1,463 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Create an nlme model for an mmkin row object — nlme.mmkin • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Create an nlme model for an mmkin row object — nlme.mmkin" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Create an nlme model for an mmkin row object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nlme.mmkin.R'><code>R/nlme.mmkin.R</code></a></small>
+ <div class="hidden name"><code>nlme.mmkin.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='co'># S3 method for mmkin</span>
+<span class='fu'>nlme</span>(
+ <span class='no'>model</span>,
+ <span class='kw'>data</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.frame</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.parent</a></span>()),
+ <span class='no'>fixed</span>,
+ <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>fixed</span>,
+ <span class='no'>groups</span>,
+ <span class='no'>start</span>,
+ <span class='kw'>correlation</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
+ <span class='kw'>weights</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
+ <span class='no'>subset</span>,
+ <span class='kw'>method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"ML"</span>, <span class='st'>"REML"</span>),
+ <span class='kw'>na.action</span> <span class='kw'>=</span> <span class='no'>na.fail</span>,
+ <span class='no'>naPattern</span>,
+ <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(),
+ <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>
+)
+
+<span class='co'># S3 method for nlme.mmkin</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for nlme.mmkin</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>model</th>
+ <td><p>An <code><a href='mmkin.html'>mmkin</a></code> row object.</p></td>
+ </tr>
+ <tr>
+ <th>data</th>
+ <td><p>Ignored, data are taken from the mmkin model</p></td>
+ </tr>
+ <tr>
+ <th>fixed</th>
+ <td><p>Ignored, all degradation parameters fitted in the
+mmkin model are used as fixed parameters</p></td>
+ </tr>
+ <tr>
+ <th>random</th>
+ <td><p>If not specified, all fixed effects are complemented
+with uncorrelated random effects</p></td>
+ </tr>
+ <tr>
+ <th>groups</th>
+ <td><p>See the documentation of nlme</p></td>
+ </tr>
+ <tr>
+ <th>start</th>
+ <td><p>If not specified, mean values of the fitted degradation
+parameters taken from the mmkin object are used</p></td>
+ </tr>
+ <tr>
+ <th>correlation</th>
+ <td><p>See the documentation of nlme</p></td>
+ </tr>
+ <tr>
+ <th>weights</th>
+ <td><p>passed to nlme</p></td>
+ </tr>
+ <tr>
+ <th>subset</th>
+ <td><p>passed to nlme</p></td>
+ </tr>
+ <tr>
+ <th>method</th>
+ <td><p>passed to nlme</p></td>
+ </tr>
+ <tr>
+ <th>na.action</th>
+ <td><p>passed to nlme</p></td>
+ </tr>
+ <tr>
+ <th>naPattern</th>
+ <td><p>passed to nlme</p></td>
+ </tr>
+ <tr>
+ <th>control</th>
+ <td><p>passed to nlme</p></td>
+ </tr>
+ <tr>
+ <th>verbose</th>
+ <td><p>passed to nlme</p></td>
+ </tr>
+ <tr>
+ <th>x</th>
+ <td><p>An nlme.mmkin object to print</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Update specifications passed to update.nlme</p></td>
+ </tr>
+ <tr>
+ <th>object</th>
+ <td><p>An nlme.mmkin object to update</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>Upon success, a fitted nlme.mmkin object, which is an nlme object
+with additional elements</p>
+ <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
+
+ <div class='dont-index'><p><code><a href='nlme.html'>nlme_function</a></code></p></div>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='no'>ds</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
+ <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)], <span class='no'>name</span> <span class='kw'>==</span> <span class='st'>"parent"</span>))
+<span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='st'>"SFO"</span>, <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>nlme</span>)
+<span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f</span><span class='kw'>[[</span><span class='fl'>1</span>]])</div><div class='output co'>#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; parent 11.96183 39.73634
+#&gt; </div><div class='input'><span class='no'>f_nlme</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by maximum likelihood
+#&gt; Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent_sink)
+#&gt; Data: "Not shown"
+#&gt; Log-likelihood: -307.5269
+#&gt; Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1)
+#&gt; parent_0 log_k_parent_sink
+#&gt; 85.540979 -3.229602
+#&gt;
+#&gt; Random effects:
+#&gt; Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1)
+#&gt; Level: ds
+#&gt; Structure: Diagonal
+#&gt; parent_0 log_k_parent_sink Residual
+#&gt; StdDev: 1.308245 1.288586 6.304923
+#&gt;
+#&gt; Number of Observations: 90
+#&gt; Number of Groups: 5 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; parent 17.51556 58.18543
+#&gt; </div><div class='input'><span class='co'># \dontrun{</span>
+ <span class='no'>f_nlme_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>, <span class='kw'>start</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent_0</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>log_k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>))
+ <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>f_nlme_2</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>parent_0</span> ~ <span class='fl'>1</span>)</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by maximum likelihood
+#&gt; Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent_sink)
+#&gt; Data: "Not shown"
+#&gt; Log-likelihood: -404.3729
+#&gt; Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1)
+#&gt; parent_0 log_k_parent_sink
+#&gt; 75.933480 -3.555983
+#&gt;
+#&gt; Random effects:
+#&gt; Formula: parent_0 ~ 1 | ds
+#&gt; parent_0 Residual
+#&gt; StdDev: 0.002416802 21.63027
+#&gt;
+#&gt; Number of Observations: 90
+#&gt; Number of Groups: 5 </div><div class='input'> <span class='co'># Test on some real data</span>
+ <span class='no'>ds_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
+ <span class='kw'>function</span>(<span class='no'>x</span>) <span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)])
+ <span class='no'>m_sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"min"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='no'>m_sfo_sfo_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='no'>m_fomc_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='no'>m_dfop_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+
+ <span class='no'>f_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>m_sfo_sfo</span>,
+ <span class='st'>"SFO-SFO-ff"</span> <span class='kw'>=</span> <span class='no'>m_sfo_sfo_ff</span>,
+ <span class='st'>"FOMC-SFO"</span> <span class='kw'>=</span> <span class='no'>m_fomc_sfo</span>,
+ <span class='st'>"DFOP-SFO"</span> <span class='kw'>=</span> <span class='no'>m_dfop_sfo</span>),
+ <span class='no'>ds_2</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>]) <span class='co'># Separate fits for datasets 3 and 4</span></div><div class='img'><img src='nlme.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='no'>f_nlme_sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO"</span>, ])
+ <span class='co'># plot(f_nlme_sfo_sfo) # not feasible with pkgdown figures</span>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_sfo_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>) <span class='co'># Global mixed model: Fits for datasets 3 and 4</span></div><div class='img'><img src='nlme.mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='co'># With formation fractions</span>
+ <span class='no'>f_nlme_sfo_sfo_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO-ff"</span>, ])
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_sfo_sfo_ff</span>, <span class='fl'>3</span>:<span class='fl'>4</span>) <span class='co'># chi2 different due to different df attribution</span></div><div class='img'><img src='nlme.mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='co'># For more parameters, we need to increase pnlsMaxIter and the tolerance</span>
+ <span class='co'># to get convergence</span>
+ <span class='no'>f_nlme_fomc_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, ],
+ <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>pnlsMaxIter</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>tolerance</span> <span class='kw'>=</span> <span class='fl'>1e-4</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt;
+#&gt; **Iteration 1
+#&gt; LME step: Loglik: -394.1603, nlminb iterations: 2
+#&gt; reStruct parameters:
+#&gt; ds1 ds2 ds3 ds4 ds5
+#&gt; -0.2079863 0.8563823 1.7454253 1.0917707 1.2756955
+#&gt; Beginning PNLS step: .. completed fit_nlme() step.
+#&gt; PNLS step: RSS = 643.8814
+#&gt; fixed effects: 94.17379 -5.473189 -0.6970234 -0.202509 2.103883
+#&gt; iterations: 100
+#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
+#&gt; fixed reStruct
+#&gt; 0.7959873 0.1447512
+#&gt;
+#&gt; **Iteration 2
+#&gt; LME step: Loglik: -396.3824, nlminb iterations: 7
+#&gt; reStruct parameters:
+#&gt; ds1 ds2 ds3 ds4 ds5
+#&gt; -1.712406e-01 -2.278541e-05 1.842120e+00 1.073975e+00 1.322924e+00
+#&gt; Beginning PNLS step: .. completed fit_nlme() step.
+#&gt; PNLS step: RSS = 643.8025
+#&gt; fixed effects: 94.17385 -5.473491 -0.6970406 -0.2025139 2.103871
+#&gt; iterations: 100
+#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
+#&gt; fixed reStruct
+#&gt; 5.51758e-05 1.26861e-03
+#&gt;
+#&gt; **Iteration 3
+#&gt; LME step: Loglik: -396.3825, nlminb iterations: 7
+#&gt; reStruct parameters:
+#&gt; ds1 ds2 ds3 ds4 ds5
+#&gt; -0.1712500923 -0.0001515734 1.8420972550 1.0739796967 1.3229177241
+#&gt; Beginning PNLS step: .. completed fit_nlme() step.
+#&gt; PNLS step: RSS = 643.7941
+#&gt; fixed effects: 94.17386 -5.473523 -0.6970424 -0.2025146 2.103869
+#&gt; iterations: 100
+#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
+#&gt; fixed reStruct
+#&gt; 5.792621e-06 1.335434e-04
+#&gt;
+#&gt; **Iteration 4
+#&gt; LME step: Loglik: -396.3825, nlminb iterations: 7
+#&gt; reStruct parameters:
+#&gt; ds1 ds2 ds3 ds4 ds5
+#&gt; -0.1712517206 -0.0001651603 1.8420950864 1.0739800294 1.3229173529
+#&gt; Beginning PNLS step: .. completed fit_nlme() step.
+#&gt; PNLS step: RSS = 643.7949
+#&gt; fixed effects: 94.17386 -5.473521 -0.6970423 -0.2025145 2.10387
+#&gt; iterations: 100
+#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
+#&gt; fixed reStruct
+#&gt; 4.025781e-07 9.628656e-06 </div><div class='input'> <span class='no'>f_nlme_dfop_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, ],
+ <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>pnlsMaxIter</span> <span class='kw'>=</span> <span class='fl'>120</span>, <span class='kw'>tolerance</span> <span class='kw'>=</span> <span class='fl'>5e-4</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt;
+#&gt; **Iteration 1
+#&gt; LME step: Loglik: -404.9583, nlminb iterations: 1
+#&gt; reStruct parameters:
+#&gt; ds1 ds2 ds3 ds4 ds5 ds6
+#&gt; -0.4114357 0.9798641 1.6990035 0.7293314 0.3354323 1.7113047
+#&gt; Beginning PNLS step: .. completed fit_nlme() step.
+#&gt; PNLS step: RSS = 630.3642
+#&gt; fixed effects: 93.82269 -5.455991 -0.6788957 -1.862196 -4.199671 0.0553284
+#&gt; iterations: 120
+#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0005):
+#&gt; fixed reStruct
+#&gt; 0.7879730 0.5822574
+#&gt;
+#&gt; **Iteration 2
+#&gt; LME step: Loglik: -407.7755, nlminb iterations: 11
+#&gt; reStruct parameters:
+#&gt; ds1 ds2 ds3 ds4 ds5 ds6
+#&gt; -0.371224105 0.003056163 1.789939431 0.724671132 0.301602942 1.754200482
+#&gt; Beginning PNLS step: .. completed fit_nlme() step.
+#&gt; PNLS step: RSS = 630.364
+#&gt; fixed effects: 93.82269 -5.455991 -0.6788958 -1.862196 -4.199671 0.05532834
+#&gt; iterations: 120
+#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0005):
+#&gt; fixed reStruct
+#&gt; 9.814652e-07 1.059239e-05 </div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_fomc_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-6.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-7.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_fomc_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>)</div><div class='output co'>#&gt; Model df AIC BIC logLik Test L.Ratio p-value
+#&gt; f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9274
+#&gt; f_nlme_fomc_sfo 2 11 818.5151 853.0089 -398.2576 1 vs 2 21.33957 &lt;.0001
+#&gt; f_nlme_sfo_sfo 3 9 1085.1821 1113.4043 -533.5910 2 vs 3 270.66697 &lt;.0001</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>) <span class='co'># if we ignore FOMC</span></div><div class='output co'>#&gt; Model df AIC BIC logLik Test L.Ratio p-value
+#&gt; f_nlme_dfop_sfo 1 13 843.8547 884.6201 -408.9274
+#&gt; f_nlme_sfo_sfo 2 9 1085.1821 1113.4043 -533.5910 1 vs 2 249.3274 &lt;.0001</div><div class='input'>
+ <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme_sfo_sfo</span>)</div><div class='output co'>#&gt; $ff
+#&gt; parent_sink parent_A1 A1_sink
+#&gt; 0.5912432 0.4087568 1.0000000
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; parent 19.13518 63.5657
+#&gt; A1 66.02155 219.3189
+#&gt; </div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme_dfop_sfo</span>)</div><div class='output co'>#&gt; $ff
+#&gt; parent_A1 parent_sink
+#&gt; 0.2768574 0.7231426
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90 DT50_k1 DT50_k2
+#&gt; parent 11.07091 104.6320 4.462384 46.20825
+#&gt; A1 162.30518 539.1661 NA NA
+#&gt; </div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/nobs.mkinfit.html b/docs/dev/reference/nobs.mkinfit.html
new file mode 100644
index 00000000..06575d54
--- /dev/null
+++ b/docs/dev/reference/nobs.mkinfit.html
@@ -0,0 +1,197 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Number of observations on which an mkinfit object was fitted — nobs.mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Number of observations on which an mkinfit object was fitted — nobs.mkinfit" />
+<meta property="og:description" content="Number of observations on which an mkinfit object was fitted" />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Number of observations on which an mkinfit object was fitted</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nobs.mkinfit.R'><code>R/nobs.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>nobs.mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Number of observations on which an mkinfit object was fitted</p>
+ </div>
+
+ <pre class="usage"><span class='co'># S3 method for mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/nobs.html'>nobs</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An mkinfit object</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>For compatibility with the generic method</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The number of rows in the data included in the mkinfit object</p>
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/parms.html b/docs/dev/reference/parms.html
new file mode 100644
index 00000000..6a46dad0
--- /dev/null
+++ b/docs/dev/reference/parms.html
@@ -0,0 +1,292 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Extract model parameters from mkinfit models — parms • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Extract model parameters from mkinfit models — parms" />
+<meta property="og:description" content="This function always returns degradation model parameters as well as error
+model parameters, 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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Extract model parameters from mkinfit models</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/parms.mkinfit.R'><code>R/parms.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>parms.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>This function always returns degradation model parameters as well as error
+model parameters, in order to avoid working with a fitted model without
+considering the error structure that was assumed for the fit.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>parms</span>(<span class='no'>object</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for mkinfit</span>
+<span class='fu'>parms</span>(<span class='no'>object</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for mmkin</span>
+<span class='fu'>parms</span>(<span class='no'>object</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>A fitted model object. Methods are implemented for
+<code><a href='mkinfit.html'>mkinfit()</a></code> objects and for <code><a href='mmkin.html'>mmkin()</a></code> objects.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Not used</p></td>
+ </tr>
+ <tr>
+ <th>transformed</th>
+ <td><p>Should the parameters be returned
+as used internally during the optimisation?</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>For mkinfit objects, a numeric vector of fitted model parameters.
+For mmkin row objects, a matrix with the parameters with a
+row for each dataset. If the mmkin object has more than one row, a list of
+such matrices is returned.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># mkinfit objects</span>
+<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'>parms</span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; parent_0 k_parent_sink sigma
+#&gt; 82.4921598 0.3060633 4.6730124 </div><div class='input'><span class='fu'>parms</span>(<span class='no'>fit</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; parent_0 log_k_parent_sink sigma
+#&gt; 82.492160 -1.183963 4.673012 </div><div class='input'>
+<span class='co'># mmkin objects</span>
+<span class='no'>ds</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
+ <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)]))
+<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>ds</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>6</span>:<span class='fl'>10</span>)
+<span class='co'># \dontrun{</span>
+<span class='no'>fits</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)
+<span class='fu'>parms</span>(<span class='no'>fits</span>[<span class='st'>"SFO"</span>, ])</div><div class='output co'>#&gt; Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#&gt; parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450
+#&gt; k_parent_sink 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421
+#&gt; sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673</div><div class='input'><span class='fu'>parms</span>(<span class='no'>fits</span>[, <span class='fl'>2</span>])</div><div class='output co'>#&gt; $SFO
+#&gt; Dataset 7
+#&gt; parent_0 82.666781678
+#&gt; k_parent_sink 0.009647805
+#&gt; sigma 7.040168584
+#&gt;
+#&gt; $FOMC
+#&gt; Dataset 7
+#&gt; parent_0 92.6837649
+#&gt; alpha 0.4967832
+#&gt; beta 14.1451255
+#&gt; sigma 1.9167519
+#&gt;
+#&gt; $DFOP
+#&gt; Dataset 7
+#&gt; parent_0 91.058971503
+#&gt; k1 0.044946770
+#&gt; k2 0.002868336
+#&gt; g 0.526942415
+#&gt; sigma 2.221302196
+#&gt; </div><div class='input'><span class='fu'>parms</span>(<span class='no'>fits</span>)</div><div class='output co'>#&gt; $SFO
+#&gt; Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#&gt; parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450
+#&gt; k_parent_sink 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421
+#&gt; sigma 5.15274487 7.040168584 3.6769645 6.4669234 6.50457673
+#&gt;
+#&gt; $FOMC
+#&gt; Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#&gt; parent_0 95.558575 92.6837649 90.719787 98.383939 94.8481458
+#&gt; alpha 1.338667 0.4967832 1.639099 1.074460 0.2805272
+#&gt; beta 13.033315 14.1451255 5.007077 4.397126 6.9052224
+#&gt; sigma 1.847671 1.9167519 1.066063 3.146056 1.6222778
+#&gt;
+#&gt; $DFOP
+#&gt; Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#&gt; parent_0 96.55213663 91.058971503 90.34509469 98.14858850 94.311323409
+#&gt; k1 0.21954589 0.044946770 0.41232289 0.31697588 0.080663853
+#&gt; k2 0.02957934 0.002868336 0.07581767 0.03260384 0.003425417
+#&gt; g 0.44845068 0.526942415 0.66091965 0.65322767 0.342652880
+#&gt; sigma 1.35690468 2.221302196 1.34169076 2.87159846 1.942067831
+#&gt; </div><div class='input'><span class='fu'>parms</span>(<span class='no'>fits</span>, <span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; $SFO
+#&gt; Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#&gt; parent_0 88.522754 82.666782 86.854731 91.777931 82.148094
+#&gt; log_k_parent_sink -2.848234 -4.641025 -1.559232 -2.093737 -4.933090
+#&gt; sigma 5.152745 7.040169 3.676964 6.466923 6.504577
+#&gt;
+#&gt; $FOMC
+#&gt; Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#&gt; parent_0 95.5585751 92.6837649 90.7197870 98.38393896 94.848146
+#&gt; log_alpha 0.2916741 -0.6996015 0.4941466 0.07181817 -1.271085
+#&gt; log_beta 2.5675088 2.6493701 1.6108523 1.48095106 1.932278
+#&gt; sigma 1.8476712 1.9167519 1.0660627 3.14605557 1.622278
+#&gt;
+#&gt; $DFOP
+#&gt; Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
+#&gt; parent_0 96.5521366 91.05897150 90.3450947 98.1485885 94.311323
+#&gt; log_k1 -1.5161940 -3.10227638 -0.8859485 -1.1489296 -2.517465
+#&gt; log_k2 -3.5206791 -5.85402317 -2.5794240 -3.4233253 -5.676532
+#&gt; g_ilr -0.1463234 0.07627854 0.4719196 0.4477805 -0.460676
+#&gt; sigma 1.3569047 2.22130220 1.3416908 2.8715985 1.942068
+#&gt; </div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/plot.mkinfit-1.png b/docs/dev/reference/plot.mkinfit-1.png
new file mode 100644
index 00000000..c6a415d7
--- /dev/null
+++ b/docs/dev/reference/plot.mkinfit-1.png
Binary files differ
diff --git a/docs/dev/reference/plot.mkinfit-2.png b/docs/dev/reference/plot.mkinfit-2.png
new file mode 100644
index 00000000..5dd3731e
--- /dev/null
+++ b/docs/dev/reference/plot.mkinfit-2.png
Binary files differ
diff --git a/docs/dev/reference/plot.mkinfit-3.png b/docs/dev/reference/plot.mkinfit-3.png
new file mode 100644
index 00000000..59cf8f8d
--- /dev/null
+++ b/docs/dev/reference/plot.mkinfit-3.png
Binary files differ
diff --git a/docs/dev/reference/plot.mkinfit-4.png b/docs/dev/reference/plot.mkinfit-4.png
new file mode 100644
index 00000000..d9867952
--- /dev/null
+++ b/docs/dev/reference/plot.mkinfit-4.png
Binary files differ
diff --git a/docs/dev/reference/plot.mkinfit-5.png b/docs/dev/reference/plot.mkinfit-5.png
new file mode 100644
index 00000000..1109c8df
--- /dev/null
+++ b/docs/dev/reference/plot.mkinfit-5.png
Binary files differ
diff --git a/docs/dev/reference/plot.mkinfit-6.png b/docs/dev/reference/plot.mkinfit-6.png
new file mode 100644
index 00000000..230c90e9
--- /dev/null
+++ b/docs/dev/reference/plot.mkinfit-6.png
Binary files differ
diff --git a/docs/dev/reference/plot.mkinfit-7.png b/docs/dev/reference/plot.mkinfit-7.png
new file mode 100644
index 00000000..b23427b5
--- /dev/null
+++ b/docs/dev/reference/plot.mkinfit-7.png
Binary files differ
diff --git a/docs/dev/reference/plot.mkinfit.html b/docs/dev/reference/plot.mkinfit.html
new file mode 100644
index 00000000..b9331f1a
--- /dev/null
+++ b/docs/dev/reference/plot.mkinfit.html
@@ -0,0 +1,379 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Plot the observed data and the fitted model of an mkinfit object — plot.mkinfit" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Plot the observed data and the fitted model of an mkinfit object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/plot.mkinfit.R'><code>R/plot.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>plot.mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='co'># S3 method for mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(
+ <span class='no'>x</span>,
+ <span class='kw'>fit</span> <span class='kw'>=</span> <span class='no'>x</span>,
+ <span class='kw'>obs_vars</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>fit</span>$<span class='no'>mkinmod</span>$<span class='no'>map</span>),
+ <span class='kw'>xlab</span> <span class='kw'>=</span> <span class='st'>"Time"</span>,
+ <span class='kw'>ylab</span> <span class='kw'>=</span> <span class='st'>"Observed"</span>,
+ <span class='kw'>xlim</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/range.html'>range</a></span>(<span class='no'>fit</span>$<span class='no'>data</span>$<span class='no'>time</span>),
+ <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='st'>"default"</span>,
+ <span class='kw'>col_obs</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>obs_vars</span>),
+ <span class='kw'>pch_obs</span> <span class='kw'>=</span> <span class='no'>col_obs</span>,
+ <span class='kw'>lty_obs</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='fl'>1</span>, <span class='fu'><a href='https://rdrr.io/r/base/length.html'>length</a></span>(<span class='no'>obs_vars</span>)),
+ <span class='kw'>add</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>legend</span> <span class='kw'>=</span> !<span class='no'>add</span>,
+ <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>show_errplot</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>maxabs</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>rel.height.middle</span> <span class='kw'>=</span> <span class='fl'>0.9</span>,
+ <span class='kw'>row_layout</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='st'>"topright"</span>,
+ <span class='kw'>inset</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0.05</span>, <span class='fl'>0.05</span>),
+ <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>errmin_digits</span> <span class='kw'>=</span> <span class='fl'>3</span>,
+ <span class='kw'>frame</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='no'>...</span>
+)
+
+<span class='fu'>plot_sep</span>(
+ <span class='no'>fit</span>,
+ <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='no'>fit</span>$<span class='no'>err_mod</span>, <span class='st'>"const"</span>), <span class='fl'>TRUE</span>, <span class='st'>"standardized"</span>),
+ <span class='no'>...</span>
+)
+
+<span class='fu'>plot_res</span>(
+ <span class='no'>fit</span>,
+ <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='no'>sep_obs</span>,
+ <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/ifelse.html'>ifelse</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/identical.html'>identical</a></span>(<span class='no'>fit</span>$<span class='no'>err_mod</span>, <span class='st'>"const"</span>), <span class='fl'>FALSE</span>, <span class='fl'>TRUE</span>),
+ <span class='no'>...</span>
+)
+
+<span class='fu'>plot_err</span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='no'>sep_obs</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>Alias for fit introduced for compatibility with the generic S3
+method.</p></td>
+ </tr>
+ <tr>
+ <th>fit</th>
+ <td><p>An object of class <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>obs_vars</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>xlab</th>
+ <td><p>Label for the x axis.</p></td>
+ </tr>
+ <tr>
+ <th>ylab</th>
+ <td><p>Label for the y axis.</p></td>
+ </tr>
+ <tr>
+ <th>xlim</th>
+ <td><p>Plot range in x direction.</p></td>
+ </tr>
+ <tr>
+ <th>ylim</th>
+ <td><p>Plot range in y direction.</p></td>
+ </tr>
+ <tr>
+ <th>col_obs</th>
+ <td><p>Colors used for plotting the observed data and the
+corresponding model prediction lines.</p></td>
+ </tr>
+ <tr>
+ <th>pch_obs</th>
+ <td><p>Symbols to be used for plotting the data.</p></td>
+ </tr>
+ <tr>
+ <th>lty_obs</th>
+ <td><p>Line types to be used for the model predictions.</p></td>
+ </tr>
+ <tr>
+ <th>add</th>
+ <td><p>Should the plot be added to an existing plot?</p></td>
+ </tr>
+ <tr>
+ <th>legend</th>
+ <td><p>Should a legend be added to the plot?</p></td>
+ </tr>
+ <tr>
+ <th>show_residuals</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>show_errplot</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>maxabs</th>
+ <td><p>Maximum absolute value of the residuals. This is used for the
+scaling of the y axis and defaults to "auto".</p></td>
+ </tr>
+ <tr>
+ <th>sep_obs</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>rel.height.middle</th>
+ <td><p>The relative height of the middle plot, if more
+than two rows of plots are shown.</p></td>
+ </tr>
+ <tr>
+ <th>row_layout</th>
+ <td><p>Should we use a row layout where the residual plot or the
+error model plot is shown to the right?</p></td>
+ </tr>
+ <tr>
+ <th>lpos</th>
+ <td><p>Position(s) of the legend(s). Passed to <code><a href='https://rdrr.io/r/graphics/legend.html'>legend</a></code> as
+the first argument. If not length one, this should be of the same length
+as the obs_var argument.</p></td>
+ </tr>
+ <tr>
+ <th>inset</th>
+ <td><p>Passed to <code><a href='https://rdrr.io/r/graphics/legend.html'>legend</a></code> if applicable.</p></td>
+ </tr>
+ <tr>
+ <th>show_errmin</th>
+ <td><p>Should the FOCUS chi2 error value be shown in the upper
+margin of the plot?</p></td>
+ </tr>
+ <tr>
+ <th>errmin_digits</th>
+ <td><p>The number of significant digits for rounding the FOCUS
+chi2 error percentage.</p></td>
+ </tr>
+ <tr>
+ <th>frame</th>
+ <td><p>Should a frame be drawn around the plots?</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments passed to <code><a href='https://rdrr.io/r/base/plot.html'>plot</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>standardized</th>
+ <td><p>When calling 'plot_res', should the residuals be
+standardized in the residual plot?</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The function is called for its side effect.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>If the current plot device is a <code><a href='https://rdrr.io/pkg/tikzDevice/man/tikz.html'>tikz</a></code> device, then
+latex is being used for the formatting of the chi2 error level, if
+<code>show_errmin = TRUE</code>.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='co'># One parent compound, one metabolite, both single first order, path from</span>
+<span class='co'># parent to sink included</span>
+<span class='co'># \dontrun{</span>
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Parent"</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</span> ))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_res</span>(<span class='no'>fit</span>, <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='img'><img src='plot.mkinfit-3.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>plot_err</span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-4.png' alt='' width='700' height='433' /></div><div class='input'>
+<span class='co'># Show the observed variables separately, with residuals</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>),
+ <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-5.png' alt='' width='700' height='433' /></div><div class='input'>
+<span class='co'># The same can be obtained with less typing, using the convenience function plot_sep</span>
+<span class='fu'>plot_sep</span>(<span class='no'>fit</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><div class='img'><img src='plot.mkinfit-6.png' alt='' width='700' height='433' /></div><div class='input'>
+<span class='co'># Show the observed variables separately, with the error model</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>show_errplot</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>),
+ <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-7.png' alt='' width='700' height='433' /></div><div class='input'># }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/plot.mmkin-1.png b/docs/dev/reference/plot.mmkin-1.png
new file mode 100644
index 00000000..8cf969c9
--- /dev/null
+++ b/docs/dev/reference/plot.mmkin-1.png
Binary files differ
diff --git a/docs/dev/reference/plot.mmkin-2.png b/docs/dev/reference/plot.mmkin-2.png
new file mode 100644
index 00000000..45d67b55
--- /dev/null
+++ b/docs/dev/reference/plot.mmkin-2.png
Binary files differ
diff --git a/docs/dev/reference/plot.mmkin-3.png b/docs/dev/reference/plot.mmkin-3.png
new file mode 100644
index 00000000..c58b371a
--- /dev/null
+++ b/docs/dev/reference/plot.mmkin-3.png
Binary files differ
diff --git a/docs/dev/reference/plot.mmkin-4.png b/docs/dev/reference/plot.mmkin-4.png
new file mode 100644
index 00000000..47cd7eec
--- /dev/null
+++ b/docs/dev/reference/plot.mmkin-4.png
Binary files differ
diff --git a/docs/dev/reference/plot.mmkin-5.png b/docs/dev/reference/plot.mmkin-5.png
new file mode 100644
index 00000000..44037bb4
--- /dev/null
+++ b/docs/dev/reference/plot.mmkin-5.png
Binary files differ
diff --git a/docs/dev/reference/plot.mmkin.html b/docs/dev/reference/plot.mmkin.html
new file mode 100644
index 00000000..ca1ec266
--- /dev/null
+++ b/docs/dev/reference/plot.mmkin.html
@@ -0,0 +1,287 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Plot model fits (observed and fitted) and the residuals for a row or column
+of an mmkin object — plot.mmkin • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Plot model fits (observed and fitted) and the residuals for a row or column
+of an mmkin object — plot.mmkin" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Plot model fits (observed and fitted) and the residuals for a row or column
+of an mmkin object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/plot.mmkin.R'><code>R/plot.mmkin.R</code></a></small>
+ <div class="hidden name"><code>plot.mmkin.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>When x is a row selected from an mmkin object (<code><a href='Extract.mmkin.html'>[.mmkin</a></code>), the
+same model fitted for at least one dataset is shown. When it is a column,
+the fit of at least one model to the same dataset is shown.</p>
+ </div>
+
+ <pre class="usage"><span class='co'># S3 method for mmkin</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(
+ <span class='no'>x</span>,
+ <span class='kw'>main</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>legends</span> <span class='kw'>=</span> <span class='fl'>1</span>,
+ <span class='kw'>resplot</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"time"</span>, <span class='st'>"errmod"</span>),
+ <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>errmin_var</span> <span class='kw'>=</span> <span class='st'>"All data"</span>,
+ <span class='kw'>errmin_digits</span> <span class='kw'>=</span> <span class='fl'>3</span>,
+ <span class='kw'>cex</span> <span class='kw'>=</span> <span class='fl'>0.7</span>,
+ <span class='kw'>rel.height.middle</span> <span class='kw'>=</span> <span class='fl'>0.9</span>,
+ <span class='kw'>ymax</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='no'>...</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>An object of class <code><a href='mmkin.html'>mmkin</a></code>, with either one row or one
+column.</p></td>
+ </tr>
+ <tr>
+ <th>main</th>
+ <td><p>The main title placed on the outer margin of the plot.</p></td>
+ </tr>
+ <tr>
+ <th>legends</th>
+ <td><p>An index for the fits for which legends should be shown.</p></td>
+ </tr>
+ <tr>
+ <th>resplot</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>standardized</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>show_errmin</th>
+ <td><p>Should the chi2 error level be shown on top of the plots
+to the left?</p></td>
+ </tr>
+ <tr>
+ <th>errmin_var</th>
+ <td><p>The variable for which the FOCUS chi2 error value should
+be shown.</p></td>
+ </tr>
+ <tr>
+ <th>errmin_digits</th>
+ <td><p>The number of significant digits for rounding the FOCUS
+chi2 error percentage.</p></td>
+ </tr>
+ <tr>
+ <th>cex</th>
+ <td><p>Passed to the plot functions and <code><a href='https://rdrr.io/r/graphics/mtext.html'>mtext</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>rel.height.middle</th>
+ <td><p>The relative height of the middle plot, if more
+than two rows of plots are shown.</p></td>
+ </tr>
+ <tr>
+ <th>ymax</th>
+ <td><p>Maximum y axis value for <code><a href='plot.mkinfit.html'>plot.mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><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></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The function is called for its side effect.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>If the current plot device is a <code><a href='https://rdrr.io/pkg/tikzDevice/man/tikz.html'>tikz</a></code> device, then
+latex is being used for the formatting of the chi2 error level.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='co'># \dontrun{</span>
+ <span class='co'># Only use one core not to offend CRAN checks</span>
+ <span class='no'>fits</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"HS"</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"FOCUS B"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_B</span>, <span class='st'>"FOCUS C"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_C</span>), <span class='co'># named list for titles</span>
+ <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Optimisation did not converge:</span>
+#&gt; <span class='warning'>iteration limit reached without convergence (10)</span></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='img'><img src='plot.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ])</div><div class='img'><img src='plot.mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ], <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='img'><img src='plot.mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='co'># We can also plot a single fit, if we like the way plot.mmkin works, but then the plot</span>
+ <span class='co'># height should be smaller than the plot width (this is not possible for the html pages</span>
+ <span class='co'># generated by pkgdown, as far as I know).</span>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, <span class='st'>"FOCUS C"</span>]) <span class='co'># same as plot(fits[1, 2])</span></div><div class='img'><img src='plot.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='co'># Show the error models</span>
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ], <span class='kw'>resplot</span> <span class='kw'>=</span> <span class='st'>"errmod"</span>)</div><div class='img'><img src='plot.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'> # }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/plot.nafta.html b/docs/dev/reference/plot.nafta.html
new file mode 100644
index 00000000..dab84955
--- /dev/null
+++ b/docs/dev/reference/plot.nafta.html
@@ -0,0 +1,210 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Plot the results of the three models used in the NAFTA scheme. — plot.nafta • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Plot the results of the three models used in the NAFTA scheme. — plot.nafta" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Plot the results of the three models used in the NAFTA scheme.</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nafta.R'><code>R/nafta.R</code></a></small>
+ <div class="hidden name"><code>plot.nafta.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>The plots are ordered with increasing complexity of the model in this
+function (SFO, then IORE, then DFOP).</p>
+ </div>
+
+ <pre class="usage"><span class='co'># S3 method for nafta</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>x</span>, <span class='kw'>legend</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>main</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>An object of class <code><a href='nafta.html'>nafta</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>legend</th>
+ <td><p>Should a legend be added?</p></td>
+ </tr>
+ <tr>
+ <th>main</th>
+ <td><p>Possibility to override the main title of the plot.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further arguments passed to <code><a href='plot.mmkin.html'>plot.mmkin</a></code>.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The function is called for its side effect.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>Calls <code><a href='plot.mmkin.html'>plot.mmkin</a></code>.</p>
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/plot.nlme.mmkin-1.png b/docs/dev/reference/plot.nlme.mmkin-1.png
new file mode 100644
index 00000000..fe2ef7d3
--- /dev/null
+++ b/docs/dev/reference/plot.nlme.mmkin-1.png
Binary files differ
diff --git a/docs/dev/reference/plot.nlme.mmkin-2.png b/docs/dev/reference/plot.nlme.mmkin-2.png
new file mode 100644
index 00000000..c82d0271
--- /dev/null
+++ b/docs/dev/reference/plot.nlme.mmkin-2.png
Binary files differ
diff --git a/docs/dev/reference/plot.nlme.mmkin.html b/docs/dev/reference/plot.nlme.mmkin.html
new file mode 100644
index 00000000..fd40b975
--- /dev/null
+++ b/docs/dev/reference/plot.nlme.mmkin.html
@@ -0,0 +1,275 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Plot a fitted nonlinear mixed model obtained via an mmkin row object — plot.nlme.mmkin • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Plot a fitted nonlinear mixed model obtained via an mmkin row object — plot.nlme.mmkin" />
+<meta property="og:description" content="Plot a fitted nonlinear mixed model obtained via an mmkin row object" />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Plot a fitted nonlinear mixed model obtained via an mmkin row object</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/plot.nlme.mmkin.R'><code>R/plot.nlme.mmkin.R</code></a></small>
+ <div class="hidden name"><code>plot.nlme.mmkin.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Plot a fitted nonlinear mixed model obtained via an mmkin row object</p>
+ </div>
+
+ <pre class="usage"><span class='co'># S3 method for nlme.mmkin</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(
+ <span class='no'>x</span>,
+ <span class='kw'>i</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fu'><a href='https://rdrr.io/r/base/nrow.html'>ncol</a></span>(<span class='no'>x</span>$<span class='no'>mmkin_orig</span>),
+ <span class='kw'>main</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='kw'>legends</span> <span class='kw'>=</span> <span class='fl'>1</span>,
+ <span class='kw'>resplot</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"time"</span>, <span class='st'>"errmod"</span>),
+ <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>errmin_var</span> <span class='kw'>=</span> <span class='st'>"All data"</span>,
+ <span class='kw'>errmin_digits</span> <span class='kw'>=</span> <span class='fl'>3</span>,
+ <span class='kw'>cex</span> <span class='kw'>=</span> <span class='fl'>0.7</span>,
+ <span class='kw'>rel.height.middle</span> <span class='kw'>=</span> <span class='fl'>0.9</span>,
+ <span class='kw'>ymax</span> <span class='kw'>=</span> <span class='st'>"auto"</span>,
+ <span class='no'>...</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>An object of class <code><a href='nlme.mmkin.html'>nlme.mmkin</a></code></p></td>
+ </tr>
+ <tr>
+ <th>i</th>
+ <td><p>A numeric index to select datasets for which to plot the nlme fit,
+in case plots get too large</p></td>
+ </tr>
+ <tr>
+ <th>main</th>
+ <td><p>The main title placed on the outer margin of the plot.</p></td>
+ </tr>
+ <tr>
+ <th>legends</th>
+ <td><p>An index for the fits for which legends should be shown.</p></td>
+ </tr>
+ <tr>
+ <th>resplot</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>standardized</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>show_errmin</th>
+ <td><p>Should the chi2 error level be shown on top of the plots
+to the left?</p></td>
+ </tr>
+ <tr>
+ <th>errmin_var</th>
+ <td><p>The variable for which the FOCUS chi2 error value should
+be shown.</p></td>
+ </tr>
+ <tr>
+ <th>errmin_digits</th>
+ <td><p>The number of significant digits for rounding the FOCUS
+chi2 error percentage.</p></td>
+ </tr>
+ <tr>
+ <th>cex</th>
+ <td><p>Passed to the plot functions and <code><a href='https://rdrr.io/r/graphics/mtext.html'>mtext</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>rel.height.middle</th>
+ <td><p>The relative height of the middle plot, if more
+than two rows of plots are shown.</p></td>
+ </tr>
+ <tr>
+ <th>ymax</th>
+ <td><p>Maximum y axis value for <code><a href='plot.mkinfit.html'>plot.mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><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></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The function is called for its side effect.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='no'>ds</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
+ <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)], <span class='no'>name</span> <span class='kw'>==</span> <span class='st'>"parent"</span>))
+<span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='st'>"SFO"</span>, <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)
+<span class='co'>#plot(f) # too many panels for pkgdown</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f</span>[, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='plot.nlme.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>nlme</span>)
+<span class='no'>f_nlme</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>)
+
+<span class='co'>#plot(f_nlme) # too many panels for pkgdown</span>
+<span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>f_nlme</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='plot.nlme.mmkin-2.png' alt='' width='700' height='433' /></div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/print.mkinds.html b/docs/dev/reference/print.mkinds.html
new file mode 100644
index 00000000..0539c7da
--- /dev/null
+++ b/docs/dev/reference/print.mkinds.html
@@ -0,0 +1,194 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Print mkinds objects — print.mkinds • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Print mkinds objects — print.mkinds" />
+<meta property="og:description" content="Print mkinds objects" />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Print mkinds objects</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinds.R'><code>R/mkinds.R</code></a></small>
+ <div class="hidden name"><code>print.mkinds.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Print mkinds objects</p>
+ </div>
+
+ <pre class="usage"><span class='co'># S3 method for mkinds</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>An <code><a href='mkinds.html'>mkinds</a></code> object.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Not used.</p></td>
+ </tr>
+ </table>
+
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/print.mkinmod.html b/docs/dev/reference/print.mkinmod.html
new file mode 100644
index 00000000..fd0f624a
--- /dev/null
+++ b/docs/dev/reference/print.mkinmod.html
@@ -0,0 +1,217 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Print mkinmod objects — print.mkinmod • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Print mkinmod objects — print.mkinmod" />
+<meta property="og:description" content="Print mkinmod objects in a way that the user finds his way to get to its
+components." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Print mkinmod objects</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinmod.R'><code>R/mkinmod.R</code></a></small>
+ <div class="hidden name"><code>print.mkinmod.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Print mkinmod objects in a way that the user finds his way to get to its
+components.</p>
+ </div>
+
+ <pre class="usage"><span class='co'># S3 method for mkinmod</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>x</th>
+ <td><p>An <code><a href='mkinmod.html'>mkinmod</a></code> object.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Not used.</p></td>
+ </tr>
+ </table>
+
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='no'>m_synth_SFO_lin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"M1"</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"M2"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>m_synth_SFO_lin</span>)</div><div class='output co'>#&gt; &lt;mkinmod&gt; model generated with
+#&gt; Use of formation fractions $use_of_ff: max
+#&gt; Specification $spec:
+#&gt; $parent
+#&gt; $type: SFO; $to: M1; $sink: TRUE
+#&gt; $M1
+#&gt; $type: SFO; $to: M2; $sink: TRUE
+#&gt; $M2
+#&gt; $type: SFO; $sink: TRUE
+#&gt; Coefficient matrix $coefmat available
+#&gt; Compiled model $cf available
+#&gt; Differential equations:
+#&gt; d_parent/dt = - k_parent * parent
+#&gt; d_M1/dt = + f_parent_to_M1 * k_parent * parent - k_M1 * M1
+#&gt; d_M2/dt = + f_M1_to_M2 * k_M1 * M1 - k_M2 * M2</div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/reexports.html b/docs/dev/reference/reexports.html
new file mode 100644
index 00000000..fe27de4b
--- /dev/null
+++ b/docs/dev/reference/reexports.html
@@ -0,0 +1,190 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Objects exported from other packages — reexports • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Objects exported from other packages — reexports" />
+<meta property="og:description" content="These objects are imported from other packages. Follow the links
+below to see their documentation.
+
+ lmtestlrtest
+
+" />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Objects exported from other packages</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/lrtest.mkinfit.R'><code>R/lrtest.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>reexports.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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'>lrtest</a></code></p></dd>
+
+</dl>
+ </div>
+
+
+
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/residuals.mkinfit.html b/docs/dev/reference/residuals.mkinfit.html
new file mode 100644
index 00000000..89552630
--- /dev/null
+++ b/docs/dev/reference/residuals.mkinfit.html
@@ -0,0 +1,204 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Extract residuals from an mkinfit model — residuals.mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Extract residuals from an mkinfit model — residuals.mkinfit" />
+<meta property="og:description" content="Extract residuals from an mkinfit model" />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Extract residuals from an mkinfit model</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/residuals.mkinfit.R'><code>R/residuals.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>residuals.mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Extract residuals from an mkinfit model</p>
+ </div>
+
+ <pre class="usage"><span class='co'># S3 method for mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/residuals.html'>residuals</a></span>(<span class='no'>object</span>, <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>A <code><a href='mkinfit.html'>mkinfit</a></code> object</p></td>
+ </tr>
+ <tr>
+ <th>standardized</th>
+ <td><p>Should the residuals be standardized by dividing by the
+standard deviation obtained from the fitted error model?</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Not used</p></td>
+ </tr>
+ </table>
+
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"DFOP"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='https://rdrr.io/r/stats/residuals.html'>residuals</a></span>(<span class='no'>f</span>)</div><div class='output co'>#&gt; [1] 0.09726306 -0.13912135 -0.15351176 0.73388319 -0.08657030 -0.93204730
+#&gt; [7] -0.03269102 1.45347805 -0.88423710</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/stats/residuals.html'>residuals</a></span>(<span class='no'>f</span>, <span class='kw'>standardized</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; [1] 0.13969820 -0.19981894 -0.22048777 1.05407086 -0.12434027 -1.33869248
+#&gt; [7] -0.04695387 2.08761953 -1.27002305</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/saemix-1.png b/docs/dev/reference/saemix-1.png
new file mode 100644
index 00000000..0d79300d
--- /dev/null
+++ b/docs/dev/reference/saemix-1.png
Binary files differ
diff --git a/docs/dev/reference/saemix-2.png b/docs/dev/reference/saemix-2.png
new file mode 100644
index 00000000..04de70b5
--- /dev/null
+++ b/docs/dev/reference/saemix-2.png
Binary files differ
diff --git a/docs/dev/reference/saemix.html b/docs/dev/reference/saemix.html
new file mode 100644
index 00000000..ad16a81b
--- /dev/null
+++ b/docs/dev/reference/saemix.html
@@ -0,0 +1,446 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Create saemix models from mmkin row objects — saemix_model • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Create saemix models from mmkin row objects — saemix_model" />
+<meta property="og:description" content="This function sets up a nonlinear mixed effects model for an mmkin row
+object for use with the saemix package. An mmkin row object is essentially a
+list of mkinfit objects that have been obtained by fitting the same model to
+a list of datasets." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Create saemix models from mmkin row objects</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/saemix.R'><code>R/saemix.R</code></a></small>
+ <div class="hidden name"><code>saemix.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>This function sets up a nonlinear mixed effects model for an mmkin row
+object for use with the saemix package. An mmkin row object is essentially a
+list of mkinfit objects that have been obtained by fitting the same model to
+a list of datasets.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>saemix_model</span>(<span class='no'>object</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>())
+
+<span class='fu'>saemix_data</span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An mmkin row object containing several fits of the same model to different datasets</p></td>
+ </tr>
+ <tr>
+ <th>cores</th>
+ <td><p>The number of cores to be used for multicore processing.
+On Windows machines, cores &gt; 1 is currently not supported.</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further parameters passed to <a href='https://rdrr.io/pkg/saemix/man/saemixData.html'>saemix::saemixData</a></p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixModel-class.html'>saemix::SaemixModel</a> object.</p>
+<p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixData-class.html'>saemix::SaemixData</a> object.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>Starting values for the fixed effects (population mean parameters, argument psi0 of
+<code><a href='https://rdrr.io/pkg/saemix/man/saemixModel.html'>saemix::saemixModel()</a></code> are the mean values of the parameters found using
+mmkin. Starting variances of the random effects (argument omega.init) are the
+variances of the deviations of the parameters from these mean values.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='no'>ds</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
+ <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)]))
+<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>ds</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>6</span>:<span class='fl'>10</span>)
+<span class='no'>sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># \dontrun{</span>
+<span class='no'>f_mmkin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>sfo_sfo</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>saemix</span>)</div><div class='output co'>#&gt; <span class='message'>Package saemix, version 3.1.9000</span>
+#&gt; <span class='message'> please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr</span></div><div class='input'><span class='no'>m_saemix</span> <span class='kw'>&lt;-</span> <span class='fu'>saemix_model</span>(<span class='no'>f_mmkin</span>)</div><div class='output co'>#&gt;
+#&gt;
+#&gt; The following SaemixModel object was successfully created:
+#&gt;
+#&gt; Nonlinear mixed-effects model
+#&gt; Model function: Mixed model generated from mmkin object Model type: structural
+#&gt; function (psi, id, xidep)
+#&gt; {
+#&gt; uid &lt;- unique(id)
+#&gt; res_list &lt;- parallel::mclapply(uid, function(i) {
+#&gt; transparms_optim &lt;- psi[i, ]
+#&gt; names(transparms_optim) &lt;- names(degparms_optim)
+#&gt; odeini_optim &lt;- transparms_optim[odeini_optim_parm_names]
+#&gt; names(odeini_optim) &lt;- gsub("_0$", "", odeini_optim_parm_names)
+#&gt; odeini &lt;- c(odeini_optim, odeini_fixed)[names(mkin_model$diffs)]
+#&gt; ode_transparms_optim_names &lt;- setdiff(names(transparms_optim),
+#&gt; odeini_optim_parm_names)
+#&gt; odeparms_optim &lt;- backtransform_odeparms(transparms_optim[ode_transparms_optim_names],
+#&gt; mkin_model, transform_rates = object[[1]]$transform_rates,
+#&gt; transform_fractions = object[[1]]$transform_fractions)
+#&gt; odeparms &lt;- c(odeparms_optim, odeparms_fixed)
+#&gt; xidep_i &lt;- subset(xidep, id == i)
+#&gt; if (analytical) {
+#&gt; out_values &lt;- mkin_model$deg_func(xidep_i, odeini,
+#&gt; odeparms)
+#&gt; }
+#&gt; else {
+#&gt; i_time &lt;- xidep_i$time
+#&gt; i_name &lt;- xidep_i$name
+#&gt; out_wide &lt;- mkinpredict(mkin_model, odeparms = odeparms,
+#&gt; odeini = odeini, solution_type = object[[1]]$solution_type,
+#&gt; outtimes = sort(unique(i_time)))
+#&gt; out_index &lt;- cbind(as.character(i_time), as.character(i_name))
+#&gt; out_values &lt;- out_wide[out_index]
+#&gt; }
+#&gt; return(out_values)
+#&gt; }, mc.cores = cores)
+#&gt; res &lt;- unlist(res_list)
+#&gt; return(res)
+#&gt; }
+#&gt; &lt;bytecode: 0x55555e4213d8&gt;
+#&gt; &lt;environment: 0x55555c47cdf0&gt;
+#&gt; Nb of parameters: 4
+#&gt; parameter names: parent_0 log_k_parent log_k_A1 f_parent_ilr_1
+#&gt; distribution:
+#&gt; Parameter Distribution Estimated
+#&gt; [1,] parent_0 normal Estimated
+#&gt; [2,] log_k_parent normal Estimated
+#&gt; [3,] log_k_A1 normal Estimated
+#&gt; [4,] f_parent_ilr_1 normal Estimated
+#&gt; Variance-covariance matrix:
+#&gt; parent_0 log_k_parent log_k_A1 f_parent_ilr_1
+#&gt; parent_0 1 0 0 0
+#&gt; log_k_parent 0 1 0 0
+#&gt; log_k_A1 0 0 1 0
+#&gt; f_parent_ilr_1 0 0 0 1
+#&gt; Error model: constant , initial values: a.1=1
+#&gt; No covariate in the model.
+#&gt; Initial values
+#&gt; parent_0 log_k_parent log_k_A1 f_parent_ilr_1
+#&gt; Pop.CondInit 86.53449 -3.207005 -3.060308 -1.920449</div><div class='input'><span class='no'>d_saemix</span> <span class='kw'>&lt;-</span> <span class='fu'>saemix_data</span>(<span class='no'>f_mmkin</span>)</div><div class='output co'>#&gt;
+#&gt;
+#&gt; The following SaemixData object was successfully created:
+#&gt;
+#&gt; Object of class SaemixData
+#&gt; longitudinal data for use with the SAEM algorithm
+#&gt; Dataset ds_saemix
+#&gt; Structured data: value ~ time + name | ds
+#&gt; X variable for graphs: time () </div><div class='input'><span class='no'>saemix_options</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456</span>,
+ <span class='kw'>save</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>save.graphs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>displayProgress</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>nbiter.saemix</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>200</span>, <span class='fl'>80</span>))
+<span class='no'>f_saemix</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix</a></span>(<span class='no'>m_saemix</span>, <span class='no'>d_saemix</span>, <span class='no'>saemix_options</span>)</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Wed May 27 05:55:50 2020"
+#&gt; ..
+#&gt; Minimisation finished
+#&gt; [1] "Wed May 27 06:01:54 2020"</div><div class='img'><img src='saemix-1.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by the SAEM algorithm
+#&gt; -----------------------------------
+#&gt; ---- Data ----
+#&gt; -----------------------------------
+#&gt; Object of class SaemixData
+#&gt; longitudinal data for use with the SAEM algorithm
+#&gt; Dataset ds_saemix
+#&gt; Structured data: value ~ time + name | ds
+#&gt; X variable for graphs: time ()
+#&gt; Dataset characteristics:
+#&gt; number of subjects: 5
+#&gt; number of observations: 170
+#&gt; average/min/max nb obs: 34.00 / 30 / 38
+#&gt; First 10 lines of data:
+#&gt; ds time name value mdv cens occ ytype
+#&gt; 1 Dataset 6 0 parent 97.2 0 0 1 1
+#&gt; 2 Dataset 6 0 parent 96.4 0 0 1 1
+#&gt; 3 Dataset 6 3 parent 71.1 0 0 1 1
+#&gt; 4 Dataset 6 3 parent 69.2 0 0 1 1
+#&gt; 5 Dataset 6 6 parent 58.1 0 0 1 1
+#&gt; 6 Dataset 6 6 parent 56.6 0 0 1 1
+#&gt; 7 Dataset 6 10 parent 44.4 0 0 1 1
+#&gt; 8 Dataset 6 10 parent 43.4 0 0 1 1
+#&gt; 9 Dataset 6 20 parent 33.3 0 0 1 1
+#&gt; 10 Dataset 6 20 parent 29.2 0 0 1 1
+#&gt; -----------------------------------
+#&gt; ---- Model ----
+#&gt; -----------------------------------
+#&gt; Nonlinear mixed-effects model
+#&gt; Model function: Mixed model generated from mmkin object Model type: structural
+#&gt; function (psi, id, xidep)
+#&gt; {
+#&gt; uid &lt;- unique(id)
+#&gt; res_list &lt;- parallel::mclapply(uid, function(i) {
+#&gt; transparms_optim &lt;- psi[i, ]
+#&gt; names(transparms_optim) &lt;- names(degparms_optim)
+#&gt; odeini_optim &lt;- transparms_optim[odeini_optim_parm_names]
+#&gt; names(odeini_optim) &lt;- gsub("_0$", "", odeini_optim_parm_names)
+#&gt; odeini &lt;- c(odeini_optim, odeini_fixed)[names(mkin_model$diffs)]
+#&gt; ode_transparms_optim_names &lt;- setdiff(names(transparms_optim),
+#&gt; odeini_optim_parm_names)
+#&gt; odeparms_optim &lt;- backtransform_odeparms(transparms_optim[ode_transparms_optim_names],
+#&gt; mkin_model, transform_rates = object[[1]]$transform_rates,
+#&gt; transform_fractions = object[[1]]$transform_fractions)
+#&gt; odeparms &lt;- c(odeparms_optim, odeparms_fixed)
+#&gt; xidep_i &lt;- subset(xidep, id == i)
+#&gt; if (analytical) {
+#&gt; out_values &lt;- mkin_model$deg_func(xidep_i, odeini,
+#&gt; odeparms)
+#&gt; }
+#&gt; else {
+#&gt; i_time &lt;- xidep_i$time
+#&gt; i_name &lt;- xidep_i$name
+#&gt; out_wide &lt;- mkinpredict(mkin_model, odeparms = odeparms,
+#&gt; odeini = odeini, solution_type = object[[1]]$solution_type,
+#&gt; outtimes = sort(unique(i_time)))
+#&gt; out_index &lt;- cbind(as.character(i_time), as.character(i_name))
+#&gt; out_values &lt;- out_wide[out_index]
+#&gt; }
+#&gt; return(out_values)
+#&gt; }, mc.cores = cores)
+#&gt; res &lt;- unlist(res_list)
+#&gt; return(res)
+#&gt; }
+#&gt; &lt;bytecode: 0x55555e4213d8&gt;
+#&gt; &lt;environment: 0x55555c47cdf0&gt;
+#&gt; Nb of parameters: 4
+#&gt; parameter names: parent_0 log_k_parent log_k_A1 f_parent_ilr_1
+#&gt; distribution:
+#&gt; Parameter Distribution Estimated
+#&gt; [1,] parent_0 normal Estimated
+#&gt; [2,] log_k_parent normal Estimated
+#&gt; [3,] log_k_A1 normal Estimated
+#&gt; [4,] f_parent_ilr_1 normal Estimated
+#&gt; Variance-covariance matrix:
+#&gt; parent_0 log_k_parent log_k_A1 f_parent_ilr_1
+#&gt; parent_0 1 0 0 0
+#&gt; log_k_parent 0 1 0 0
+#&gt; log_k_A1 0 0 1 0
+#&gt; f_parent_ilr_1 0 0 0 1
+#&gt; Error model: constant , initial values: a.1=1
+#&gt; No covariate in the model.
+#&gt; Initial values
+#&gt; parent_0 log_k_parent log_k_A1 f_parent_ilr_1
+#&gt; Pop.CondInit 86.53449 -3.207005 -3.060308 -1.920449
+#&gt; -----------------------------------
+#&gt; ---- Key algorithm options ----
+#&gt; -----------------------------------
+#&gt; Estimation of individual parameters (MAP)
+#&gt; Estimation of standard errors and linearised log-likelihood
+#&gt; Estimation of log-likelihood by importance sampling
+#&gt; Number of iterations: K1=200, K2=80
+#&gt; Number of chains: 10
+#&gt; Seed: 123456
+#&gt; Number of MCMC iterations for IS: 5000
+#&gt; Simulations:
+#&gt; nb of simulated datasets used for npde: 1000
+#&gt; nb of simulated datasets used for VPC: 100
+#&gt; Input/output
+#&gt; save the results to a file: FALSE
+#&gt; save the graphs to files: FALSE
+#&gt; ----------------------------------------------------
+#&gt; ---- Results ----
+#&gt; ----------------------------------------------------
+#&gt; ----------------- Fixed effects ------------------
+#&gt; ----------------------------------------------------
+#&gt; Parameter Estimate SE CV(%)
+#&gt; [1,] parent_0 86.14 1.61 1.9
+#&gt; [2,] log_k_parent -3.21 0.59 18.5
+#&gt; [3,] log_k_A1 -4.66 0.30 6.4
+#&gt; [4,] f_parent_ilr_1 -0.33 0.30 91.7
+#&gt; [5,] a.1 4.68 0.27 5.8
+#&gt; ----------------------------------------------------
+#&gt; ----------- Variance of random effects -----------
+#&gt; ----------------------------------------------------
+#&gt; Parameter Estimate SE CV(%)
+#&gt; parent_0 omega2.parent_0 7.71 8.14 106
+#&gt; log_k_parent omega2.log_k_parent 1.76 1.12 63
+#&gt; log_k_A1 omega2.log_k_A1 0.26 0.26 101
+#&gt; f_parent_ilr_1 omega2.f_parent_ilr_1 0.39 0.28 71
+#&gt; ----------------------------------------------------
+#&gt; ------ Correlation matrix of random effects ------
+#&gt; ----------------------------------------------------
+#&gt; omega2.parent_0 omega2.log_k_parent omega2.log_k_A1
+#&gt; omega2.parent_0 1 0 0
+#&gt; omega2.log_k_parent 0 1 0
+#&gt; omega2.log_k_A1 0 0 1
+#&gt; omega2.f_parent_ilr_1 0 0 0
+#&gt; omega2.f_parent_ilr_1
+#&gt; omega2.parent_0 0
+#&gt; omega2.log_k_parent 0
+#&gt; omega2.log_k_A1 0
+#&gt; omega2.f_parent_ilr_1 1
+#&gt; ----------------------------------------------------
+#&gt; --------------- Statistical criteria -------------
+#&gt; ----------------------------------------------------
+#&gt; Likelihood computed by linearisation
+#&gt; -2LL= 1064.364
+#&gt; AIC = 1082.364
+#&gt; BIC = 1078.848
+#&gt;
+#&gt; Likelihood computed by importance sampling
+#&gt; -2LL= 1063.462
+#&gt; AIC = 1081.462
+#&gt; BIC = 1077.947
+#&gt; ----------------------------------------------------</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span>(<span class='no'>f_saemix</span>, <span class='kw'>plot.type</span> <span class='kw'>=</span> <span class='st'>"convergence"</span>)</div><div class='output co'>#&gt; Plotting convergence plots</div><div class='img'><img src='saemix-2.png' alt='' width='700' height='433' /></div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/schaefer07_complex_case-1.png b/docs/dev/reference/schaefer07_complex_case-1.png
new file mode 100644
index 00000000..7cf7484d
--- /dev/null
+++ b/docs/dev/reference/schaefer07_complex_case-1.png
Binary files differ
diff --git a/docs/dev/reference/schaefer07_complex_case.html b/docs/dev/reference/schaefer07_complex_case.html
new file mode 100644
index 00000000..308db2db
--- /dev/null
+++ b/docs/dev/reference/schaefer07_complex_case.html
@@ -0,0 +1,239 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Metabolism data set used for checking the software quality of KinGUI — schaefer07_complex_case" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Metabolism data set used for checking the software quality of KinGUI</h1>
+
+ <div class="hidden name"><code>schaefer07_complex_case.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='no'>schaefer07_complex_case</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='no'>data</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkin_wide_to_long.html'>mkin_wide_to_long</a></span>(<span class='no'>schaefer07_complex_case</span>, <span class='kw'>time</span> <span class='kw'>=</span> <span class='st'>"time"</span>)
+<span class='no'>model</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"A1"</span>, <span class='st'>"B1"</span>, <span class='st'>"C1"</span>), <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>),
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"A2"</span>),
+ <span class='kw'>B1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
+ <span class='kw'>C1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
+ <span class='kw'>A2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='co'># \dontrun{</span>
+ <span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'><a href='https://rdrr.io/r/base/plot.html'>plot</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='schaefer07_complex_case-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; $ff
+#&gt; parent_A1 parent_B1 parent_C1 parent_sink A1_A2 A1_sink
+#&gt; 0.3809619 0.1954667 0.4235714 0.0000000 0.4479609 0.5520391
+#&gt;
+#&gt; $distimes
+#&gt; DT50 DT90
+#&gt; parent 13.95078 46.34350
+#&gt; A1 49.75343 165.27733
+#&gt; B1 37.26907 123.80517
+#&gt; C1 11.23131 37.30959
+#&gt; A2 28.50638 94.69614
+#&gt; </div><div class='input'> <span class='co'># }</span>
+ <span class='co'># Compare with the results obtained in the original publication</span>
+ <span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>schaefer07_complex_results</span>)</div><div class='output co'>#&gt; compound parameter KinGUI ModelMaker deviation
+#&gt; 1 parent degradation rate 0.0496 0.0506 2.0
+#&gt; 2 parent DT50 13.9900 13.6900 2.2
+#&gt; 3 metabolite A1 formation fraction 0.3803 0.3696 2.9
+#&gt; 4 metabolite A1 degradation rate 0.0139 0.0136 2.2
+#&gt; 5 metabolite A1 DT50 49.9600 50.8900 1.8
+#&gt; 6 metabolite B1 formation fraction 0.1866 0.1818 2.6
+#&gt; 7 metabolite B1 degradation rate 0.0175 0.0172 1.7
+#&gt; 8 metabolite B1 DT50 39.6100 40.2400 1.6
+#&gt; 9 metabolite C1 formation fraction 0.4331 0.4486 3.5
+#&gt; 10 metabolite C1 degradation rate 0.0638 0.0700 8.9
+#&gt; 11 metabolite C1 DT50 10.8700 9.9000 9.8
+#&gt; 12 metabolite A2 formation fraction 0.4529 0.4559 0.7
+#&gt; 13 metabolite A2 degradation rate 0.0245 0.0244 0.4
+#&gt; 14 metabolite A2 DT50 28.2400 28.4500 0.7</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/sigma_twocomp.html b/docs/dev/reference/sigma_twocomp.html
new file mode 100644
index 00000000..eac61a11
--- /dev/null
+++ b/docs/dev/reference/sigma_twocomp.html
@@ -0,0 +1,219 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Two-component error model — sigma_twocomp • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Two-component error model — sigma_twocomp" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Two-component error model</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/sigma_twocomp.R'><code>R/sigma_twocomp.R</code></a></small>
+ <div class="hidden name"><code>sigma_twocomp.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>Function describing the standard deviation of the measurement error in
+dependence of the measured value \(y\):</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>sigma_twocomp</span>(<span class='no'>y</span>, <span class='no'>sigma_low</span>, <span class='no'>rsd_high</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>y</th>
+ <td><p>The magnitude of the observed value</p></td>
+ </tr>
+ <tr>
+ <th>sigma_low</th>
+ <td><p>The asymptotic minimum of the standard deviation for low
+observed values</p></td>
+ </tr>
+ <tr>
+ <th>rsd_high</th>
+ <td><p>The coefficient describing the increase of the standard
+deviation with the magnitude of the observed value</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The standard deviation of the response variable.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</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>
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</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>
+
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/summary.mkinfit.html b/docs/dev/reference/summary.mkinfit.html
new file mode 100644
index 00000000..99d7d7c4
--- /dev/null
+++ b/docs/dev/reference/summary.mkinfit.html
@@ -0,0 +1,337 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Summary method for class "mkinfit" — summary.mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Summary method for class "mkinfit" — summary.mkinfit" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Summary method for class "mkinfit"</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/summary.mkinfit.R'><code>R/summary.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>summary.mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='co'># S3 method for mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>object</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>distimes</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='no'>...</span>)
+
+<span class='co'># S3 method for summary.mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span>(<span class='fl'>3</span>, <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span>(<span class='st'>"digits"</span>) - <span class='fl'>3</span>), <span class='no'>...</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>an object of class <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>data</th>
+ <td><p>logical, indicating whether the data should be included in the
+summary.</p></td>
+ </tr>
+ <tr>
+ <th>distimes</th>
+ <td><p>logical, indicating whether DT50 and DT90 values should be
+included.</p></td>
+ </tr>
+ <tr>
+ <th>alpha</th>
+ <td><p>error level for confidence interval estimation from t
+distribution</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>optional arguments passed to methods like <code>print</code>.</p></td>
+ </tr>
+ <tr>
+ <th>x</th>
+ <td><p>an object of class <code>summary.mkinfit</code>.</p></td>
+ </tr>
+ <tr>
+ <th>digits</th>
+ <td><p>Number of digits to use for printing</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>The summary function returns a list with components, among others</p>
+<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 of SFORB components of the model.</p></dd>
+The print method is called for its side effect, i.e. printing the summary.
+
+ <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>
+
+ <p>FOCUS (2006) &#8220;Guidance Document on Estimating Persistence
+and Degradation Kinetics from Environmental Fate Studies on Pesticides in
+EU Registration&#8221; Report of the FOCUS Work Group on Degradation Kinetics,
+EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
+<a href='http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)), <span class='no'>FOCUS_2006_A</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.50.3
+#&gt; R version used for fitting: 4.0.0
+#&gt; Date of fit: Wed May 27 06:02:05 2020
+#&gt; Date of summary: Wed May 27 06:02:05 2020
+#&gt;
+#&gt; Equations:
+#&gt; d_parent/dt = - k_parent * parent
+#&gt;
+#&gt; Model predictions using solution type analytical
+#&gt;
+#&gt; Fitted using 131 model solutions performed in 0.027 s
+#&gt;
+#&gt; Error model: Constant variance
+#&gt;
+#&gt; Error model algorithm: OLS
+#&gt;
+#&gt; Starting values for parameters to be optimised:
+#&gt; value type
+#&gt; parent_0 101.24 state
+#&gt; k_parent 0.10 deparm
+#&gt;
+#&gt; Starting values for the transformed parameters actually optimised:
+#&gt; value lower upper
+#&gt; parent_0 101.240000 -Inf Inf
+#&gt; log_k_parent -2.302585 -Inf Inf
+#&gt;
+#&gt; Fixed parameter values:
+#&gt; None
+#&gt;
+#&gt; Results:
+#&gt;
+#&gt; AIC BIC logLik
+#&gt; 55.28197 55.5203 -24.64099
+#&gt;
+#&gt; Optimised, transformed parameters with symmetric confidence intervals:
+#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 109.200 3.70400 99.630 118.700
+#&gt; log_k_parent -3.291 0.09176 -3.527 -3.055
+#&gt; sigma 5.266 1.31600 1.882 8.649
+#&gt;
+#&gt; Parameter correlation:
+#&gt; parent_0 log_k_parent sigma
+#&gt; parent_0 1.000e+00 5.428e-01 1.648e-07
+#&gt; log_k_parent 5.428e-01 1.000e+00 2.513e-07
+#&gt; sigma 1.648e-07 2.513e-07 1.000e+00
+#&gt;
+#&gt; Backtransformed parameters:
+#&gt; Confidence intervals for internally transformed parameters are asymmetric.
+#&gt; t-test (unrealistically) based on the assumption of normal distribution
+#&gt; for estimators of untransformed parameters.
+#&gt; Estimate t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 109.20000 29.47 4.218e-07 99.6300 118.70000
+#&gt; k_parent 0.03722 10.90 5.650e-05 0.0294 0.04712
+#&gt; sigma 5.26600 4.00 5.162e-03 1.8820 8.64900
+#&gt;
+#&gt; FOCUS Chi2 error levels in percent:
+#&gt; err.min n.optim df
+#&gt; All data 8.385 2 6
+#&gt; parent 8.385 2 6
+#&gt;
+#&gt; Estimated disappearance times:
+#&gt; DT50 DT90
+#&gt; parent 18.62 61.87
+#&gt;
+#&gt; Data:
+#&gt; time variable observed predicted residual
+#&gt; 0 parent 101.24 109.153 -7.9132
+#&gt; 3 parent 99.27 97.622 1.6484
+#&gt; 7 parent 90.11 84.119 5.9913
+#&gt; 14 parent 72.19 64.826 7.3641
+#&gt; 30 parent 29.71 35.738 -6.0283
+#&gt; 62 parent 5.98 10.862 -4.8818
+#&gt; 90 parent 1.54 3.831 -2.2911
+#&gt; 118 parent 0.39 1.351 -0.9613</div><div class='input'>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/synthetic_data_for_UBA_2014-1.png b/docs/dev/reference/synthetic_data_for_UBA_2014-1.png
new file mode 100644
index 00000000..02976ced
--- /dev/null
+++ b/docs/dev/reference/synthetic_data_for_UBA_2014-1.png
Binary files differ
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..da4af114
--- /dev/null
+++ b/docs/dev/reference/synthetic_data_for_UBA_2014.html
@@ -0,0 +1,470 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014 • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Synthetic datasets for one parent compound with two metabolites — synthetic_data_for_UBA_2014" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Synthetic datasets for one parent compound with two metabolites</h1>
+
+ <div class="hidden name"><code>synthetic_data_for_UBA_2014.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='no'>synthetic_data_for_UBA_2014</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</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>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># \dontrun{</span>
+<span class='co'># The data have been generated using the following kinetic models</span>
+<span class='no'>m_synth_SFO_lin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"M1"</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"M2"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+
+<span class='no'>m_synth_SFO_par</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>),
+ <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>m_synth_DFOP_lin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"DFOP"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"M1"</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"M2"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>m_synth_DFOP_par</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"DFOP"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>),
+ <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='co'># The model predictions without intentional error were generated as follows</span>
+<span class='no'>sampling_times</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span>)
+
+<span class='no'>d_synth_SFO_lin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_synth_SFO_lin</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.8</span>,
+ <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fl'>0.3</span>, <span class='kw'>f_M1_to_M2</span> <span class='kw'>=</span> <span class='fl'>0.7</span>,
+ <span class='kw'>k_M2</span> <span class='kw'>=</span> <span class='fl'>0.02</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fl'>0</span>),
+ <span class='no'>sampling_times</span>)
+
+<span class='no'>d_synth_DFOP_lin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_synth_DFOP_lin</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k1</span> <span class='kw'>=</span> <span class='fl'>0.2</span>, <span class='kw'>k2</span> <span class='kw'>=</span> <span class='fl'>0.02</span>, <span class='kw'>g</span> <span class='kw'>=</span> <span class='fl'>0.5</span>,
+ <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fl'>0.3</span>,
+ <span class='kw'>f_M1_to_M2</span> <span class='kw'>=</span> <span class='fl'>0.7</span>, <span class='kw'>k_M2</span> <span class='kw'>=</span> <span class='fl'>0.02</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fl'>0</span>),
+ <span class='no'>sampling_times</span>)
+
+<span class='no'>d_synth_SFO_par</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_synth_SFO_par</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent</span> <span class='kw'>=</span> <span class='fl'>0.2</span>,
+ <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.8</span>, <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fl'>0.01</span>,
+ <span class='kw'>f_parent_to_M2</span> <span class='kw'>=</span> <span class='fl'>0.2</span>, <span class='kw'>k_M2</span> <span class='kw'>=</span> <span class='fl'>0.02</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fl'>0</span>),
+ <span class='no'>sampling_times</span>)
+
+<span class='no'>d_synth_DFOP_par</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></span>(<span class='no'>m_synth_DFOP_par</span>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k1</span> <span class='kw'>=</span> <span class='fl'>0.3</span>, <span class='kw'>k2</span> <span class='kw'>=</span> <span class='fl'>0.02</span>, <span class='kw'>g</span> <span class='kw'>=</span> <span class='fl'>0.7</span>,
+ <span class='kw'>f_parent_to_M1</span> <span class='kw'>=</span> <span class='fl'>0.6</span>, <span class='kw'>k_M1</span> <span class='kw'>=</span> <span class='fl'>0.04</span>,
+ <span class='kw'>f_parent_to_M2</span> <span class='kw'>=</span> <span class='fl'>0.4</span>, <span class='kw'>k_M2</span> <span class='kw'>=</span> <span class='fl'>0.01</span>),
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fl'>0</span>),
+ <span class='no'>sampling_times</span>)
+
+<span class='co'># Construct names for datasets with errors</span>
+<span class='no'>d_synth_names</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='st'>"d_synth_"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO_lin"</span>, <span class='st'>"SFO_par"</span>,
+ <span class='st'>"DFOP_lin"</span>, <span class='st'>"DFOP_par"</span>))
+
+<span class='co'># Original function used or adding errors. The add_err function now published</span>
+<span class='co'># with this package is a slightly generalised version where the names of</span>
+<span class='co'># secondary compartments that should have an initial value of zero (M1 and M2</span>
+<span class='co'># in this case) are not hardcoded any more.</span>
+<span class='co'># add_err = function(d, sdfunc, LOD = 0.1, reps = 2, seed = 123456789)</span>
+<span class='co'># {</span>
+<span class='co'># set.seed(seed)</span>
+<span class='co'># d_long = mkin_wide_to_long(d, time = "time")</span>
+<span class='co'># d_rep = data.frame(lapply(d_long, rep, each = 2))</span>
+<span class='co'># d_rep$value = rnorm(length(d_rep$value), d_rep$value, sdfunc(d_rep$value))</span>
+<span class='co'>#</span>
+<span class='co'># d_rep[d_rep$time == 0 &amp; d_rep$name %in% c("M1", "M2"), "value"] &lt;- 0</span>
+<span class='co'># d_NA &lt;- transform(d_rep, value = ifelse(value &lt; LOD, NA, value))</span>
+<span class='co'># d_NA$value &lt;- round(d_NA$value, 1)</span>
+<span class='co'># return(d_NA)</span>
+<span class='co'># }</span>
+
+<span class='co'># The following is the simplified version of the two-component model of Rocke</span>
+<span class='co'># and Lorenzato (1995)</span>
+<span class='no'>sdfunc_twocomp</span> <span class='kw'>=</span> <span class='kw'>function</span>(<span class='no'>value</span>, <span class='no'>sd_low</span>, <span class='no'>rsd_high</span>) {
+ <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>sqrt</a></span>(<span class='no'>sd_low</span>^<span class='fl'>2</span> + <span class='no'>value</span>^<span class='fl'>2</span> * <span class='no'>rsd_high</span>^<span class='fl'>2</span>)
+}
+
+<span class='co'># Add the errors.</span>
+<span class='kw'>for</span> (<span class='no'>d_synth_name</span> <span class='kw'>in</span> <span class='no'>d_synth_names</span>)
+{
+ <span class='no'>d_synth</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/get.html'>get</a></span>(<span class='no'>d_synth_name</span>)
+ <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='no'>d_synth_name</span>, <span class='st'>"_a"</span>), <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_synth</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>3</span>))
+ <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='no'>d_synth_name</span>, <span class='st'>"_b"</span>), <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_synth</span>, <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fl'>7</span>))
+ <span class='fu'><a href='https://rdrr.io/r/base/assign.html'>assign</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste0</a></span>(<span class='no'>d_synth_name</span>, <span class='st'>"_c"</span>), <span class='fu'><a href='add_err.html'>add_err</a></span>(<span class='no'>d_synth</span>,
+ <span class='kw'>function</span>(<span class='no'>value</span>) <span class='fu'>sdfunc_twocomp</span>(<span class='no'>value</span>, <span class='fl'>0.5</span>, <span class='fl'>0.07</span>)))
+
+}
+
+<span class='no'>d_synth_err_names</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(
+ <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/rep.html'>rep</a></span>(<span class='no'>d_synth_names</span>, <span class='kw'>each</span> <span class='kw'>=</span> <span class='fl'>3</span>), <span class='no'>letters</span>[<span class='fl'>1</span>:<span class='fl'>3</span>], <span class='kw'>sep</span> <span class='kw'>=</span> <span class='st'>"_"</span>)
+)
+
+<span class='co'># This is just one example of an evaluation using the kinetic model used for</span>
+<span class='co'># the generation of the data</span>
+ <span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_SFO_lin</span>, <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>1</span>]]$<span class='no'>data</span>,
+ <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+ <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='synthetic_data_for_UBA_2014-1.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.50.3
+#&gt; R version used for fitting: 4.0.0
+#&gt; Date of fit: Wed May 27 06:02:14 2020
+#&gt; Date of summary: Wed May 27 06:02:14 2020
+#&gt;
+#&gt; Equations:
+#&gt; d_parent/dt = - k_parent * parent
+#&gt; d_M1/dt = + f_parent_to_M1 * k_parent * parent - k_M1 * M1
+#&gt; d_M2/dt = + f_M1_to_M2 * k_M1 * M1 - k_M2 * M2
+#&gt;
+#&gt; Model predictions using solution type deSolve
+#&gt;
+#&gt; Fitted using 817 model solutions performed in 0.623 s
+#&gt;
+#&gt; Error model: Constant variance
+#&gt;
+#&gt; Error model algorithm: OLS
+#&gt;
+#&gt; Starting values for parameters to be optimised:
+#&gt; value type
+#&gt; parent_0 101.3500 state
+#&gt; k_parent 0.1000 deparm
+#&gt; k_M1 0.1001 deparm
+#&gt; k_M2 0.1002 deparm
+#&gt; f_parent_to_M1 0.5000 deparm
+#&gt; f_M1_to_M2 0.5000 deparm
+#&gt;
+#&gt; Starting values for the transformed parameters actually optimised:
+#&gt; value lower upper
+#&gt; parent_0 101.350000 -Inf Inf
+#&gt; log_k_parent -2.302585 -Inf Inf
+#&gt; log_k_M1 -2.301586 -Inf Inf
+#&gt; log_k_M2 -2.300587 -Inf Inf
+#&gt; f_parent_ilr_1 0.000000 -Inf Inf
+#&gt; f_M1_ilr_1 0.000000 -Inf Inf
+#&gt;
+#&gt; Fixed parameter values:
+#&gt; value type
+#&gt; M1_0 0 state
+#&gt; M2_0 0 state
+#&gt;
+#&gt; Results:
+#&gt;
+#&gt; AIC BIC logLik
+#&gt; 188.7274 200.3723 -87.36368
+#&gt;
+#&gt; Optimised, transformed parameters with symmetric confidence intervals:
+#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 102.1000 1.57000 98.8600 105.3000
+#&gt; log_k_parent -0.3020 0.03885 -0.3812 -0.2229
+#&gt; log_k_M1 -1.2070 0.07123 -1.3520 -1.0620
+#&gt; log_k_M2 -3.9010 0.06571 -4.0350 -3.7670
+#&gt; f_parent_ilr_1 0.8492 0.16640 0.5103 1.1880
+#&gt; f_M1_ilr_1 0.6780 0.17600 0.3196 1.0360
+#&gt; sigma 2.2730 0.25740 1.7490 2.7970
+#&gt;
+#&gt; Parameter correlation:
+#&gt; parent_0 log_k_parent log_k_M1 log_k_M2 f_parent_ilr_1
+#&gt; parent_0 1.000e+00 3.933e-01 -1.605e-01 2.819e-02 -4.624e-01
+#&gt; log_k_parent 3.933e-01 1.000e+00 -4.082e-01 7.166e-02 -5.682e-01
+#&gt; log_k_M1 -1.605e-01 -4.082e-01 1.000e+00 -3.929e-01 7.478e-01
+#&gt; log_k_M2 2.819e-02 7.166e-02 -3.929e-01 1.000e+00 -2.658e-01
+#&gt; f_parent_ilr_1 -4.624e-01 -5.682e-01 7.478e-01 -2.658e-01 1.000e+00
+#&gt; f_M1_ilr_1 1.614e-01 4.102e-01 -8.109e-01 5.419e-01 -8.605e-01
+#&gt; sigma -1.384e-07 -2.581e-07 9.499e-08 1.518e-07 1.236e-07
+#&gt; f_M1_ilr_1 sigma
+#&gt; parent_0 1.614e-01 -1.384e-07
+#&gt; log_k_parent 4.102e-01 -2.581e-07
+#&gt; log_k_M1 -8.109e-01 9.499e-08
+#&gt; log_k_M2 5.419e-01 1.518e-07
+#&gt; f_parent_ilr_1 -8.605e-01 1.236e-07
+#&gt; f_M1_ilr_1 1.000e+00 8.795e-09
+#&gt; sigma 8.795e-09 1.000e+00
+#&gt;
+#&gt; Backtransformed parameters:
+#&gt; Confidence intervals for internally transformed parameters are asymmetric.
+#&gt; t-test (unrealistically) based on the assumption of normal distribution
+#&gt; for estimators of untransformed parameters.
+#&gt; Estimate t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 102.10000 65.000 7.281e-36 98.86000 105.30000
+#&gt; k_parent 0.73930 25.740 2.948e-23 0.68310 0.80020
+#&gt; k_M1 0.29920 14.040 1.577e-15 0.25880 0.34590
+#&gt; k_M2 0.02023 15.220 1.653e-16 0.01769 0.02312
+#&gt; f_parent_to_M1 0.76870 18.370 7.295e-19 0.67300 0.84290
+#&gt; f_M1_to_M2 0.72290 14.500 6.418e-16 0.61110 0.81240
+#&gt; sigma 2.27300 8.832 2.161e-10 1.74900 2.79700
+#&gt;
+#&gt; FOCUS Chi2 error levels in percent:
+#&gt; err.min n.optim df
+#&gt; All data 8.454 6 17
+#&gt; parent 8.660 2 6
+#&gt; M1 10.583 2 5
+#&gt; M2 3.586 2 6
+#&gt;
+#&gt; Resulting formation fractions:
+#&gt; ff
+#&gt; parent_M1 0.7687
+#&gt; parent_sink 0.2313
+#&gt; M1_M2 0.7229
+#&gt; M1_sink 0.2771
+#&gt;
+#&gt; Estimated disappearance times:
+#&gt; DT50 DT90
+#&gt; parent 0.9376 3.114
+#&gt; M1 2.3170 7.697
+#&gt; M2 34.2689 113.839
+#&gt;
+#&gt; Data:
+#&gt; time variable observed predicted residual
+#&gt; 0 parent 101.5 1.021e+02 -0.56248
+#&gt; 0 parent 101.2 1.021e+02 -0.86248
+#&gt; 1 parent 53.9 4.873e+01 5.17118
+#&gt; 1 parent 47.5 4.873e+01 -1.22882
+#&gt; 3 parent 10.4 1.111e+01 -0.70773
+#&gt; 3 parent 7.6 1.111e+01 -3.50773
+#&gt; 7 parent 1.1 5.772e-01 0.52283
+#&gt; 7 parent 0.3 5.772e-01 -0.27717
+#&gt; 14 parent 3.5 3.264e-03 3.49674
+#&gt; 28 parent 3.2 1.045e-07 3.20000
+#&gt; 90 parent 0.6 9.535e-10 0.60000
+#&gt; 120 parent 3.5 -5.941e-10 3.50000
+#&gt; 1 M1 36.4 3.479e+01 1.61088
+#&gt; 1 M1 37.4 3.479e+01 2.61088
+#&gt; 3 M1 34.3 3.937e+01 -5.07027
+#&gt; 3 M1 39.8 3.937e+01 0.42973
+#&gt; 7 M1 15.1 1.549e+01 -0.38715
+#&gt; 7 M1 17.8 1.549e+01 2.31285
+#&gt; 14 M1 5.8 1.995e+00 3.80469
+#&gt; 14 M1 1.2 1.995e+00 -0.79531
+#&gt; 60 M1 0.5 2.111e-06 0.50000
+#&gt; 90 M1 3.2 -9.676e-10 3.20000
+#&gt; 120 M1 1.5 7.671e-10 1.50000
+#&gt; 120 M1 0.6 7.671e-10 0.60000
+#&gt; 1 M2 4.8 4.455e+00 0.34517
+#&gt; 3 M2 20.9 2.153e+01 -0.62527
+#&gt; 3 M2 19.3 2.153e+01 -2.22527
+#&gt; 7 M2 42.0 4.192e+01 0.07941
+#&gt; 7 M2 43.1 4.192e+01 1.17941
+#&gt; 14 M2 49.4 4.557e+01 3.83353
+#&gt; 14 M2 44.3 4.557e+01 -1.26647
+#&gt; 28 M2 34.6 3.547e+01 -0.87275
+#&gt; 28 M2 33.0 3.547e+01 -2.47275
+#&gt; 60 M2 18.8 1.858e+01 0.21837
+#&gt; 60 M2 17.6 1.858e+01 -0.98163
+#&gt; 90 M2 10.6 1.013e+01 0.47130
+#&gt; 90 M2 10.8 1.013e+01 0.67130
+#&gt; 120 M2 9.8 5.521e+00 4.27893
+#&gt; 120 M2 3.3 5.521e+00 -2.22107</div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/test_data_from_UBA_2014-1.png b/docs/dev/reference/test_data_from_UBA_2014-1.png
new file mode 100644
index 00000000..431181cf
--- /dev/null
+++ b/docs/dev/reference/test_data_from_UBA_2014-1.png
Binary files differ
diff --git a/docs/dev/reference/test_data_from_UBA_2014-2.png b/docs/dev/reference/test_data_from_UBA_2014-2.png
new file mode 100644
index 00000000..4a064163
--- /dev/null
+++ b/docs/dev/reference/test_data_from_UBA_2014-2.png
Binary files differ
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..291e3959
--- /dev/null
+++ b/docs/dev/reference/test_data_from_UBA_2014.html
@@ -0,0 +1,251 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_2014 • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Three experimental datasets from two water sediment systems and one soil — test_data_from_UBA_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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Three experimental datasets from two water sediment systems and one soil</h1>
+
+ <div class="hidden name"><code>test_data_from_UBA_2014.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>The datasets were used for the comparative validation of several kinetic evaluation
+ software packages (Ranke, 2014).</p>
+ </div>
+
+ <pre class="usage"><span class='no'>test_data_from_UBA_2014</span></pre>
+
+
+ <h2 class="hasAnchor" id="format"><a class="anchor" href="#format"></a>Format</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>
+
+ <h2 class="hasAnchor" id="source"><a class="anchor" href="#source"></a>Source</h2>
+
+ <p>Ranke (2014) Prüfung und Validierung von Modellierungssoftware als Alternative
+ zu ModelMaker 4.0, Umweltbundesamt Projektnummer 27452</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'> <span class='co'># \dontrun{</span>
+ <span class='co'># This is a level P-II evaluation of the dataset according to the FOCUS kinetics</span>
+ <span class='co'># guidance. Due to the strong correlation of the parameter estimates, the</span>
+ <span class='co'># covariance matrix is not returned. Note that level P-II evaluations are</span>
+ <span class='co'># generally considered deprecated due to the frequent occurrence of such</span>
+ <span class='co'># large parameter correlations, among other reasons (e.g. the adequacy of the</span>
+ <span class='co'># model).</span>
+ <span class='no'>m_ws</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent_w</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"parent_s"</span>),
+ <span class='kw'>parent_s</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"parent_w"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> <span class='no'>f_river</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_ws</span>, <span class='no'>test_data_from_UBA_2014</span><span class='kw'>[[</span><span class='fl'>1</span>]]$<span class='no'>data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>f_river</span>)</div><div class='img'><img src='test_data_from_UBA_2014-1.png' alt='' width='700' height='433' /></div><div class='input'>
+ <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f_river</span>)$<span class='no'>bpar</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Could not calculate correlation; no covariance matrix</span></div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t) Lower Upper
+#&gt; parent_w_0 95.91998116 NA NA NA NA NA
+#&gt; k_parent_w 0.41145375 NA NA NA NA NA
+#&gt; k_parent_s 0.04663944 NA NA NA NA NA
+#&gt; f_parent_w_to_parent_s 0.12467894 NA NA NA NA NA
+#&gt; f_parent_s_to_parent_w 0.50000000 NA NA NA NA NA
+#&gt; sigma 3.13612618 NA NA NA NA NA</div><div class='input'> <span class='fu'><a href='mkinerrmin.html'>mkinerrmin</a></span>(<span class='no'>f_river</span>)</div><div class='output co'>#&gt; err.min n.optim df
+#&gt; All data 0.1090929 5 6
+#&gt; parent_w 0.0817436 3 3
+#&gt; parent_s 0.1619965 2 3</div><div class='input'>
+ <span class='co'># This is the evaluation used for the validation of software packages</span>
+ <span class='co'># in the expertise from 2014</span>
+ <span class='no'>m_soil</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)),
+ <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M3"</span>),
+ <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M3"</span>),
+ <span class='kw'>M3</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+ <span class='no'>f_soil</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_soil</span>, <span class='no'>test_data_from_UBA_2014</span><span class='kw'>[[</span><span class='fl'>3</span>]]$<span class='no'>data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'> <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>f_soil</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"topright"</span>, <span class='st'>"topright"</span>, <span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><div class='img'><img src='test_data_from_UBA_2014-2.png' alt='' width='700' height='433' /></div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>f_soil</span>)$<span class='no'>bpar</span></div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t) Lower
+#&gt; parent_0 76.55425584 0.859186419 89.1008681 1.113862e-26 74.755958720
+#&gt; k_parent 0.12081956 0.004601919 26.2541703 1.077361e-16 0.111561576
+#&gt; k_M1 0.84258629 0.806165149 1.0451783 1.545282e-01 0.113778910
+#&gt; k_M2 0.04210878 0.017083049 2.4649452 1.170195e-02 0.018013823
+#&gt; k_M3 0.01122919 0.007245870 1.5497364 6.885076e-02 0.002909418
+#&gt; f_parent_to_M1 0.32240193 0.240785518 1.3389590 9.819221e-02 NA
+#&gt; f_parent_to_M2 0.16099854 0.033691991 4.7785404 6.531224e-05 NA
+#&gt; f_M1_to_M3 0.27921506 0.269425582 1.0363346 1.565282e-01 0.022977955
+#&gt; f_M2_to_M3 0.55641331 0.595121774 0.9349571 1.807710e-01 0.008002320
+#&gt; sigma 1.14005399 0.149696423 7.6157731 1.727024e-07 0.826735778
+#&gt; Upper
+#&gt; parent_0 78.35255297
+#&gt; k_parent 0.13084582
+#&gt; k_M1 6.23974738
+#&gt; k_M2 0.09843271
+#&gt; k_M3 0.04334017
+#&gt; f_parent_to_M1 NA
+#&gt; f_parent_to_M2 NA
+#&gt; f_M1_to_M3 0.86450905
+#&gt; f_M2_to_M3 0.99489911
+#&gt; sigma 1.45337221</div><div class='input'> <span class='fu'><a href='mkinerrmin.html'>mkinerrmin</a></span>(<span class='no'>f_soil</span>)</div><div class='output co'>#&gt; err.min n.optim df
+#&gt; All data 0.09649963 9 20
+#&gt; parent 0.04721283 2 6
+#&gt; M1 0.26551208 2 5
+#&gt; M2 0.20327575 2 5
+#&gt; M3 0.05196550 3 4</div><div class='input'> # }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/transform_odeparms.html b/docs/dev/reference/transform_odeparms.html
new file mode 100644
index 00000000..d0858eda
--- /dev/null
+++ b/docs/dev/reference/transform_odeparms.html
@@ -0,0 +1,319 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Functions to transform and backtransform kinetic parameters for fitting — transform_odeparms" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Functions to transform and backtransform kinetic parameters for fitting</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/transform_odeparms.R'><code>R/transform_odeparms.R</code></a></small>
+ <div class="hidden name"><code>transform_odeparms.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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 <code><a href='ilr.html'>ilr</a></code> transformation is used.</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>transform_odeparms</span>(
+ <span class='no'>parms</span>,
+ <span class='no'>mkinmod</span>,
+ <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>
+)
+
+<span class='fu'>backtransform_odeparms</span>(
+ <span class='no'>transparms</span>,
+ <span class='no'>mkinmod</span>,
+ <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
+ <span class='kw'>transform_fractions</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>
+)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>parms</th>
+ <td><p>Parameters of kinetic models as used in the differential
+equations.</p></td>
+ </tr>
+ <tr>
+ <th>mkinmod</th>
+ <td><p>The kinetic model of class <code><a href='mkinmod.html'>mkinmod</a></code>, containing
+the names of the model variables that are needed for grouping the
+formation fractions before <code><a href='ilr.html'>ilr</a></code> transformation, the parameter
+names and the information if the pathway to sink is included in the model.</p></td>
+ </tr>
+ <tr>
+ <th>transform_rates</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>transform_fractions</th>
+ <td><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 and HS models are also transformed, as they can also
+be seen as compositional data. The transformation used for these
+transformations is the <code><a href='ilr.html'>ilr</a></code> transformation.</p></td>
+ </tr>
+ <tr>
+ <th>transparms</th>
+ <td><p>Transformed parameters of kinetic models as used in the
+fitting procedure.</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>A vector of transformed or backtransformed parameters</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>The transformation of sets of formation fractions is fragile, as it supposes
+the same ordering of the components in forward and backward transformation.
+This is no problem for the internal use in <code><a href='mkinfit.html'>mkinfit</a></code>.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'>
+<span class='no'>SFO_SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span>
+<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='no'>fit.s</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit</span>)
+<span class='co'># Transformed and backtransformed parameters</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.s</span>$<span class='no'>par</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 99.598 1.5702 96.4038 102.793
+#&gt; log_k_parent -2.316 0.0409 -2.3988 -2.233
+#&gt; log_k_m1 -5.248 0.1332 -5.5184 -4.977
+#&gt; f_parent_ilr_1 0.041 0.0631 -0.0875 0.169
+#&gt; sigma 3.126 0.3585 2.3961 3.855</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.s</span>$<span class='no'>bpar</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 99.59848 1.57022 63.43 2.30e-36 96.40384 102.7931
+#&gt; k_parent 0.09870 0.00403 24.47 4.96e-23 0.09082 0.1073
+#&gt; k_m1 0.00526 0.00070 7.51 6.16e-09 0.00401 0.0069
+#&gt; f_parent_to_m1 0.51448 0.02230 23.07 3.10e-22 0.46912 0.5596
+#&gt; sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.8549</div><div class='input'>
+<span class='co'># \dontrun{</span>
+<span class='co'># Compare to the version without transforming rate parameters</span>
+<span class='no'>fit.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>transform_rates</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='output co'>#&gt; <span class='error'>Error in if (cost &lt; cost.current) { assign("cost.current", cost, inherits = TRUE) if (!quiet) cat(ifelse(OLS, "Sum of squared residuals", "Negative log-likelihood"), " at call ", calls, ": ", cost.current, "\n", sep = "")}: missing value where TRUE/FALSE needed</span></div><div class='output co'>#&gt; <span class='message'>Timing stopped at: 0.003 0 0.003</span></div><div class='input'><span class='no'>fit.2.s</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.2</span>)</div><div class='output co'>#&gt; <span class='error'>Error in summary(fit.2): object 'fit.2' not found</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.2.s</span>$<span class='no'>par</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; <span class='error'>Error in print(fit.2.s$par, 3): object 'fit.2.s' not found</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.2.s</span>$<span class='no'>bpar</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; <span class='error'>Error in print(fit.2.s$bpar, 3): object 'fit.2.s' not found</span></div><div class='input'><span class='co'># }</span>
+
+<span class='no'>initials</span> <span class='kw'>&lt;-</span> <span class='no'>fit</span>$<span class='no'>start</span>$<span class='no'>value</span>
+<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>initials</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/colnames.html'>rownames</a></span>(<span class='no'>fit</span>$<span class='no'>start</span>)
+<span class='no'>transformed</span> <span class='kw'>&lt;-</span> <span class='no'>fit</span>$<span class='no'>start_transformed</span>$<span class='no'>value</span>
+<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>transformed</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/colnames.html'>rownames</a></span>(<span class='no'>fit</span>$<span class='no'>start_transformed</span>)
+<span class='fu'>transform_odeparms</span>(<span class='no'>initials</span>, <span class='no'>SFO_SFO</span>)</div><div class='output co'>#&gt; parent_0 log_k_parent log_k_m1 f_parent_ilr_1
+#&gt; 100.750000 -2.302585 -2.301586 0.000000 </div><div class='input'><span class='fu'>backtransform_odeparms</span>(<span class='no'>transformed</span>, <span class='no'>SFO_SFO</span>)</div><div class='output co'>#&gt; parent_0 k_parent k_m1 f_parent_to_m1
+#&gt; 100.7500 0.1000 0.1001 0.5000 </div><div class='input'>
+<span class='co'># \dontrun{</span>
+<span class='co'># The case of formation fractions</span>
+<span class='no'>SFO_SFO.ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+<span class='no'>fit.ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='no'>fit.ff.s</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.ff</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.ff.s</span>$<span class='no'>par</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 99.598 1.5702 96.4038 102.793
+#&gt; log_k_parent -2.316 0.0409 -2.3988 -2.233
+#&gt; log_k_m1 -5.248 0.1332 -5.5184 -4.977
+#&gt; f_parent_ilr_1 0.041 0.0631 -0.0875 0.169
+#&gt; sigma 3.126 0.3585 2.3961 3.855</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.ff.s</span>$<span class='no'>bpar</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 99.59848 1.57022 63.43 2.30e-36 96.40384 102.7931
+#&gt; k_parent 0.09870 0.00403 24.47 4.96e-23 0.09082 0.1073
+#&gt; k_m1 0.00526 0.00070 7.51 6.16e-09 0.00401 0.0069
+#&gt; f_parent_to_m1 0.51448 0.02230 23.07 3.10e-22 0.46912 0.5596
+#&gt; sigma 3.12550 0.35852 8.72 2.24e-10 2.39609 3.8549</div><div class='input'><span class='no'>initials</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"f_parent_to_m1"</span> <span class='kw'>=</span> <span class='fl'>0.5</span>)
+<span class='no'>transformed</span> <span class='kw'>&lt;-</span> <span class='fu'>transform_odeparms</span>(<span class='no'>initials</span>, <span class='no'>SFO_SFO.ff</span>)
+<span class='fu'>backtransform_odeparms</span>(<span class='no'>transformed</span>, <span class='no'>SFO_SFO.ff</span>)</div><div class='output co'>#&gt; f_parent_to_m1
+#&gt; 0.5 </div><div class='input'>
+<span class='co'># And without sink</span>
+<span class='no'>SFO_SFO.ff.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(
+ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>, <span class='kw'>sink</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>),
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>),
+ <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'>
+
+<span class='no'>fit.ff.2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO.ff.2</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; <span class='warning'>Warning: Observations with value of zero were removed from the data</span></div><div class='input'><span class='no'>fit.ff.2.s</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>fit.ff.2</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.ff.2.s</span>$<span class='no'>par</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; Estimate Std. Error Lower Upper
+#&gt; parent_0 84.79 3.012 78.67 90.91
+#&gt; log_k_parent -2.76 0.082 -2.92 -2.59
+#&gt; log_k_m1 -4.21 0.123 -4.46 -3.96
+#&gt; sigma 8.22 0.943 6.31 10.14</div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>fit.ff.2.s</span>$<span class='no'>bpar</span>, <span class='fl'>3</span>)</div><div class='output co'>#&gt; Estimate se_notrans t value Pr(&gt;t) Lower Upper
+#&gt; parent_0 84.7916 3.01203 28.15 1.92e-25 78.6704 90.913
+#&gt; k_parent 0.0635 0.00521 12.19 2.91e-14 0.0538 0.075
+#&gt; k_m1 0.0148 0.00182 8.13 8.81e-10 0.0115 0.019
+#&gt; sigma 8.2229 0.94323 8.72 1.73e-10 6.3060 10.140</div><div class='input'># }
+
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/update.mkinfit-1.png b/docs/dev/reference/update.mkinfit-1.png
new file mode 100644
index 00000000..4cbefa56
--- /dev/null
+++ b/docs/dev/reference/update.mkinfit-1.png
Binary files differ
diff --git a/docs/dev/reference/update.mkinfit-2.png b/docs/dev/reference/update.mkinfit-2.png
new file mode 100644
index 00000000..f432f6f8
--- /dev/null
+++ b/docs/dev/reference/update.mkinfit-2.png
Binary files differ
diff --git a/docs/dev/reference/update.mkinfit.html b/docs/dev/reference/update.mkinfit.html
new file mode 100644
index 00000000..d6363edf
--- /dev/null
+++ b/docs/dev/reference/update.mkinfit.html
@@ -0,0 +1,214 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<title>Update an mkinfit model with different arguments — update.mkinfit • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Update an mkinfit model with different arguments — update.mkinfit" />
+<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">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
+
+<!--[if lt IE 9]>
+<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+<![endif]-->
+
+
+
+ </head>
+
+ <body data-spy="scroll" data-target="#toc">
+ <div class="container template-reference-topic">
+ <header>
+ <div class="navbar navbar-default navbar-fixed-top" role="navigation">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-danger" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ </span>
+ </div>
+
+ <div id="navbar" class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li>
+ <a href="../reference/index.html">Functions and data</a>
+</li>
+<li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
+ Articles
+
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu">
+ <li>
+ <a href="../articles/mkin.html">Introduction to mkin</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
+ </li>
+ <li>
+ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
+ </li>
+ <li>
+ <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li>
+ <a href="http://github.com/jranke/mkin/">
+ <span class="fab fa fab fa-github fa-lg"></span>
+
+ </a>
+</li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div><!--/.container -->
+</div><!--/.navbar -->
+
+
+
+ </header>
+
+<div class="row">
+ <div class="col-md-9 contents">
+ <div class="page-header">
+ <h1>Update an mkinfit model with different arguments</h1>
+ <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/update.mkinfit.R'><code>R/update.mkinfit.R</code></a></small>
+ <div class="hidden name"><code>update.mkinfit.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <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>
+
+ <pre class="usage"><span class='co'># S3 method for mkinfit</span>
+<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>object</span>, <span class='no'>...</span>, <span class='kw'>evaluate</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
+
+ <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>object</th>
+ <td><p>An mkinfit object to be updated</p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><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></td>
+ </tr>
+ <tr>
+ <th>evaluate</th>
+ <td><p>Should the call be evaluated or returned as a call</p></td>
+ </tr>
+ </table>
+
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># \dontrun{</span>
+<span class='no'>fit</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"SFO"</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#&gt; parent_0 k_parent_sink sigma
+#&gt; 99.44423886 0.09793574 3.39632469 </div><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_err</a></span>(<span class='no'>fit</span>)</div><div class='img'><img src='update.mkinfit-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='no'>fit_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>fit</span>, <span class='kw'>error_model</span> <span class='kw'>=</span> <span class='st'>"tc"</span>)
+<span class='fu'><a href='parms.html'>parms</a></span>(<span class='no'>fit_2</span>)</div><div class='output co'>#&gt; parent_0 k_parent_sink sigma_low rsd_high
+#&gt; 1.008549e+02 1.005665e-01 3.752222e-03 6.763434e-02 </div><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_err</a></span>(<span class='no'>fit_2</span>)</div><div class='img'><img src='update.mkinfit-2.png' alt='' width='700' height='433' /></div><div class='input'># }
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+

Contact - Imprint