aboutsummaryrefslogtreecommitdiff
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
parent675a733fa2acc08daabb9b8b571c7d658f281f73 (diff)
Create up to date pkgdown docs in development mode
-rw-r--r--README.md2
-rw-r--r--_pkgdown.yml3
-rw-r--r--docs/dev/404.html175
-rw-r--r--docs/dev/articles/FOCUS_D.html330
-rw-r--r--docs/dev/articles/FOCUS_D_files/figure-html/plot-1.pngbin0 -> 101350 bytes
-rw-r--r--docs/dev/articles/FOCUS_D_files/figure-html/plot_2-1.pngbin0 -> 15733 bytes
-rw-r--r--docs/dev/articles/FOCUS_L.html797
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.pngbin0 -> 29158 bytes
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.pngbin0 -> 54890 bytes
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.pngbin0 -> 22017 bytes
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.pngbin0 -> 38623 bytes
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.pngbin0 -> 23429 bytes
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-5-1.pngbin0 -> 14826 bytes
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.pngbin0 -> 23884 bytes
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.pngbin0 -> 27992 bytes
-rw-r--r--docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-9-1.pngbin0 -> 28432 bytes
-rw-r--r--docs/dev/articles/index.html188
-rw-r--r--docs/dev/articles/mkin.html261
-rw-r--r--docs/dev/articles/mkin_files/figure-html/unnamed-chunk-2-1.pngbin0 -> 116136 bytes
-rw-r--r--docs/dev/articles/twa.html175
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z.html364
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.pngbin0 -> 88629 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.pngbin0 -> 133239 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.pngbin0 -> 132494 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.pngbin0 -> 99564 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.pngbin0 -> 22623 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.pngbin0 -> 88629 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.pngbin0 -> 88213 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.pngbin0 -> 104162 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.pngbin0 -> 133000 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.pngbin0 -> 132462 bytes
-rw-r--r--docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.pngbin0 -> 110758 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples.html989
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p10-1.pngbin0 -> 53828 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p11-1.pngbin0 -> 51210 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p12a-1.pngbin0 -> 54489 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p12b-1.pngbin0 -> 47070 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p13-1.pngbin0 -> 51343 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p14-1.pngbin0 -> 53898 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p15a-1.pngbin0 -> 51113 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p15b-1.pngbin0 -> 52979 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p16-1.pngbin0 -> 62414 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p5a-1.pngbin0 -> 55286 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p5b-1.pngbin0 -> 53505 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p6-1.pngbin0 -> 54907 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p7-1.pngbin0 -> 66709 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p8-1.pngbin0 -> 61400 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p9a-1.pngbin0 -> 53005 bytes
-rw-r--r--docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p9b-1.pngbin0 -> 49914 bytes
-rw-r--r--docs/dev/articles/web_only/benchmarks.html391
-rw-r--r--docs/dev/articles/web_only/compiled_models.html221
-rw-r--r--docs/dev/authors.html186
-rw-r--r--docs/dev/bootstrap-toc.css60
-rw-r--r--docs/dev/bootstrap-toc.js159
-rw-r--r--docs/dev/docsearch.css148
-rw-r--r--docs/dev/docsearch.js85
-rw-r--r--docs/dev/index.html251
-rw-r--r--docs/dev/link.svg12
-rw-r--r--docs/dev/news/index.html845
-rw-r--r--docs/dev/pkgdown.css367
-rw-r--r--docs/dev/pkgdown.js108
-rw-r--r--docs/dev/pkgdown.yml17
-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
-rw-r--r--docs/dev/sitemap.xml222
-rw-r--r--vignettes/web_only/mkin_benchmarks.rdabin856 -> 929 bytes
187 files changed, 24660 insertions, 1 deletions
diff --git a/README.md b/README.md
index bb26fc66..cd6eb5c7 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
The R package **mkin** provides calculation routines for the analysis of
chemical degradation data, including <b>m</b>ulticompartment <b>kin</b>etics as
needed for modelling the formation and decline of transformation products, or
-if several compartments are involved.
+if several degradation compartments are involved.
## Installation
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 8c5122e6..02cc34a8 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -2,6 +2,9 @@ url: https://pkgdown.jrwb.de/mkin
title: mkin
+development:
+ mode: devel
+
template:
bootswatch: spacelab
diff --git a/docs/dev/404.html b/docs/dev/404.html
new file mode 100644
index 00000000..535f64b6
--- /dev/null
+++ b/docs/dev/404.html
@@ -0,0 +1,175 @@
+<!-- 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>Page not found (404) • 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="https://pkgdown.jrwb.de/mkin/bootstrap-toc.css">
+<script src="https://pkgdown.jrwb.de/mkin/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="https://pkgdown.jrwb.de/mkin/pkgdown.css" rel="stylesheet">
+<script src="https://pkgdown.jrwb.de/mkin/pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Page not found (404)" />
+
+
+<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-title-body">
+ <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="https://pkgdown.jrwb.de/mkin/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>Page not found (404)</h1>
+ </div>
+
+Content not found. Please use links in the navbar.
+
+ </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/articles/FOCUS_D.html b/docs/dev/articles/FOCUS_D.html
new file mode 100644
index 00000000..0b3ae03a
--- /dev/null
+++ b/docs/dev/articles/FOCUS_D.html
@@ -0,0 +1,330 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Example evaluation of FOCUS Example Dataset D • 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 evaluation of FOCUS Example Dataset D">
+<meta property="og:description" content="mkin">
+<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-article">
+ <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 toc-ignore">
+ <h1 data-toc-skip>Example evaluation of FOCUS Example Dataset D</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2020-05-27</h4>
+
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/FOCUS_D.rmd"><code>vignettes/FOCUS_D.rmd</code></a></small>
+ <div class="hidden name"><code>FOCUS_D.rmd</code></div>
+
+ </div>
+
+
+
+<p>This is just a very simple vignette showing how to fit a degradation model for a parent compound with one transformation product using <code>mkin</code>. After loading the library we look at the data. We have observed concentrations in the column named <code>value</code> at the times specified in column <code>time</code> for the two observed variables named <code>parent</code> and <code>m1</code>.</p>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">mkin</span>, <span class="kw">quietly</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="no">FOCUS_2006_D</span>)</pre></body></html></div>
+<pre><code>## name time value
+## 1 parent 0 99.46
+## 2 parent 0 102.04
+## 3 parent 1 93.50
+## 4 parent 1 92.50
+## 5 parent 3 63.23
+## 6 parent 3 68.99
+## 7 parent 7 52.32
+## 8 parent 7 55.13
+## 9 parent 14 27.27
+## 10 parent 14 26.64
+## 11 parent 21 11.50
+## 12 parent 21 11.64
+## 13 parent 35 2.85
+## 14 parent 35 2.91
+## 15 parent 50 0.69
+## 16 parent 50 0.63
+## 17 parent 75 0.05
+## 18 parent 75 0.06
+## 19 parent 100 NA
+## 20 parent 100 NA
+## 21 parent 120 NA
+## 22 parent 120 NA
+## 23 m1 0 0.00
+## 24 m1 0 0.00
+## 25 m1 1 4.84
+## 26 m1 1 5.64
+## 27 m1 3 12.91
+## 28 m1 3 12.96
+## 29 m1 7 22.97
+## 30 m1 7 24.47
+## 31 m1 14 41.69
+## 32 m1 14 33.21
+## 33 m1 21 44.37
+## 34 m1 21 46.44
+## 35 m1 35 41.22
+## 36 m1 35 37.95
+## 37 m1 50 41.19
+## 38 m1 50 40.01
+## 39 m1 75 40.09
+## 40 m1 75 33.85
+## 41 m1 100 31.04
+## 42 m1 100 33.13
+## 43 m1 120 25.15
+## 44 m1 120 33.31</code></pre>
+<p>Next we specify the degradation model: The parent compound degrades with simple first-order kinetics (SFO) to one metabolite named m1, which also degrades with SFO kinetics.</p>
+<p>The call to mkinmod returns a degradation model. The differential equations represented in R code can be found in the character vector <code>$diffs</code> of the <code>mkinmod</code> object. If a C compiler (gcc) is installed and functional, the differential equation model will be compiled from auto-generated C code.</p>
+<div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="no">SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"m1"</span>), <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">SFO_SFO</span>$<span class="no">diffs</span>)</pre></body></html></div>
+<pre><code>## parent
+## "d_parent = - k_parent * parent"
+## m1
+## "d_m1 = + f_parent_to_m1 * k_parent * parent - k_m1 * m1"</code></pre>
+<p>We do the fitting without progress report (<code>quiet = TRUE</code>).</p>
+<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="no">fit</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_2006_D</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE): Observations with value
+## of zero were removed from the data</code></pre>
+<p>A plot of the fit including a residual plot for both observed variables is obtained using the <code>plot_sep</code> method for <code>mkinfit</code> objects, which shows separate graphs for all compounds and their residuals.</p>
+<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="fu"><a href="../reference/plot.mkinfit.html">plot_sep</a></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>))</pre></body></html></div>
+<p><img src="FOCUS_D_files/figure-html/plot-1.png" width="768"></p>
+<p>Confidence intervals for the parameter estimates are obtained using the <code>mkinparplot</code> function.</p>
+<div class="sourceCode" id="cb10"><html><body><pre class="r"><span class="fu"><a href="../reference/mkinparplot.html">mkinparplot</a></span>(<span class="no">fit</span>)</pre></body></html></div>
+<p><img src="FOCUS_D_files/figure-html/plot_2-1.png" width="768"></p>
+<p>A comprehensive report of the results is obtained using the <code>summary</code> method for <code>mkinfit</code> objects.</p>
+<div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">fit</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.3
+## R version used for fitting: 4.0.0
+## Date of fit: Wed May 27 06:02:21 2020
+## Date of summary: Wed May 27 06:02:21 2020
+##
+## Equations:
+## d_parent/dt = - k_parent * parent
+## d_m1/dt = + f_parent_to_m1 * k_parent * parent - k_m1 * m1
+##
+## Model predictions using solution type analytical
+##
+## Fitted using 421 model solutions performed in 0.177 s
+##
+## Error model: Constant variance
+##
+## Error model algorithm: OLS
+##
+## Starting values for parameters to be optimised:
+## value type
+## parent_0 100.7500 state
+## k_parent 0.1000 deparm
+## k_m1 0.1001 deparm
+## f_parent_to_m1 0.5000 deparm
+##
+## Starting values for the transformed parameters actually optimised:
+## value lower upper
+## parent_0 100.750000 -Inf Inf
+## log_k_parent -2.302585 -Inf Inf
+## log_k_m1 -2.301586 -Inf Inf
+## f_parent_ilr_1 0.000000 -Inf Inf
+##
+## Fixed parameter values:
+## value type
+## m1_0 0 state
+##
+## Results:
+##
+## AIC BIC logLik
+## 204.4486 212.6365 -97.22429
+##
+## Optimised, transformed parameters with symmetric confidence intervals:
+## Estimate Std. Error Lower Upper
+## parent_0 99.60000 1.57000 96.40000 102.8000
+## log_k_parent -2.31600 0.04087 -2.39900 -2.2330
+## log_k_m1 -5.24800 0.13320 -5.51800 -4.9770
+## f_parent_ilr_1 0.04096 0.06312 -0.08746 0.1694
+## sigma 3.12600 0.35850 2.39600 3.8550
+##
+## Parameter correlation:
+## parent_0 log_k_parent log_k_m1 f_parent_ilr_1 sigma
+## parent_0 1.000e+00 5.174e-01 -1.688e-01 -5.471e-01 -3.190e-07
+## log_k_parent 5.174e-01 1.000e+00 -3.263e-01 -5.426e-01 3.168e-07
+## log_k_m1 -1.688e-01 -3.263e-01 1.000e+00 7.478e-01 -1.406e-07
+## f_parent_ilr_1 -5.471e-01 -5.426e-01 7.478e-01 1.000e+00 -1.587e-10
+## sigma -3.190e-07 3.168e-07 -1.406e-07 -1.587e-10 1.000e+00
+##
+## Backtransformed parameters:
+## Confidence intervals for internally transformed parameters are asymmetric.
+## t-test (unrealistically) based on the assumption of normal distribution
+## for estimators of untransformed parameters.
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 99.600000 63.430 2.298e-36 96.400000 1.028e+02
+## k_parent 0.098700 24.470 4.955e-23 0.090820 1.073e-01
+## k_m1 0.005261 7.510 6.165e-09 0.004012 6.898e-03
+## f_parent_to_m1 0.514500 23.070 3.104e-22 0.469100 5.596e-01
+## sigma 3.126000 8.718 2.235e-10 2.396000 3.855e+00
+##
+## FOCUS Chi2 error levels in percent:
+## err.min n.optim df
+## All data 6.398 4 15
+## parent 6.459 2 7
+## m1 4.690 2 8
+##
+## Resulting formation fractions:
+## ff
+## parent_m1 0.5145
+## parent_sink 0.4855
+##
+## Estimated disappearance times:
+## DT50 DT90
+## parent 7.023 23.33
+## m1 131.761 437.70
+##
+## Data:
+## time variable observed predicted residual
+## 0 parent 99.46 99.59848 -1.385e-01
+## 0 parent 102.04 99.59848 2.442e+00
+## 1 parent 93.50 90.23787 3.262e+00
+## 1 parent 92.50 90.23787 2.262e+00
+## 3 parent 63.23 74.07319 -1.084e+01
+## 3 parent 68.99 74.07319 -5.083e+00
+## 7 parent 52.32 49.91206 2.408e+00
+## 7 parent 55.13 49.91206 5.218e+00
+## 14 parent 27.27 25.01257 2.257e+00
+## 14 parent 26.64 25.01257 1.627e+00
+## 21 parent 11.50 12.53462 -1.035e+00
+## 21 parent 11.64 12.53462 -8.946e-01
+## 35 parent 2.85 3.14787 -2.979e-01
+## 35 parent 2.91 3.14787 -2.379e-01
+## 50 parent 0.69 0.71624 -2.624e-02
+## 50 parent 0.63 0.71624 -8.624e-02
+## 75 parent 0.05 0.06074 -1.074e-02
+## 75 parent 0.06 0.06074 -7.381e-04
+## 1 m1 4.84 4.80296 3.704e-02
+## 1 m1 5.64 4.80296 8.370e-01
+## 3 m1 12.91 13.02400 -1.140e-01
+## 3 m1 12.96 13.02400 -6.400e-02
+## 7 m1 22.97 25.04476 -2.075e+00
+## 7 m1 24.47 25.04476 -5.748e-01
+## 14 m1 41.69 36.69002 5.000e+00
+## 14 m1 33.21 36.69002 -3.480e+00
+## 21 m1 44.37 41.65310 2.717e+00
+## 21 m1 46.44 41.65310 4.787e+00
+## 35 m1 41.22 43.31312 -2.093e+00
+## 35 m1 37.95 43.31312 -5.363e+00
+## 50 m1 41.19 41.21831 -2.831e-02
+## 50 m1 40.01 41.21831 -1.208e+00
+## 75 m1 40.09 36.44703 3.643e+00
+## 75 m1 33.85 36.44703 -2.597e+00
+## 100 m1 31.04 31.98163 -9.416e-01
+## 100 m1 33.13 31.98163 1.148e+00
+## 120 m1 25.15 28.78984 -3.640e+00
+## 120 m1 33.31 28.78984 4.520e+00</code></pre>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+
+ </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/articles/FOCUS_D_files/figure-html/plot-1.png b/docs/dev/articles/FOCUS_D_files/figure-html/plot-1.png
new file mode 100644
index 00000000..306244b3
--- /dev/null
+++ b/docs/dev/articles/FOCUS_D_files/figure-html/plot-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_D_files/figure-html/plot_2-1.png b/docs/dev/articles/FOCUS_D_files/figure-html/plot_2-1.png
new file mode 100644
index 00000000..158e3c50
--- /dev/null
+++ b/docs/dev/articles/FOCUS_D_files/figure-html/plot_2-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L.html b/docs/dev/articles/FOCUS_L.html
new file mode 100644
index 00000000..91043d0f
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L.html
@@ -0,0 +1,797 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Example evaluation of FOCUS Laboratory Data L1 to L3 • 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 evaluation of FOCUS Laboratory Data L1 to L3">
+<meta property="og:description" content="mkin">
+<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-article">
+ <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 toc-ignore">
+ <h1 data-toc-skip>Example evaluation of FOCUS Laboratory Data L1 to L3</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2020-05-27</h4>
+
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/FOCUS_L.rmd"><code>vignettes/FOCUS_L.rmd</code></a></small>
+ <div class="hidden name"><code>FOCUS_L.rmd</code></div>
+
+ </div>
+
+
+
+<div id="laboratory-data-l1" class="section level1">
+<h1 class="hasAnchor">
+<a href="#laboratory-data-l1" class="anchor"></a>Laboratory Data L1</h1>
+<p>The following code defines example dataset L1 from the FOCUS kinetics report, p. 284:</p>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="st">"mkin"</span>, <span class="kw">quietly</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="no">FOCUS_2006_L1</span> <span class="kw">=</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/rep.html">rep</a></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">2</span>, <span class="fl">3</span>, <span class="fl">5</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">21</span>, <span class="fl">30</span>), <span class="kw">each</span> <span class="kw">=</span> <span class="fl">2</span>),
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">88.3</span>, <span class="fl">91.4</span>, <span class="fl">85.6</span>, <span class="fl">84.5</span>, <span class="fl">78.9</span>, <span class="fl">77.6</span>,
+ <span class="fl">72.0</span>, <span class="fl">71.9</span>, <span class="fl">50.3</span>, <span class="fl">59.4</span>, <span class="fl">47.0</span>, <span class="fl">45.1</span>,
+ <span class="fl">27.7</span>, <span class="fl">27.3</span>, <span class="fl">10.0</span>, <span class="fl">10.4</span>, <span class="fl">2.9</span>, <span class="fl">4.0</span>))
+<span class="no">FOCUS_2006_L1_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_L1</span>)</pre></body></html></div>
+<p>Here we use the assumptions of simple first order (SFO), the case of declining rate constant over time (FOMC) and the case of two different phases of the kinetics (DFOP). For a more detailed discussion of the models, please see the FOCUS kinetics report.</p>
+<p>Since mkin version 0.9-32 (July 2014), we can use shorthand notation like <code>"SFO"</code> for parent only degradation models. The following two lines fit the model and produce the summary report of the model fit. This covers the numerical analysis given in the FOCUS report.</p>
+<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="no">m.L1.SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, <span class="no">FOCUS_2006_L1_mkin</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">m.L1.SFO</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.3
+## R version used for fitting: 4.0.0
+## Date of fit: Wed May 27 06:02:23 2020
+## Date of summary: Wed May 27 06:02:23 2020
+##
+## Equations:
+## d_parent/dt = - k_parent_sink * parent
+##
+## Model predictions using solution type analytical
+##
+## Fitted using 133 model solutions performed in 0.03 s
+##
+## Error model: Constant variance
+##
+## Error model algorithm: OLS
+##
+## Starting values for parameters to be optimised:
+## value type
+## parent_0 89.85 state
+## k_parent_sink 0.10 deparm
+##
+## Starting values for the transformed parameters actually optimised:
+## value lower upper
+## parent_0 89.850000 -Inf Inf
+## log_k_parent_sink -2.302585 -Inf Inf
+##
+## Fixed parameter values:
+## None
+##
+## Results:
+##
+## AIC BIC logLik
+## 93.88778 96.5589 -43.94389
+##
+## Optimised, transformed parameters with symmetric confidence intervals:
+## Estimate Std. Error Lower Upper
+## parent_0 92.470 1.28200 89.740 95.200
+## log_k_parent_sink -2.347 0.03763 -2.428 -2.267
+## sigma 2.780 0.46330 1.792 3.767
+##
+## Parameter correlation:
+## parent_0 log_k_parent_sink sigma
+## parent_0 1.000e+00 6.186e-01 -1.712e-09
+## log_k_parent_sink 6.186e-01 1.000e+00 -3.237e-09
+## sigma -1.712e-09 -3.237e-09 1.000e+00
+##
+## Backtransformed parameters:
+## Confidence intervals for internally transformed parameters are asymmetric.
+## t-test (unrealistically) based on the assumption of normal distribution
+## for estimators of untransformed parameters.
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 92.47000 72.13 8.824e-21 89.74000 95.2000
+## k_parent_sink 0.09561 26.57 2.487e-14 0.08824 0.1036
+## sigma 2.78000 6.00 1.216e-05 1.79200 3.7670
+##
+## FOCUS Chi2 error levels in percent:
+## err.min n.optim df
+## All data 3.424 2 7
+## parent 3.424 2 7
+##
+## Estimated disappearance times:
+## DT50 DT90
+## parent 7.249 24.08
+##
+## Data:
+## time variable observed predicted residual
+## 0 parent 88.3 92.471 -4.1710
+## 0 parent 91.4 92.471 -1.0710
+## 1 parent 85.6 84.039 1.5610
+## 1 parent 84.5 84.039 0.4610
+## 2 parent 78.9 76.376 2.5241
+## 2 parent 77.6 76.376 1.2241
+## 3 parent 72.0 69.412 2.5884
+## 3 parent 71.9 69.412 2.4884
+## 5 parent 50.3 57.330 -7.0301
+## 5 parent 59.4 57.330 2.0699
+## 7 parent 47.0 47.352 -0.3515
+## 7 parent 45.1 47.352 -2.2515
+## 14 parent 27.7 24.247 3.4528
+## 14 parent 27.3 24.247 3.0528
+## 21 parent 10.0 12.416 -2.4163
+## 21 parent 10.4 12.416 -2.0163
+## 30 parent 2.9 5.251 -2.3513
+## 30 parent 4.0 5.251 -1.2513</code></pre>
+<p>A plot of the fit is obtained with the plot function for mkinfit objects.</p>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">m.L1.SFO</span>, <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>, <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L1 - SFO"</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-4-1.png" width="576"></p>
+<p>The residual plot can be easily obtained by</p>
+<div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="fu"><a href="../reference/mkinresplot.html">mkinresplot</a></span>(<span class="no">m.L1.SFO</span>, <span class="kw">ylab</span> <span class="kw">=</span> <span class="st">"Observed"</span>, <span class="kw">xlab</span> <span class="kw">=</span> <span class="st">"Time"</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-5-1.png" width="576"></p>
+<p>For comparison, the FOMC model is fitted as well, and the <span class="math inline">\(\chi^2\)</span> error level is checked.</p>
+<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="no">m.L1.FOMC</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, <span class="no">FOCUS_2006_L1_mkin</span>, <span class="kw">quiet</span><span class="kw">=</span><span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet = TRUE): Optimisation did not converge:
+## false convergence (8)</code></pre>
+<div class="sourceCode" id="cb8"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">m.L1.FOMC</span>, <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>, <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L1 - FOMC"</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-6-1.png" width="576"></p>
+<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L1.FOMC</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
+<pre><code>## mkin version used for fitting: 0.9.50.3
+## R version used for fitting: 4.0.0
+## Date of fit: Wed May 27 06:02:24 2020
+## Date of summary: Wed May 27 06:02:24 2020
+##
+##
+## Warning: Optimisation did not converge:
+## false convergence (8)
+##
+##
+## Equations:
+## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
+##
+## Model predictions using solution type analytical
+##
+## Fitted using 899 model solutions performed in 0.204 s
+##
+## Error model: Constant variance
+##
+## Error model algorithm: OLS
+##
+## Starting values for parameters to be optimised:
+## value type
+## parent_0 89.85 state
+## alpha 1.00 deparm
+## beta 10.00 deparm
+##
+## Starting values for the transformed parameters actually optimised:
+## value lower upper
+## parent_0 89.850000 -Inf Inf
+## log_alpha 0.000000 -Inf Inf
+## log_beta 2.302585 -Inf Inf
+##
+## Fixed parameter values:
+## None
+##
+## Results:
+##
+## AIC BIC logLik
+## 95.88835 99.44984 -43.94418
+##
+## Optimised, transformed parameters with symmetric confidence intervals:
+## Estimate Std. Error Lower Upper
+## parent_0 92.47 1.2800 89.730 95.220
+## log_alpha 10.58 NaN NaN NaN
+## log_beta 12.93 NaN NaN NaN
+## sigma 2.78 0.4507 1.813 3.747
+##
+## Parameter correlation:
+## parent_0 log_alpha log_beta sigma
+## parent_0 1.00000 NaN NaN 0.01452
+## log_alpha NaN 1 NaN NaN
+## log_beta NaN NaN 1 NaN
+## sigma 0.01452 NaN NaN 1.00000
+##
+## Backtransformed parameters:
+## Confidence intervals for internally transformed parameters are asymmetric.
+## t-test (unrealistically) based on the assumption of normal distribution
+## for estimators of untransformed parameters.
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 92.47 72.13000 1.052e-19 89.730 95.220
+## alpha 39440.00 0.02397 4.906e-01 NA NA
+## beta 412500.00 0.02397 4.906e-01 NA NA
+## sigma 2.78 6.00000 1.628e-05 1.813 3.747
+##
+## FOCUS Chi2 error levels in percent:
+## err.min n.optim df
+## All data 3.619 3 6
+## parent 3.619 3 6
+##
+## Estimated disappearance times:
+## DT50 DT90 DT50back
+## parent 7.249 24.08 7.249</code></pre>
+<p>We get a warning that the default optimisation algorithm <code>Port</code> did not converge, which is an indication that the model is overparameterised, <em>i.e.</em> contains too many parameters that are ill-defined as a consequence.</p>
+<p>And in fact, due to the higher number of parameters, and the lower number of degrees of freedom of the fit, the <span class="math inline">\(\chi^2\)</span> error level is actually higher for the FOMC model (3.6%) than for the SFO model (3.4%). Additionally, the parameters <code>log_alpha</code> and <code>log_beta</code> internally fitted in the model have excessive confidence intervals, that span more than 25 orders of magnitude (!) when backtransformed to the scale of <code>alpha</code> and <code>beta</code>. Also, the t-test for significant difference from zero does not indicate such a significant difference, with p-values greater than 0.1, and finally, the parameter correlation of <code>log_alpha</code> and <code>log_beta</code> is 1.000, clearly indicating that the model is overparameterised.</p>
+<p>The <span class="math inline">\(\chi^2\)</span> error levels reported in Appendix 3 and Appendix 7 to the FOCUS kinetics report are rounded to integer percentages and partly deviate by one percentage point from the results calculated by mkin. The reason for this is not known. However, mkin gives the same <span class="math inline">\(\chi^2\)</span> error levels as the kinfit package and the calculation routines of the kinfit package have been extensively compared to the results obtained by the KinGUI software, as documented in the kinfit package vignette. KinGUI was the first widely used standard package in this field. Also, the calculation of <span class="math inline">\(\chi^2\)</span> error levels was compared with KinGUII, CAKE and DegKin manager in a project sponsored by the German Umweltbundesamt <span class="citation">(Ranke 2014)</span>.</p>
+</div>
+<div id="laboratory-data-l2" class="section level1">
+<h1 class="hasAnchor">
+<a href="#laboratory-data-l2" class="anchor"></a>Laboratory Data L2</h1>
+<p>The following code defines example dataset L2 from the FOCUS kinetics report, p. 287:</p>
+<div class="sourceCode" id="cb14"><html><body><pre class="r"><span class="no">FOCUS_2006_L2</span> <span class="kw">=</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/rep.html">rep</a></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="kw">each</span> <span class="kw">=</span> <span class="fl">2</span>),
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">96.1</span>, <span class="fl">91.8</span>, <span class="fl">41.4</span>, <span class="fl">38.7</span>,
+ <span class="fl">19.3</span>, <span class="fl">22.3</span>, <span class="fl">4.6</span>, <span class="fl">4.6</span>,
+ <span class="fl">2.6</span>, <span class="fl">1.2</span>, <span class="fl">0.3</span>, <span class="fl">0.6</span>))
+<span class="no">FOCUS_2006_L2_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_L2</span>)</pre></body></html></div>
+<div id="sfo-fit-for-l2" class="section level2">
+<h2 class="hasAnchor">
+<a href="#sfo-fit-for-l2" class="anchor"></a>SFO fit for L2</h2>
+<p>Again, the SFO model is fitted and the result is plotted. The residual plot can be obtained simply by adding the argument <code>show_residuals</code> to the plot command.</p>
+<div class="sourceCode" id="cb15"><html><body><pre class="r"><span class="no">m.L2.SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, <span class="no">FOCUS_2006_L2_mkin</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">m.L2.SFO</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>,
+ <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L2 - SFO"</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-8-1.png" width="672"></p>
+<p>The <span class="math inline">\(\chi^2\)</span> error level of 14% suggests that the model does not fit very well. This is also obvious from the plots of the fit, in which we have included the residual plot.</p>
+<p>In the FOCUS kinetics report, it is stated that there is no apparent systematic error observed from the residual plot up to the measured DT90 (approximately at day 5), and there is an underestimation beyond that point.</p>
+<p>We may add that it is difficult to judge the random nature of the residuals just from the three samplings at days 0, 1 and 3. Also, it is not clear <em>a priori</em> why a consistent underestimation after the approximate DT90 should be irrelevant. However, this can be rationalised by the fact that the FOCUS fate models generally only implement SFO kinetics.</p>
+</div>
+<div id="fomc-fit-for-l2" class="section level2">
+<h2 class="hasAnchor">
+<a href="#fomc-fit-for-l2" class="anchor"></a>FOMC fit for L2</h2>
+<p>For comparison, the FOMC model is fitted as well, and the <span class="math inline">\(\chi^2\)</span> error level is checked.</p>
+<div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="no">m.L2.FOMC</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, <span class="no">FOCUS_2006_L2_mkin</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">m.L2.FOMC</span>, <span class="kw">show_residuals</span> <span class="kw">=</span> <span class="fl">TRUE</span>,
+ <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L2 - FOMC"</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-9-1.png" width="672"></p>
+<div class="sourceCode" id="cb17"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L2.FOMC</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.3
+## R version used for fitting: 4.0.0
+## Date of fit: Wed May 27 06:02:24 2020
+## Date of summary: Wed May 27 06:02:24 2020
+##
+## Equations:
+## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
+##
+## Model predictions using solution type analytical
+##
+## Fitted using 239 model solutions performed in 0.047 s
+##
+## Error model: Constant variance
+##
+## Error model algorithm: OLS
+##
+## Starting values for parameters to be optimised:
+## value type
+## parent_0 93.95 state
+## alpha 1.00 deparm
+## beta 10.00 deparm
+##
+## Starting values for the transformed parameters actually optimised:
+## value lower upper
+## parent_0 93.950000 -Inf Inf
+## log_alpha 0.000000 -Inf Inf
+## log_beta 2.302585 -Inf Inf
+##
+## Fixed parameter values:
+## None
+##
+## Results:
+##
+## AIC BIC logLik
+## 61.78966 63.72928 -26.89483
+##
+## Optimised, transformed parameters with symmetric confidence intervals:
+## Estimate Std. Error Lower Upper
+## parent_0 93.7700 1.6130 90.05000 97.4900
+## log_alpha 0.3180 0.1559 -0.04149 0.6776
+## log_beta 0.2102 0.2493 -0.36460 0.7850
+## sigma 2.2760 0.4645 1.20500 3.3470
+##
+## Parameter correlation:
+## parent_0 log_alpha log_beta sigma
+## parent_0 1.000e+00 -1.151e-01 -2.085e-01 -7.637e-09
+## log_alpha -1.151e-01 1.000e+00 9.741e-01 -1.617e-07
+## log_beta -2.085e-01 9.741e-01 1.000e+00 -1.387e-07
+## sigma -7.637e-09 -1.617e-07 -1.387e-07 1.000e+00
+##
+## Backtransformed parameters:
+## Confidence intervals for internally transformed parameters are asymmetric.
+## t-test (unrealistically) based on the assumption of normal distribution
+## for estimators of untransformed parameters.
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 93.770 58.120 4.267e-12 90.0500 97.490
+## alpha 1.374 6.414 1.030e-04 0.9594 1.969
+## beta 1.234 4.012 1.942e-03 0.6945 2.192
+## sigma 2.276 4.899 5.977e-04 1.2050 3.347
+##
+## FOCUS Chi2 error levels in percent:
+## err.min n.optim df
+## All data 6.205 3 3
+## parent 6.205 3 3
+##
+## Estimated disappearance times:
+## DT50 DT90 DT50back
+## parent 0.8092 5.356 1.612</code></pre>
+<p>The error level at which the <span class="math inline">\(\chi^2\)</span> test passes is much lower in this case. Therefore, the FOMC model provides a better description of the data, as less experimental error has to be assumed in order to explain the data.</p>
+</div>
+<div id="dfop-fit-for-l2" class="section level2">
+<h2 class="hasAnchor">
+<a href="#dfop-fit-for-l2" class="anchor"></a>DFOP fit for L2</h2>
+<p>Fitting the four parameter DFOP model further reduces the <span class="math inline">\(\chi^2\)</span> error level.</p>
+<div class="sourceCode" id="cb19"><html><body><pre class="r"><span class="no">m.L2.DFOP</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"DFOP"</span>, <span class="no">FOCUS_2006_L2_mkin</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">m.L2.DFOP</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>,
+ <span class="kw">main</span> <span class="kw">=</span> <span class="st">"FOCUS L2 - DFOP"</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-10-1.png" width="672"></p>
+<div class="sourceCode" id="cb20"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.L2.DFOP</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.3
+## R version used for fitting: 4.0.0
+## Date of fit: Wed May 27 06:02:24 2020
+## Date of summary: Wed May 27 06:02:24 2020
+##
+## Equations:
+## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
+## time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
+## * parent
+##
+## Model predictions using solution type analytical
+##
+## Fitted using 572 model solutions performed in 0.131 s
+##
+## Error model: Constant variance
+##
+## Error model algorithm: OLS
+##
+## Starting values for parameters to be optimised:
+## value type
+## parent_0 93.95 state
+## k1 0.10 deparm
+## k2 0.01 deparm
+## g 0.50 deparm
+##
+## Starting values for the transformed parameters actually optimised:
+## value lower upper
+## parent_0 93.950000 -Inf Inf
+## log_k1 -2.302585 -Inf Inf
+## log_k2 -4.605170 -Inf Inf
+## g_ilr 0.000000 -Inf Inf
+##
+## Fixed parameter values:
+## None
+##
+## Results:
+##
+## AIC BIC logLik
+## 52.36695 54.79148 -21.18347
+##
+## Optimised, transformed parameters with symmetric confidence intervals:
+## Estimate Std. Error Lower Upper
+## parent_0 93.9500 9.998e-01 91.5900 96.3100
+## log_k1 3.1370 2.376e+03 -5616.0000 5622.0000
+## log_k2 -1.0880 6.285e-02 -1.2370 -0.9394
+## g_ilr -0.2821 7.033e-02 -0.4484 -0.1158
+## sigma 1.4140 2.886e-01 0.7314 2.0960
+##
+## Parameter correlation:
+## parent_0 log_k1 log_k2 g_ilr sigma
+## parent_0 1.000e+00 5.155e-07 2.371e-09 2.665e-01 -6.849e-09
+## log_k1 5.155e-07 1.000e+00 8.434e-05 -1.659e-04 -7.791e-06
+## log_k2 2.371e-09 8.434e-05 1.000e+00 -7.903e-01 -1.262e-08
+## g_ilr 2.665e-01 -1.659e-04 -7.903e-01 1.000e+00 3.241e-08
+## sigma -6.849e-09 -7.791e-06 -1.262e-08 3.241e-08 1.000e+00
+##
+## Backtransformed parameters:
+## Confidence intervals for internally transformed parameters are asymmetric.
+## t-test (unrealistically) based on the assumption of normal distribution
+## for estimators of untransformed parameters.
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 93.9500 9.397e+01 2.036e-12 91.5900 96.3100
+## k1 23.0400 4.303e-04 4.998e-01 0.0000 Inf
+## k2 0.3369 1.591e+01 4.697e-07 0.2904 0.3909
+## g 0.4016 1.680e+01 3.238e-07 0.3466 0.4591
+## sigma 1.4140 4.899e+00 8.776e-04 0.7314 2.0960
+##
+## FOCUS Chi2 error levels in percent:
+## err.min n.optim df
+## All data 2.53 4 2
+## parent 2.53 4 2
+##
+## Estimated disappearance times:
+## DT50 DT90 DT50_k1 DT50_k2
+## parent 0.5335 5.311 0.03009 2.058</code></pre>
+<p>Here, the DFOP model is clearly the best-fit model for dataset L2 based on the chi^2 error level criterion. However, the failure to calculate the covariance matrix indicates that the parameter estimates correlate excessively. Therefore, the FOMC model may be preferred for this dataset.</p>
+</div>
+</div>
+<div id="laboratory-data-l3" class="section level1">
+<h1 class="hasAnchor">
+<a href="#laboratory-data-l3" class="anchor"></a>Laboratory Data L3</h1>
+<p>The following code defines example dataset L3 from the FOCUS kinetics report, p. 290.</p>
+<div class="sourceCode" id="cb22"><html><body><pre class="r"><span class="no">FOCUS_2006_L3</span> <span class="kw">=</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">0</span>, <span class="fl">3</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">30</span>, <span class="fl">60</span>, <span class="fl">91</span>, <span class="fl">120</span>),
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">97.8</span>, <span class="fl">60</span>, <span class="fl">51</span>, <span class="fl">43</span>, <span class="fl">35</span>, <span class="fl">22</span>, <span class="fl">15</span>, <span class="fl">12</span>))
+<span class="no">FOCUS_2006_L3_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_L3</span>)</pre></body></html></div>
+<div id="fit-multiple-models" class="section level2">
+<h2 class="hasAnchor">
+<a href="#fit-multiple-models" class="anchor"></a>Fit multiple models</h2>
+<p>As of mkin version 0.9-39 (June 2015), we can fit several models to one or more datasets in one call to the function <code>mmkin</code>. The datasets have to be passed in a list, in this case a named list holding only the L3 dataset prepared above.</p>
+<div class="sourceCode" id="cb23"><html><body><pre class="r"><span class="co"># Only use one core here, not to offend the CRAN checks</span>
+<span class="no">mm.L3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/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="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>,
+ <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"FOCUS L3"</span> <span class="kw">=</span> <span class="no">FOCUS_2006_L3_mkin</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">mm.L3</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-12-1.png" width="700"></p>
+<p>The <span class="math inline">\(\chi^2\)</span> error level of 21% as well as the plot suggest that the SFO model does not fit very well. The FOMC model performs better, with an error level at which the <span class="math inline">\(\chi^2\)</span> test passes of 7%. Fitting the four parameter DFOP model further reduces the <span class="math inline">\(\chi^2\)</span> error level considerably.</p>
+</div>
+<div id="accessing-mmkin-objects" class="section level2">
+<h2 class="hasAnchor">
+<a href="#accessing-mmkin-objects" class="anchor"></a>Accessing mmkin objects</h2>
+<p>The objects returned by mmkin are arranged like a matrix, with models as a row index and datasets as a column index.</p>
+<p>We can extract the summary and plot for <em>e.g.</em> the DFOP fit, using square brackets for indexing which will result in the use of the summary and plot functions working on mkinfit objects.</p>
+<div class="sourceCode" id="cb24"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L3</span><span class="kw">[[</span><span class="st">"DFOP"</span>, <span class="fl">1</span>]])</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.3
+## R version used for fitting: 4.0.0
+## Date of fit: Wed May 27 06:02:25 2020
+## Date of summary: Wed May 27 06:02:25 2020
+##
+## Equations:
+## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
+## time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
+## * parent
+##
+## Model predictions using solution type analytical
+##
+## Fitted using 373 model solutions performed in 0.08 s
+##
+## Error model: Constant variance
+##
+## Error model algorithm: OLS
+##
+## Starting values for parameters to be optimised:
+## value type
+## parent_0 97.80 state
+## k1 0.10 deparm
+## k2 0.01 deparm
+## g 0.50 deparm
+##
+## Starting values for the transformed parameters actually optimised:
+## value lower upper
+## parent_0 97.800000 -Inf Inf
+## log_k1 -2.302585 -Inf Inf
+## log_k2 -4.605170 -Inf Inf
+## g_ilr 0.000000 -Inf Inf
+##
+## Fixed parameter values:
+## None
+##
+## Results:
+##
+## AIC BIC logLik
+## 32.97732 33.37453 -11.48866
+##
+## Optimised, transformed parameters with symmetric confidence intervals:
+## Estimate Std. Error Lower Upper
+## parent_0 97.7500 1.01900 94.5000 101.000000
+## log_k1 -0.6612 0.10050 -0.9812 -0.341300
+## log_k2 -4.2860 0.04322 -4.4230 -4.148000
+## g_ilr -0.1229 0.03727 -0.2415 -0.004343
+## sigma 1.0170 0.25430 0.2079 1.827000
+##
+## Parameter correlation:
+## parent_0 log_k1 log_k2 g_ilr sigma
+## parent_0 1.000e+00 1.732e-01 2.282e-02 4.009e-01 -6.872e-07
+## log_k1 1.732e-01 1.000e+00 4.945e-01 -5.809e-01 3.200e-07
+## log_k2 2.282e-02 4.945e-01 1.000e+00 -6.812e-01 7.673e-07
+## g_ilr 4.009e-01 -5.809e-01 -6.812e-01 1.000e+00 -8.731e-07
+## sigma -6.872e-07 3.200e-07 7.673e-07 -8.731e-07 1.000e+00
+##
+## Backtransformed parameters:
+## Confidence intervals for internally transformed parameters are asymmetric.
+## t-test (unrealistically) based on the assumption of normal distribution
+## for estimators of untransformed parameters.
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 97.75000 95.960 1.248e-06 94.50000 101.00000
+## k1 0.51620 9.947 1.081e-03 0.37490 0.71090
+## k2 0.01376 23.140 8.840e-05 0.01199 0.01579
+## g 0.45660 34.920 2.581e-05 0.41540 0.49850
+## sigma 1.01700 4.000 1.400e-02 0.20790 1.82700
+##
+## FOCUS Chi2 error levels in percent:
+## err.min n.optim df
+## All data 2.225 4 4
+## parent 2.225 4 4
+##
+## Estimated disappearance times:
+## DT50 DT90 DT50_k1 DT50_k2
+## parent 7.464 123 1.343 50.37
+##
+## Data:
+## time variable observed predicted residual
+## 0 parent 97.8 97.75 0.05396
+## 3 parent 60.0 60.45 -0.44933
+## 7 parent 51.0 49.44 1.56338
+## 14 parent 43.0 43.84 -0.83632
+## 30 parent 35.0 35.15 -0.14707
+## 60 parent 22.0 23.26 -1.25919
+## 91 parent 15.0 15.18 -0.18181
+## 120 parent 12.0 10.19 1.81395</code></pre>
+<div class="sourceCode" id="cb26"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">mm.L3</span><span class="kw">[[</span><span class="st">"DFOP"</span>, <span class="fl">1</span>]], <span class="kw">show_errmin</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-13-1.png" width="700"></p>
+<p>Here, a look to the model plot, the confidence intervals of the parameters and the correlation matrix suggest that the parameter estimates are reliable, and the DFOP model can be used as the best-fit model based on the <span class="math inline">\(\chi^2\)</span> error level criterion for laboratory data L3.</p>
+<p>This is also an example where the standard t-test for the parameter <code>g_ilr</code> is misleading, as it tests for a significant difference from zero. In this case, zero appears to be the correct value for this parameter, and the confidence interval for the backtransformed parameter <code>g</code> is quite narrow.</p>
+</div>
+</div>
+<div id="laboratory-data-l4" class="section level1">
+<h1 class="hasAnchor">
+<a href="#laboratory-data-l4" class="anchor"></a>Laboratory Data L4</h1>
+<p>The following code defines example dataset L4 from the FOCUS kinetics report, p. 293:</p>
+<div class="sourceCode" id="cb27"><html><body><pre class="r"><span class="no">FOCUS_2006_L4</span> <span class="kw">=</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">0</span>, <span class="fl">3</span>, <span class="fl">7</span>, <span class="fl">14</span>, <span class="fl">30</span>, <span class="fl">60</span>, <span class="fl">91</span>, <span class="fl">120</span>),
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">96.6</span>, <span class="fl">96.3</span>, <span class="fl">94.3</span>, <span class="fl">88.8</span>, <span class="fl">74.9</span>, <span class="fl">59.9</span>, <span class="fl">53.5</span>, <span class="fl">49.0</span>))
+<span class="no">FOCUS_2006_L4_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_L4</span>)</pre></body></html></div>
+<p>Fits of the SFO and FOMC models, plots and summaries are produced below:</p>
+<div class="sourceCode" id="cb28"><html><body><pre class="r"><span class="co"># Only use one core here, not to offend the CRAN checks</span>
+<span class="no">mm.L4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/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="kw">cores</span> <span class="kw">=</span> <span class="fl">1</span>,
+ <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="st">"FOCUS L4"</span> <span class="kw">=</span> <span class="no">FOCUS_2006_L4_mkin</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">mm.L4</span>)</pre></body></html></div>
+<p><img src="FOCUS_L_files/figure-html/unnamed-chunk-15-1.png" width="700"></p>
+<p>The <span class="math inline">\(\chi^2\)</span> error level of 3.3% as well as the plot suggest that the SFO model fits very well. The error level at which the <span class="math inline">\(\chi^2\)</span> test passes is slightly lower for the FOMC model. However, the difference appears negligible.</p>
+<div class="sourceCode" id="cb29"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L4</span><span class="kw">[[</span><span class="st">"SFO"</span>, <span class="fl">1</span>]], <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.3
+## R version used for fitting: 4.0.0
+## Date of fit: Wed May 27 06:02:25 2020
+## Date of summary: Wed May 27 06:02:26 2020
+##
+## Equations:
+## d_parent/dt = - k_parent_sink * parent
+##
+## Model predictions using solution type analytical
+##
+## Fitted using 142 model solutions performed in 0.029 s
+##
+## Error model: Constant variance
+##
+## Error model algorithm: OLS
+##
+## Starting values for parameters to be optimised:
+## value type
+## parent_0 96.6 state
+## k_parent_sink 0.1 deparm
+##
+## Starting values for the transformed parameters actually optimised:
+## value lower upper
+## parent_0 96.600000 -Inf Inf
+## log_k_parent_sink -2.302585 -Inf Inf
+##
+## Fixed parameter values:
+## None
+##
+## Results:
+##
+## AIC BIC logLik
+## 47.12133 47.35966 -20.56067
+##
+## Optimised, transformed parameters with symmetric confidence intervals:
+## Estimate Std. Error Lower Upper
+## parent_0 96.440 1.69900 92.070 100.800
+## log_k_parent_sink -5.030 0.07059 -5.211 -4.848
+## sigma 3.162 0.79050 1.130 5.194
+##
+## Parameter correlation:
+## parent_0 log_k_parent_sink sigma
+## parent_0 1.000e+00 5.938e-01 3.440e-07
+## log_k_parent_sink 5.938e-01 1.000e+00 5.885e-07
+## sigma 3.440e-07 5.885e-07 1.000e+00
+##
+## Backtransformed parameters:
+## Confidence intervals for internally transformed parameters are asymmetric.
+## t-test (unrealistically) based on the assumption of normal distribution
+## for estimators of untransformed parameters.
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 96.440000 56.77 1.604e-08 92.070000 1.008e+02
+## k_parent_sink 0.006541 14.17 1.578e-05 0.005455 7.842e-03
+## sigma 3.162000 4.00 5.162e-03 1.130000 5.194e+00
+##
+## FOCUS Chi2 error levels in percent:
+## err.min n.optim df
+## All data 3.287 2 6
+## parent 3.287 2 6
+##
+## Estimated disappearance times:
+## DT50 DT90
+## parent 106 352</code></pre>
+<div class="sourceCode" id="cb31"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">mm.L4</span><span class="kw">[[</span><span class="st">"FOMC"</span>, <span class="fl">1</span>]], <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)</pre></body></html></div>
+<pre><code>## mkin version used for fitting: 0.9.50.3
+## R version used for fitting: 4.0.0
+## Date of fit: Wed May 27 06:02:25 2020
+## Date of summary: Wed May 27 06:02:26 2020
+##
+## Equations:
+## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent
+##
+## Model predictions using solution type analytical
+##
+## Fitted using 224 model solutions performed in 0.043 s
+##
+## Error model: Constant variance
+##
+## Error model algorithm: OLS
+##
+## Starting values for parameters to be optimised:
+## value type
+## parent_0 96.6 state
+## alpha 1.0 deparm
+## beta 10.0 deparm
+##
+## Starting values for the transformed parameters actually optimised:
+## value lower upper
+## parent_0 96.600000 -Inf Inf
+## log_alpha 0.000000 -Inf Inf
+## log_beta 2.302585 -Inf Inf
+##
+## Fixed parameter values:
+## None
+##
+## Results:
+##
+## AIC BIC logLik
+## 40.37255 40.69032 -16.18628
+##
+## Optimised, transformed parameters with symmetric confidence intervals:
+## Estimate Std. Error Lower Upper
+## parent_0 99.1400 1.2670 95.6300 102.7000
+## log_alpha -0.3506 0.2616 -1.0770 0.3756
+## log_beta 4.1740 0.3938 3.0810 5.2670
+## sigma 1.8300 0.4575 0.5598 3.1000
+##
+## Parameter correlation:
+## parent_0 log_alpha log_beta sigma
+## parent_0 1.000e+00 -4.696e-01 -5.543e-01 -2.563e-07
+## log_alpha -4.696e-01 1.000e+00 9.889e-01 4.066e-08
+## log_beta -5.543e-01 9.889e-01 1.000e+00 6.818e-08
+## sigma -2.563e-07 4.066e-08 6.818e-08 1.000e+00
+##
+## Backtransformed parameters:
+## Confidence intervals for internally transformed parameters are asymmetric.
+## t-test (unrealistically) based on the assumption of normal distribution
+## for estimators of untransformed parameters.
+## Estimate t value Pr(&gt;t) Lower Upper
+## parent_0 99.1400 78.250 7.993e-08 95.6300 102.700
+## alpha 0.7042 3.823 9.365e-03 0.3407 1.456
+## beta 64.9800 2.540 3.201e-02 21.7800 193.900
+## sigma 1.8300 4.000 8.065e-03 0.5598 3.100
+##
+## FOCUS Chi2 error levels in percent:
+## err.min n.optim df
+## All data 2.029 3 5
+## parent 2.029 3 5
+##
+## Estimated disappearance times:
+## DT50 DT90 DT50back
+## parent 108.9 1644 494.9</code></pre>
+</div>
+<div id="references" class="section level1 unnumbered">
+<h1 class="hasAnchor">
+<a href="#references" class="anchor"></a>References</h1>
+<div id="refs" class="references">
+<div id="ref-ranke2014">
+<p>Ranke, Johannes. 2014. “Prüfung und Validierung von Modellierungssoftware als Alternative zu ModelMaker 4.0.” Umweltbundesamt Projektnummer 27452.</p>
+</div>
+</div>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+
+ <nav id="toc" data-toggle="toc"><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/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png
new file mode 100644
index 00000000..88d03d24
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png
new file mode 100644
index 00000000..f23a4c97
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png
new file mode 100644
index 00000000..ed6a781d
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png
new file mode 100644
index 00000000..2e5071d9
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png
new file mode 100644
index 00000000..04bee502
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-5-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-5-1.png
new file mode 100644
index 00000000..86af1cf9
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-5-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png
new file mode 100644
index 00000000..16235059
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png
new file mode 100644
index 00000000..8b39f0fc
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png
Binary files differ
diff --git a/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-9-1.png b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-9-1.png
new file mode 100644
index 00000000..13019224
--- /dev/null
+++ b/docs/dev/articles/FOCUS_L_files/figure-html/unnamed-chunk-9-1.png
Binary files differ
diff --git a/docs/dev/articles/index.html b/docs/dev/articles/index.html
new file mode 100644
index 00000000..3d5dd360
--- /dev/null
+++ b/docs/dev/articles/index.html
@@ -0,0 +1,188 @@
+<!-- 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>Articles • 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="Articles" />
+
+
+<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-article-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="col-md-9 contents">
+ <div class="page-header">
+ <h1>Articles</h1>
+ </div>
+
+ <div class="section ">
+ <h3>All vignettes</h3>
+ <p class="section-desc"></p>
+
+ <dl>
+ <dt><a href="FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a></dt>
+ <dd></dt>
+ <dt><a href="FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a></dt>
+ <dd></dt>
+ <dt><a href="mkin.html">Introduction to mkin</a></dt>
+ <dd></dt>
+ <dt><a href="twa.html">Calculation of time weighted average concentrations with mkin</a></dt>
+ <dd></dt>
+ <dt><a href="web_only/FOCUS_Z.html">Example evaluation of FOCUS dataset Z</a></dt>
+ <dd></dt>
+ <dt><a href="web_only/NAFTA_examples.html">Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance</a></dt>
+ <dd></dt>
+ <dt><a href="web_only/benchmarks.html">Benchmark timings for mkin</a></dt>
+ <dd></dt>
+ <dt><a href="web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a></dt>
+ <dd></dt>
+ </dl>
+ </div>
+ </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/articles/mkin.html b/docs/dev/articles/mkin.html
new file mode 100644
index 00000000..2dd6dcb8
--- /dev/null
+++ b/docs/dev/articles/mkin.html
@@ -0,0 +1,261 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Introduction to mkin • 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="Introduction to mkin">
+<meta property="og:description" content="mkin">
+<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-article">
+ <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 toc-ignore">
+ <h1 data-toc-skip>Introduction to mkin</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2020-05-27</h4>
+
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/mkin.rmd"><code>vignettes/mkin.rmd</code></a></small>
+ <div class="hidden name"><code>mkin.rmd</code></div>
+
+ </div>
+
+
+
+<p><a href="http://www.jrwb.de">Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany</a><br><a href="http://chem.uft.uni-bremen.de/ranke">Privatdozent at the University of Bremen</a></p>
+<div id="abstract" class="section level1">
+<h1 class="hasAnchor">
+<a href="#abstract" class="anchor"></a>Abstract</h1>
+<p>In the regulatory evaluation of chemical substances like plant protection products (pesticides), biocides and other chemicals, degradation data play an important role. For the evaluation of pesticide degradation experiments, detailed guidance has been developed, based on nonlinear optimisation. The <code>R</code> add-on package <code>mkin</code> implements fitting some of the models recommended in this guidance from within R and calculates some statistical measures for data series within one or more compartments, for parent and metabolites.</p>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="st">"mkin"</span>, <span class="kw">quietly</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="co"># Define the kinetic model</span>
+<span class="no">m_SFO_SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M1"</span>),
+ <span class="kw">M1</span> <span class="kw">=</span> <span class="fu"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M2"</span>),
+ <span class="kw">M2</span> <span class="kw">=</span> <span class="fu"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+
+
+<span class="co"># Produce model predictions using some arbitrary 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="no">d_SFO_SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinpredict.html">mkinpredict</a></span>(<span class="no">m_SFO_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.03</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">100</span>,
+ <span class="kw">f_M1_to_M2</span> <span class="kw">=</span> <span class="fl">0.9</span>, <span class="kw">k_M2</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">50</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"># Generate a dataset by adding normally distributed errors with</span>
+<span class="co"># standard deviation 3, for two replicates at each sampling time</span>
+<span class="no">d_SFO_SFO_SFO_err</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/add_err.html">add_err</a></span>(<span class="no">d_SFO_SFO_SFO</span>, <span class="kw">reps</span> <span class="kw">=</span> <span class="fl">2</span>,
+ <span class="kw">sdfunc</span> <span class="kw">=</span> <span class="kw">function</span>(<span class="no">x</span>) <span class="fl">3</span>,
+ <span class="kw">n</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">seed</span> <span class="kw">=</span> <span class="fl">123456789</span> )
+
+<span class="co"># Fit the model to the dataset</span>
+<span class="no">f_SFO_SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="no">m_SFO_SFO_SFO</span>, <span class="no">d_SFO_SFO_SFO_err</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="co"># Plot the results separately for parent and metabolites</span>
+<span class="fu"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">f_SFO_SFO_SFO</span>, <span class="kw">lpos</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"topright"</span>, <span class="st">"bottomright"</span>, <span class="st">"bottomright"</span>))</pre></body></html></div>
+<p><img src="mkin_files/figure-html/unnamed-chunk-2-1.png" width="768"></p>
+</div>
+<div id="background" class="section level1">
+<h1 class="hasAnchor">
+<a href="#background" class="anchor"></a>Background</h1>
+<p>Many approaches are possible regarding the evaluation of chemical degradation data.</p>
+<p>The <code>mkin</code> package <span class="citation">(Ranke 2019)</span> implements the approach recommended in the kinetics report provided by the FOrum for Co-ordination of pesticide fate models and their USe <span class="citation">(FOCUS Work Group on Degradation Kinetics 2006, 2014)</span> for simple decline data series, data series with transformation products, commonly termed metabolites, and for data series for more than one compartment. It is also possible to include back reactions, so equilibrium reactions and equilibrium partitioning can be specified, although this oftentimes leads to an overparameterisation of the model.</p>
+<p>When the first <code>mkin</code> code was published in 2010, the most commonly used tools for fitting more complex kinetic degradation models to experimental data were KinGUI <span class="citation">(Schäfer et al. 2007)</span>, a MATLAB based tool with a graphical user interface that was specifically tailored to the task and included some output as proposed by the FOCUS Kinetics Workgroup, and ModelMaker, a general purpose compartment based tool providing infrastructure for fitting dynamic simulation models based on differential equations to data.</p>
+<p>The code was first uploaded to the BerliOS platform. When this was taken down, the version control history was imported into the R-Forge site (see <em>e.g.</em> <a href="http://cgit.jrwb.de/mkin/commit/?id=30cbb4092f6d2d3beff5800603374a0d009ad770">the initial commit on 11 May 2010</a>), where the code is still occasionally updated.</p>
+<p>At that time, the R package <code>FME</code> (Flexible Modelling Environment) <span class="citation">(Soetaert and Petzoldt 2010)</span> was already available, and provided a good basis for developing a package specifically tailored to the task. The remaining challenge was to make it as easy as possible for the users (including the author of this vignette) to specify the system of differential equations and to include the output requested by the FOCUS guidance, such as the relative standard deviation that has to be assumed for the residuals, such that the <span class="math inline">\(\chi^2\)</span> goodness-of-fit test as defined by the FOCUS kinetics workgroup would pass using an significance level <span class="math inline">\(\alpha\)</span> of 0.05. This relative error, expressed as a percentage, is often termed <span class="math inline">\(\chi^2\)</span> error level or similar.</p>
+<p>Also, <code>mkin</code> introduced using analytical solutions for parent only kinetics for improved optimization speed. Later, Eigenvalue based solutions were introduced to <code>mkin</code> for the case of linear differential equations (<em>i.e.</em> where the FOMC or DFOP models were not used for the parent compound), greatly improving the optimization speed for these cases. This, however, has become somehow obsolete, as the use of compiled code described below gives even smaller execution times.</p>
+<p>The possibility to specify back-reactions and a biphasic model (SFORB) for metabolites were present in <code>mkin</code> from the very beginning.</p>
+<div id="derived-software-tools" class="section level2">
+<h2 class="hasAnchor">
+<a href="#derived-software-tools" class="anchor"></a>Derived software tools</h2>
+<p>Soon after the publication of <code>mkin</code>, two derived tools were published, namely KinGUII (available from Bayer Crop Science) and CAKE (commissioned to Tessella by Syngenta), which added a graphical user interface (GUI), and added fitting by iteratively reweighted least squares (IRLS) and characterisation of likely parameter distributions by Markov Chain Monte Carlo (MCMC) sampling.</p>
+<p>CAKE focuses on a smooth use experience, sacrificing some flexibility in the model definition, originally allowing only two primary metabolites in parallel. The current version 3.3 of CAKE release in March 2016 uses a basic scheme for up to six metabolites in a flexible arrangement, but does not support back-reactions (non-instantaneous equilibria) or biphasic kinetics for metabolites.</p>
+<p>KinGUI offers an even more flexible widget for specifying complex kinetic models. Back-reactions (non-instantaneous equilibria) were supported early on, but until 2014, only simple first-order models could be specified for transformation products. Starting with KinGUII version 2.1, biphasic modelling of metabolites was also available in KinGUII.</p>
+<p>A further graphical user interface (GUI) that has recently been brought to a decent degree of maturity is the browser based GUI named <code>gmkin</code>. Please see its <a href="https://pkgdown.jrwb.de/gmkin">documentation page</a> and <a href="https://pkgdown.jrwb.de/gmkin/articles/gmkin_manual.html">manual</a> for further information.</p>
+<p>A comparison of scope, usability and numerical results obtained with these tools has been recently been published by <span class="citation">Ranke, Wöltjen, and Meinecke (2018)</span>.</p>
+</div>
+<div id="recent-developments" class="section level2">
+<h2 class="hasAnchor">
+<a href="#recent-developments" class="anchor"></a>Recent developments</h2>
+<p>Currently (July 2019), the main features available in <code>mkin</code> which are not present in KinGUII or CAKE, are the speed increase by using compiled code when a compiler is present, parallel model fitting on multicore machines using the <code>mmkin</code> function, and the estimation of parameter confidence intervals based on transformed parameters.</p>
+<p>In addition, the possibility to use two alternative error models to constant variance have been integrated. The variance by variable error model introduced by <span class="citation">Gao et al. (2011)</span> has been available via an iteratively reweighted least squares (IRLS) procedure since mkin <a href="https://pkgdown.jrwb.de/mkin/news/index.html#mkin-0-9-22-2013-10-26">version 0.9-22</a>. With <a href="https://pkgdown.jrwb.de/mkin/news/index.html#mkin-0-9-49-5-2019-07-04">release 0.9.49.5</a>, the IRLS algorithm has been replaced by direct or step-wise maximisation of the likelihood function, which makes it possible not only to fit the variance by variable error model but also a <a href="https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html">two-component error model</a> inspired by error models developed in analytical chemistry.</p>
+</div>
+</div>
+<div id="internal-parameter-transformations" class="section level1">
+<h1 class="hasAnchor">
+<a href="#internal-parameter-transformations" class="anchor"></a>Internal parameter transformations</h1>
+<p>For rate constants, the log transformation is used, as proposed by Bates and Watts <span class="citation">(1988, 77, 149)</span>. Approximate intervals are constructed for the transformed rate constants <span class="citation">(compare Bates and Watts 1988, 135)</span>, <em>i.e.</em> for their logarithms. Confidence intervals for the rate constants are then obtained using the appropriate backtransformation using the exponential function.</p>
+<p>In the first version of <code>mkin</code> allowing for specifying models using formation fractions, a home-made reparameterisation was used in order to ensure that the sum of formation fractions would not exceed unity.</p>
+<p>This method is still used in the current version of KinGUII (v2.1 from April 2014), with a modification that allows for fixing the pathway to sink to zero. CAKE uses penalties in the objective function in order to enforce this constraint.</p>
+<p>In 2012, an alternative reparameterisation of the formation fractions was proposed together with René Lehmann <span class="citation">(Ranke and Lehmann 2012)</span>, based on isometric logratio transformation (ILR). The aim was to improve the validity of the linear approximation of the objective function during the parameter estimation procedure as well as in the subsequent calculation of parameter confidence intervals.</p>
+<div id="confidence-intervals-based-on-transformed-parameters" class="section level2">
+<h2 class="hasAnchor">
+<a href="#confidence-intervals-based-on-transformed-parameters" class="anchor"></a>Confidence intervals based on transformed parameters</h2>
+<p>In the first attempt at providing improved parameter confidence intervals introduced to <code>mkin</code> in 2013, confidence intervals obtained from FME on the transformed parameters were simply all backtransformed one by one to yield asymmetric confidence intervals for the backtransformed parameters.</p>
+<p>However, while there is a 1:1 relation between the rate constants in the model and the transformed parameters fitted in the model, the parameters obtained by the isometric logratio transformation are calculated from the set of formation fractions that quantify the paths to each of the compounds formed from a specific parent compound, and no such 1:1 relation exists.</p>
+<p>Therefore, parameter confidence intervals for formation fractions obtained with this method only appear valid for the case of a single transformation product, where only one formation fraction is to be estimated, directly corresponding to one component of the ilr transformed parameter.</p>
+<p>The confidence intervals obtained by backtransformation for the cases where a 1:1 relation between transformed and original parameter exist are considered by the author of this vignette to be more accurate than those obtained using a re-estimation of the Hessian matrix after backtransformation, as implemented in the FME package.</p>
+</div>
+<div id="parameter-t-test-based-on-untransformed-parameters" class="section level2">
+<h2 class="hasAnchor">
+<a href="#parameter-t-test-based-on-untransformed-parameters" class="anchor"></a>Parameter t-test based on untransformed parameters</h2>
+<p>The standard output of many nonlinear regression software packages includes the results from a test for significant difference from zero for all parameters. Such a test is also recommended to check the validity of rate constants in the FOCUS guidance <span class="citation">(FOCUS Work Group on Degradation Kinetics 2014, 96ff)</span>.</p>
+<p>It has been argued that the precondition for this test, <em>i.e.</em> normal distribution of the estimator for the parameters, is not fulfilled in the case of nonlinear regression <span class="citation">(Ranke and Lehmann 2015)</span>. However, this test is commonly used by industry, consultants and national authorities in order to decide on the reliability of parameter estimates, based on the FOCUS guidance mentioned above. Therefore, the results of this one-sided t-test are included in the summary output from <code>mkin</code>.</p>
+<p>As it is not reasonable to test for significant difference of the transformed parameters (<em>e.g.</em> <span class="math inline">\(log(k)\)</span>) from zero, the t-test is calculated based on the model definition before parameter transformation, <em>i.e.</em> in a similar way as in packages that do not apply such an internal parameter transformation. A note is included in the <code>mkin</code> output, pointing to the fact that the t-test is based on the unjustified assumption of normal distribution of the parameter estimators.</p>
+</div>
+</div>
+<div id="references" class="section level1">
+<h1 class="hasAnchor">
+<a href="#references" class="anchor"></a>References</h1>
+<!-- vim: set foldmethod=syntax: -->
+<div id="refs" class="references">
+<div id="ref-bates1988">
+<p>Bates, D., and D. Watts. 1988. <em>Nonlinear Regression and Its Applications</em>. Wiley-Interscience.</p>
+</div>
+<div id="ref-FOCUS2006">
+<p>FOCUS Work Group on Degradation Kinetics. 2006. <em>Guidance Document on Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in Eu Registration. Report of the Focus Work Group on Degradation Kinetics</em>. <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="uri">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.</p>
+</div>
+<div id="ref-FOCUSkinetics2014">
+<p>———. 2014. <em>Generic Guidance for Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in Eu Registration</em>. 1.1 ed. <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="uri">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.</p>
+</div>
+<div id="ref-gao11">
+<p>Gao, Z., J.W. Green, J. Vanderborght, and W. Schmitt. 2011. “Improving Uncertainty Analysis in Kinetic Evaluations Using Iteratively Reweighted Least Squares.” Journal. <em>Environmental Science and Technology</em> 45: 4429–37.</p>
+</div>
+<div id="ref-pkg:mkin">
+<p>Ranke, J. 2019. <em>‘mkin‘: Kinetic Evaluation of Chemical Degradation Data</em>. <a href="https://CRAN.R-project.org/package=mkin" class="uri">https://CRAN.R-project.org/package=mkin</a>.</p>
+</div>
+<div id="ref-ranke2012">
+<p>Ranke, J., and R. Lehmann. 2012. “Parameter Reliability in Kinetic Evaluation of Environmental Metabolism Data - Assessment and the Influence of Model Specification.” In <em>SETAC World 20-24 May</em>. Berlin.</p>
+</div>
+<div id="ref-ranke2015">
+<p>———. 2015. “To T-Test or Not to T-Test, That Is the Question.” In <em>XV Symposium on Pesticide Chemistry 2-4 September 2015</em>. Piacenza. <a href="http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf" class="uri">http://chem.uft.uni-bremen.de/ranke/posters/piacenza_2015.pdf</a>.</p>
+</div>
+<div id="ref-ranke2018">
+<p>Ranke, Johannes, Janina Wöltjen, and Stefan Meinecke. 2018. “Comparison of Software Tools for Kinetic Evaluation of Chemical Degradation Data.” <em>Environmental Sciences Europe</em> 30 (1): 17. <a href="https://doi.org/10.1186/s12302-018-0145-1" class="uri">https://doi.org/10.1186/s12302-018-0145-1</a>.</p>
+</div>
+<div id="ref-schaefer2007">
+<p>Schäfer, D., B. Mikolasch, P. Rainbird, and B. Harvey. 2007. “KinGUI: A New Kinetic Software Tool for Evaluations According to FOCUS Degradation Kinetics.” In <em>Proceedings of the Xiii Symposium Pesticide Chemistry</em>, edited by Del Re A. A. M., Capri E., Fragoulis G., and Trevisan M., 916–23. Piacenza.</p>
+</div>
+<div id="ref-soetaert2010">
+<p>Soetaert, Karline, and Thomas Petzoldt. 2010. “Inverse Modelling, Sensitivity and Monte Carlo Analysis in R Using Package FME.” <em>Journal of Statistical Software</em> 33 (3): 1–28. <a href="http://www.jstatsoft.org/v33/i03/" class="uri">http://www.jstatsoft.org/v33/i03/</a>.</p>
+</div>
+</div>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+
+ <nav id="toc" data-toggle="toc"><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/articles/mkin_files/figure-html/unnamed-chunk-2-1.png b/docs/dev/articles/mkin_files/figure-html/unnamed-chunk-2-1.png
new file mode 100644
index 00000000..62ea16f2
--- /dev/null
+++ b/docs/dev/articles/mkin_files/figure-html/unnamed-chunk-2-1.png
Binary files differ
diff --git a/docs/dev/articles/twa.html b/docs/dev/articles/twa.html
new file mode 100644
index 00000000..d4754a1f
--- /dev/null
+++ b/docs/dev/articles/twa.html
@@ -0,0 +1,175 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Calculation of time weighted average concentrations with mkin • 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="Calculation of time weighted average concentrations with mkin">
+<meta property="og:description" content="mkin">
+<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-article">
+ <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 toc-ignore">
+ <h1 data-toc-skip>Calculation of time weighted average concentrations with mkin</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2020-05-27</h4>
+
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/twa.rmd"><code>vignettes/twa.rmd</code></a></small>
+ <div class="hidden name"><code>twa.rmd</code></div>
+
+ </div>
+
+
+
+<p>Since version 0.9.45.1 of the ‘mkin’ package, a function for calculating time weighted average concentrations for decline kinetics (<em>i.e.</em> only for the compound applied in the experiment) is included. Strictly speaking, they are maximum moving window time weighted average concentrations, <em>i.e.</em> the maximum time weighted average concentration that can be found when moving a time window of a specified width over the decline curve.</p>
+<p>Time weighted average concentrations for the SFO, FOMC and the DFOP model are calculated using the formulas given in the FOCUS kinetics guidance <span class="citation">(FOCUS Work Group on Degradation Kinetics 2014, 251)</span>:</p>
+<p>SFO:</p>
+<p><span class="math display">\[c_\textrm{twa} = c_0 \frac{\left( 1 - e^{- k t} \right)}{ k t} \]</span></p>
+<p>FOMC:</p>
+<p><span class="math display">\[c_\textrm{twa} = c_0 \frac{\beta}{t (1 - \alpha)}
+ \left( \left(\frac{t}{\beta} + 1 \right)^{1 - \alpha} - 1 \right) \]</span></p>
+<p>DFOP:</p>
+<p><span class="math display">\[c_\textrm{twa} = \frac{c_0}{t} \left(
+ \frac{g}{k_1} \left( 1 - e^{- k_1 t} \right) +
+ \frac{1-g}{k_2} \left( 1 - e^{- k_2 t} \right) \right) \]</span></p>
+<p>HS for <span class="math inline">\(t &gt; t_b\)</span>:</p>
+<p><span class="math display">\[c_\textrm{twa} = \frac{c_0}{t} \left(
+ \frac{1}{k_1} \left( 1 - e^{- k_1 t_b} \right) +
+ \frac{e^{- k_1 t_b}}{k_2} \left( 1 - e^{- k_2 (t - t_b)} \right) \right) \]</span></p>
+<p>Often, the ratio between the time weighted average concentration <span class="math inline">\(c_\textrm{twa}\)</span> and the initial concentration <span class="math inline">\(c_0\)</span></p>
+<p><span class="math display">\[f_\textrm{twa} = \frac{c_\textrm{twa}}{c_0}\]</span></p>
+<p>is needed. This can be calculated from the fitted initial concentration <span class="math inline">\(c_0\)</span> and the time weighted average concentration <span class="math inline">\(c_\textrm{twa}\)</span>, or directly from the model parameters using the following formulas:</p>
+<p>SFO:</p>
+<p><span class="math display">\[f_\textrm{twa} = \frac{\left( 1 - e^{- k t} \right)}{k t} \]</span></p>
+<p>FOMC:</p>
+<p><span class="math display">\[f_\textrm{twa} = \frac{\beta}{t (1 - \alpha)}
+ \left( \left(\frac{t}{\beta} + 1 \right)^{1 - \alpha} - 1 \right) \]</span></p>
+<p>DFOP:</p>
+<p><span class="math display">\[f_\textrm{twa} = \frac{1}{t} \left(
+ \frac{g}{k_1} \left( 1 - e^{- k_1 t} \right) +
+ \frac{1-g}{k_2} \left( 1 - e^{- k_2 t} \right) \right) \]</span></p>
+<p>HS for <span class="math inline">\(t &gt; t_b\)</span>:</p>
+<p><span class="math display">\[f_\textrm{twa} = \frac{1}{t} \left(
+ \frac{1}{k_1} \left( 1 - e^{- k_1 t_b} \right) +
+ \frac{e^{- k_1 t_b}}{k_2} \left( 1 - e^{- k_2 (t - t_b)} \right) \right) \]</span></p>
+<p>Note that a method for calculating maximum moving window time weighted average concentrations for a model fitted by ‘mkinfit’ or from parent decline model parameters is included in the <code><a href="../reference/max_twa_parent.html">max_twa_parent()</a></code> function. If the same is needed for metabolites, the function <code><a href="https://rdrr.io/pkg/pfm/man/max_twa.html">pfm::max_twa()</a></code> from the ‘pfm’ package can be used.</p>
+<div id="refs" class="references">
+<div id="ref-FOCUSkinetics2014">
+<p>FOCUS Work Group on Degradation Kinetics. 2014. <em>Generic Guidance for Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in Eu Registration</em>. 1.1 ed. <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="uri">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.</p>
+</div>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+
+ </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/articles/web_only/FOCUS_Z.html b/docs/dev/articles/web_only/FOCUS_Z.html
new file mode 100644
index 00000000..7fca4e49
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z.html
@@ -0,0 +1,364 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Example evaluation of FOCUS dataset Z • 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 evaluation of FOCUS dataset Z">
+<meta property="og:description" content="mkin">
+<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-article">
+ <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 toc-ignore">
+ <h1 data-toc-skip>Example evaluation of FOCUS dataset Z</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2020-05-27</h4>
+
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/FOCUS_Z.rmd"><code>vignettes/web_only/FOCUS_Z.rmd</code></a></small>
+ <div class="hidden name"><code>FOCUS_Z.rmd</code></div>
+
+ </div>
+
+
+
+<p><a href="http://www.jrwb.de">Wissenschaftlicher Berater, Kronacher Str. 12, 79639 Grenzach-Wyhlen, Germany</a><br><a href="http://chem.uft.uni-bremen.de/ranke">Privatdozent at the University of Bremen</a></p>
+<div id="the-data" class="section level1">
+<h1 class="hasAnchor">
+<a href="#the-data" class="anchor"></a>The data</h1>
+<p>The following code defines the example dataset from Appendix 7 to the FOCUS kinetics report <span class="citation">(FOCUS Work Group on Degradation Kinetics 2014, 354)</span>.</p>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="no">mkin</span>, <span class="kw">quietly</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="no">LOD</span> <span class="kw">=</span> <span class="fl">0.5</span>
+<span class="no">FOCUS_2006_Z</span> <span class="kw">=</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">0</span>, <span class="fl">0.04</span>, <span class="fl">0.125</span>, <span class="fl">0.29</span>, <span class="fl">0.54</span>, <span class="fl">1</span>, <span class="fl">2</span>, <span class="fl">3</span>, <span class="fl">4</span>, <span class="fl">7</span>, <span class="fl">10</span>, <span class="fl">14</span>, <span class="fl">21</span>,
+ <span class="fl">42</span>, <span class="fl">61</span>, <span class="fl">96</span>, <span class="fl">124</span>),
+ <span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">100</span>, <span class="fl">81.7</span>, <span class="fl">70.4</span>, <span class="fl">51.1</span>, <span class="fl">41.2</span>, <span class="fl">6.6</span>, <span class="fl">4.6</span>, <span class="fl">3.9</span>, <span class="fl">4.6</span>, <span class="fl">4.3</span>, <span class="fl">6.8</span>,
+ <span class="fl">2.9</span>, <span class="fl">3.5</span>, <span class="fl">5.3</span>, <span class="fl">4.4</span>, <span class="fl">1.2</span>, <span class="fl">0.7</span>),
+ <span class="kw">Z1</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">18.3</span>, <span class="fl">29.6</span>, <span class="fl">46.3</span>, <span class="fl">55.1</span>, <span class="fl">65.7</span>, <span class="fl">39.1</span>, <span class="fl">36</span>, <span class="fl">15.3</span>, <span class="fl">5.6</span>, <span class="fl">1.1</span>,
+ <span class="fl">1.6</span>, <span class="fl">0.6</span>, <span class="fl">0.5</span> * <span class="no">LOD</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">NA</span>),
+ <span class="kw">Z2</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">NA</span>, <span class="fl">0.5</span> * <span class="no">LOD</span>, <span class="fl">2.6</span>, <span class="fl">3.8</span>, <span class="fl">15.3</span>, <span class="fl">37.2</span>, <span class="fl">31.7</span>, <span class="fl">35.6</span>, <span class="fl">14.5</span>,
+ <span class="fl">0.8</span>, <span class="fl">2.1</span>, <span class="fl">1.9</span>, <span class="fl">0.5</span> * <span class="no">LOD</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">NA</span>),
+ <span class="kw">Z3</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">NA</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">NA</span>, <span class="fl">0.5</span> * <span class="no">LOD</span>, <span class="fl">9.2</span>, <span class="fl">13.1</span>, <span class="fl">22.3</span>, <span class="fl">28.4</span>, <span class="fl">32.5</span>,
+ <span class="fl">25.2</span>, <span class="fl">17.2</span>, <span class="fl">4.8</span>, <span class="fl">4.5</span>, <span class="fl">2.8</span>, <span class="fl">4.4</span>))
+
+<span class="no">FOCUS_2006_Z_mkin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(<span class="no">FOCUS_2006_Z</span>)</pre></body></html></div>
+</div>
+<div id="parent-and-one-metabolite" class="section level1">
+<h1 class="hasAnchor">
+<a href="#parent-and-one-metabolite" class="anchor"></a>Parent and one metabolite</h1>
+<p>The next step is to set up the models used for the kinetic analysis. As the simultaneous fit of parent and the first metabolite is usually straightforward, Step 1 (SFO for parent only) is skipped here. We start with the model 2a, with formation and decline of metabolite Z1 and the pathway from parent directly to sink included (default in mkin).</p>
+<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="no">Z.2a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="no">m.Z.2a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.2a</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.2a</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png" width="700"></p>
+<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.2a</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div>
+<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
+## Z0_0 97.01488 3.301084 29.3888 3.2971e-21 91.66556 102.3642
+## k_Z0 2.23601 0.207078 10.7979 3.3309e-11 1.95303 2.5600
+## k_Z1 0.48212 0.063265 7.6207 2.8154e-08 0.40341 0.5762
+## f_Z0_to_Z1 1.00000 0.094764 10.5525 5.3560e-11 0.00000 1.0000
+## sigma 4.80411 0.635638 7.5579 3.2592e-08 3.52677 6.0815</code></pre>
+<p>As obvious from the parameter summary (the component of the summary), the kinetic rate constant from parent compound Z to sink is very small and the t-test for this parameter suggests that it is not significantly different from zero. This suggests, in agreement with the analysis in the FOCUS kinetics report, to simplify the model by removing the pathway to sink.</p>
+<p>A similar result can be obtained when formation fractions are used in the model formulation:</p>
+<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="no">Z.2a.ff</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>)</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="no">m.Z.2a.ff</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.2a.ff</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb13"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.2a.ff</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png" width="700"></p>
+<div class="sourceCode" id="cb14"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.2a.ff</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div>
+<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
+## Z0_0 97.01488 3.301084 29.3888 3.2971e-21 91.66556 102.3642
+## k_Z0 2.23601 0.207078 10.7979 3.3309e-11 1.95303 2.5600
+## k_Z1 0.48212 0.063265 7.6207 2.8154e-08 0.40341 0.5762
+## f_Z0_to_Z1 1.00000 0.094764 10.5525 5.3560e-11 0.00000 1.0000
+## sigma 4.80411 0.635638 7.5579 3.2592e-08 3.52677 6.0815</code></pre>
+<p>Here, the ilr transformed formation fraction fitted in the model takes a very large value, and the backtransformed formation fraction from parent Z to Z1 is practically unity. Here, the covariance matrix used for the calculation of confidence intervals is not returned as the model is overparameterised.</p>
+<p>A simplified model is obtained by removing the pathway to the sink. </p>
+<p>In the following, we use the parameterisation with formation fractions in order to be able to compare with the results in the FOCUS guidance, and as it makes it easier to use parameters obtained in a previous fit when adding a further metabolite.</p>
+<div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="no">Z.3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>)</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb18"><html><body><pre class="r"><span class="no">m.Z.3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.3</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb20"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.3</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png" width="700"></p>
+<div class="sourceCode" id="cb21"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.3</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div>
+<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
+## Z0_0 97.01488 2.597342 37.352 2.0106e-24 91.67597 102.3538
+## k_Z0 2.23601 0.146904 15.221 9.1477e-15 1.95354 2.5593
+## k_Z1 0.48212 0.041727 11.554 4.8268e-12 0.40355 0.5760
+## sigma 4.80411 0.620208 7.746 1.6110e-08 3.52925 6.0790</code></pre>
+<p>As there is only one transformation product for Z0 and no pathway to sink, the formation fraction is internally fixed to unity.</p>
+</div>
+<div id="metabolites-z2-and-z3" class="section level1">
+<h1 class="hasAnchor">
+<a href="#metabolites-z2-and-z3" class="anchor"></a>Metabolites Z2 and Z3</h1>
+<p>As suggested in the FOCUS report, the pathway to sink was removed for metabolite Z1 as well in the next step. While this step appears questionable on the basis of the above results, it is followed here for the purpose of comparison. Also, in the FOCUS report, it is assumed that there is additional empirical evidence that Z1 quickly and exclusively hydrolyses to Z2.</p>
+<div class="sourceCode" id="cb23"><html><body><pre class="r"><span class="no">Z.5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>)</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb25"><html><body><pre class="r"><span class="no">m.Z.5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.5</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb27"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.5</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png" width="700"></p>
+<p>Finally, metabolite Z3 is added to the model. We use the optimised differential equation parameter values from the previous fit in order to accelerate the optimization.</p>
+<div class="sourceCode" id="cb28"><html><body><pre class="r"><span class="no">Z.FOCUS</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>)</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb30"><html><body><pre class="r"><span class="no">m.Z.FOCUS</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.FOCUS</span>, <span class="no">FOCUS_2006_Z_mkin</span>,
+ <span class="kw">parms.ini</span> <span class="kw">=</span> <span class="no">m.Z.5</span>$<span class="no">bparms.ode</span>,
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, :
+## Observations with value of zero were removed from the data</code></pre>
+<pre><code>## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : Optimisation did not converge:
+## false convergence (8)</code></pre>
+<div class="sourceCode" id="cb33"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.FOCUS</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png" width="700"></p>
+<div class="sourceCode" id="cb34"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.FOCUS</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">bpar</span></pre></body></html></div>
+<pre><code>## Estimate se_notrans t value Pr(&gt;t) Lower Upper
+## Z0_0 96.840695 1.994285 48.5591 4.0254e-42 92.828744 100.85265
+## k_Z0 2.215467 0.118463 18.7018 1.0417e-23 1.989524 2.46707
+## k_Z1 0.478325 0.028259 16.9265 6.2441e-22 0.424725 0.53869
+## k_Z2 0.451638 0.042139 10.7177 1.6309e-14 0.374346 0.54489
+## k_Z3 0.058692 0.015245 3.8498 1.7807e-04 0.034806 0.09897
+## f_Z2_to_Z3 0.471484 0.058348 8.0805 9.6599e-11 0.357736 0.58827
+## sigma 3.984431 0.383402 10.3923 4.5576e-14 3.213126 4.75574</code></pre>
+<div class="sourceCode" id="cb36"><html><body><pre class="r"><span class="fu"><a href="../../reference/endpoints.html">endpoints</a></span>(<span class="no">m.Z.FOCUS</span>)</pre></body></html></div>
+<pre><code>## $ff
+## Z2_Z3 Z2_sink
+## 0.47148 0.52852
+##
+## $distimes
+## DT50 DT90
+## Z0 0.31287 1.0393
+## Z1 1.44911 4.8138
+## Z2 1.53474 5.0983
+## Z3 11.80989 39.2316</code></pre>
+<p>This fit corresponds to the final result chosen in Appendix 7 of the FOCUS report. Confidence intervals returned by mkin are based on internally transformed parameters, however.</p>
+</div>
+<div id="using-the-sforb-model" class="section level1">
+<h1 class="hasAnchor">
+<a href="#using-the-sforb-model" class="anchor"></a>Using the SFORB model</h1>
+<p>As the FOCUS report states, there is a certain tailing of the time course of metabolite Z3. Also, the time course of the parent compound is not fitted very well using the SFO model, as residues at a certain low level remain.</p>
+<p>Therefore, an additional model is offered here, using the single first-order reversible binding (SFORB) model for metabolite Z3. As expected, the <span class="math inline">\(\chi^2\)</span> error level is lower for metabolite Z3 using this model and the graphical fit for Z3 is improved. However, the covariance matrix is not returned.</p>
+<div class="sourceCode" id="cb38"><html><body><pre class="r"><span class="no">Z.mkin.1</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb40"><html><body><pre class="r"><span class="no">m.Z.mkin.1</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.1</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb42"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.1</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png" width="700"></p>
+<div class="sourceCode" id="cb43"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span>(<span class="no">m.Z.mkin.1</span>, <span class="kw">data</span> <span class="kw">=</span> <span class="fl">FALSE</span>)$<span class="no">cov.unscaled</span></pre></body></html></div>
+<pre><code>## NULL</code></pre>
+<p>Therefore, a further stepwise model building is performed starting from the stage of parent and two metabolites, starting from the assumption that the model fit for the parent compound can be improved by using the SFORB model.</p>
+<div class="sourceCode" id="cb45"><html><body><pre class="r"><span class="no">Z.mkin.3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb47"><html><body><pre class="r"><span class="no">m.Z.mkin.3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.3</span>, <span class="no">FOCUS_2006_Z_mkin</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE): Observations with
+## value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb49"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.3</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png" width="700"></p>
+<p>This results in a much better representation of the behaviour of the parent compound Z0.</p>
+<p>Finally, Z3 is added as well. These models appear overparameterised (no covariance matrix returned) if the sink for Z1 is left in the models.</p>
+<div class="sourceCode" id="cb50"><html><body><pre class="r"><span class="no">Z.mkin.4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb52"><html><body><pre class="r"><span class="no">m.Z.mkin.4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.4</span>, <span class="no">FOCUS_2006_Z_mkin</span>,
+ <span class="kw">parms.ini</span> <span class="kw">=</span> <span class="no">m.Z.mkin.3</span>$<span class="no">bparms.ode</span>,
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.
+## 3$bparms.ode, : Observations with value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb54"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.4</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png" width="700"></p>
+<p>The error level of the fit, but especially of metabolite Z3, can be improved if the SFORB model is chosen for this metabolite, as this model is capable of representing the tailing of the metabolite decline phase.</p>
+<div class="sourceCode" id="cb55"><html><body><pre class="r"><span class="no">Z.mkin.5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">Z0</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="kw">sink</span> <span class="kw">=</span> <span class="fl">FALSE</span>),
+ <span class="kw">Z2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>),
+ <span class="kw">Z3</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb57"><html><body><pre class="r"><span class="no">m.Z.mkin.5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.5</span>, <span class="no">FOCUS_2006_Z_mkin</span>,
+ <span class="kw">parms.ini</span> <span class="kw">=</span> <span class="no">m.Z.mkin.4</span>$<span class="no">bparms.ode</span>[<span class="fl">1</span>:<span class="fl">4</span>],
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = m.Z.mkin.
+## 4$bparms.ode[1:4], : Observations with value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb59"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.5</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png" width="700"></p>
+<p>The summary view of the backtransformed parameters shows that we get no confidence intervals due to overparameterisation. As the optimized is excessively small, it seems reasonable to fix it to zero.</p>
+<div class="sourceCode" id="cb60"><html><body><pre class="r"><span class="no">m.Z.mkin.5a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">Z.mkin.5</span>, <span class="no">FOCUS_2006_Z_mkin</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="no">m.Z.mkin.5</span>$<span class="no">bparms.ode</span>[<span class="fl">1</span>:<span class="fl">7</span>],
+ <span class="kw">k_Z3_bound_free</span> <span class="kw">=</span> <span class="fl">0</span>),
+ <span class="kw">fixed_parms</span> <span class="kw">=</span> <span class="st">"k_Z3_bound_free"</span>,
+ <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)</pre></body></html></div>
+<pre><code>## Warning in mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, parms.ini = c(m.Z.mkin.
+## 5$bparms.ode[1:7], : Observations with value of zero were removed from the data</code></pre>
+<div class="sourceCode" id="cb62"><html><body><pre class="r"><span class="fu"><a href="../../reference/plot.mkinfit.html">plot_sep</a></span>(<span class="no">m.Z.mkin.5a</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png" width="700"></p>
+<p>As expected, the residual plots for Z0 and Z3 are more random than in the case of the all SFO model for which they were shown above. In conclusion, the model is proposed as the best-fit model for the dataset from Appendix 7 of the FOCUS report.</p>
+<p>A graphical representation of the confidence intervals can finally be obtained.</p>
+<div class="sourceCode" id="cb63"><html><body><pre class="r"><span class="fu"><a href="../../reference/mkinparplot.html">mkinparplot</a></span>(<span class="no">m.Z.mkin.5a</span>)</pre></body></html></div>
+<p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png" width="700"></p>
+<p>The endpoints obtained with this model are</p>
+<div class="sourceCode" id="cb64"><html><body><pre class="r"><span class="fu"><a href="../../reference/endpoints.html">endpoints</a></span>(<span class="no">m.Z.mkin.5a</span>)</pre></body></html></div>
+<pre><code>## $ff
+## Z0_free Z2_Z3 Z2_sink Z3_free
+## 1.00000 0.53656 0.46344 1.00000
+##
+## $SFORB
+## Z0_b1 Z0_b2 Z3_b1 Z3_b2
+## 2.4471337 0.0075125 0.0800071 0.0000000
+##
+## $distimes
+## DT50 DT90 DT50_Z0_b1 DT50_Z0_b2 DT50_Z3_b1 DT50_Z3_b2
+## Z0 0.3043 1.1848 0.28325 92.266 NA NA
+## Z1 1.5148 5.0320 NA NA NA NA
+## Z2 1.6414 5.4526 NA NA NA NA
+## Z3 NA NA NA NA 8.6636 Inf</code></pre>
+<p>It is clear the degradation rate of Z3 towards the end of the experiment is very low as DT50_Z3_b2 (the second Eigenvalue of the system of two differential equations representing the SFORB system for Z3, corresponding to the slower rate constant of the DFOP model) is reported to be infinity. However, this appears to be a feature of the data.</p>
+</div>
+<div id="references" class="section level1">
+<h1 class="hasAnchor">
+<a href="#references" class="anchor"></a>References</h1>
+<!-- vim: set foldmethod=syntax: -->
+<div id="refs" class="references">
+<div id="ref-FOCUSkinetics2014">
+<p>FOCUS Work Group on Degradation Kinetics. 2014. <em>Generic Guidance for Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in Eu Registration</em>. 1.1 ed. <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics" class="uri">http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a>.</p>
+</div>
+</div>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+
+ <nav id="toc" data-toggle="toc"><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/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png
new file mode 100644
index 00000000..23d051ce
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png
new file mode 100644
index 00000000..96738dd0
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png
new file mode 100644
index 00000000..4f3c2554
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png
new file mode 100644
index 00000000..b8c3ed26
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png
new file mode 100644
index 00000000..132a7317
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png
new file mode 100644
index 00000000..23d051ce
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png
new file mode 100644
index 00000000..6e9f4efa
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png
new file mode 100644
index 00000000..146acea9
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png
new file mode 100644
index 00000000..b25bf26a
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png
new file mode 100644
index 00000000..7db8b07d
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png
new file mode 100644
index 00000000..dd5d89cd
--- /dev/null
+++ b/docs/dev/articles/web_only/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples.html b/docs/dev/articles/web_only/NAFTA_examples.html
new file mode 100644
index 00000000..29f4cd8b
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples.html
@@ -0,0 +1,989 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance • 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="Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance">
+<meta property="og:description" content="mkin">
+<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-article">
+ <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 toc-ignore">
+ <h1 data-toc-skip>Evaluation of example datasets from Attachment 1 to the US EPA SOP for the NAFTA guidance</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2020-05-27</h4>
+
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/NAFTA_examples.rmd"><code>vignettes/web_only/NAFTA_examples.rmd</code></a></small>
+ <div class="hidden name"><code>NAFTA_examples.rmd</code></div>
+
+ </div>
+
+
+
+<div id="introduction" class="section level1">
+<h1 class="hasAnchor">
+<a href="#introduction" class="anchor"></a>Introduction</h1>
+<p>In this document, the example evaluations provided in Attachment 1 to the SOP of US EPA for using the NAFTA guidance <span class="citation">(US EPA 2015)</span> are repeated using mkin. The original evaluations reported in the attachment were performed using PestDF in version 0.8.4. Note that PestDF 0.8.13 is the version distributed at the US EPA website today (2019-02-26).</p>
+<p>The datasets are now distributed with the mkin package.</p>
+</div>
+<div id="examples-where-dfop-did-not-converge-with-pestdf-0-8-4" class="section level1">
+<h1 class="hasAnchor">
+<a href="#examples-where-dfop-did-not-converge-with-pestdf-0-8-4" class="anchor"></a>Examples where DFOP did not converge with PestDF 0.8.4</h1>
+<p>In attachment 1, it is reported that the DFOP model does not converge for these datasets when PestDF 0.8.4 was used. For all four datasets, the DFOP model can be fitted with mkin (see below). The negative half-life given by PestDF 0.8.4 for these fits appears to be the result of a bug. The results for the other two models (SFO and IORE) are the same.</p>
+<div id="example-on-page-5-upper-panel" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-5-upper-panel" class="anchor"></a>Example on page 5, upper panel</h2>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="no">p5a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p5a"</span>]])</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p5a</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p5a-1.png" width="700"></p>
+<div class="sourceCode" id="cb5"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p5a</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 465.21753 56.27506 32.06401
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 64.4304
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 95.8401 4.67e-21 92.245 99.4357
+## k_parent_sink 0.0102 3.92e-12 0.009 0.0117
+## sigma 4.8230 3.81e-06 3.214 6.4318
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 1.01e+02 NA 9.91e+01 1.02e+02
+## k__iore_parent_sink 1.54e-05 NA 4.08e-06 5.84e-05
+## N_parent 2.57e+00 NA 2.25e+00 2.89e+00
+## sigma 1.68e+00 NA 1.12e+00 2.24e+00
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.99e+01 1.41e-26 98.8116 101.0810
+## k1 2.67e-02 5.05e-06 0.0243 0.0295
+## k2 2.86e-12 5.00e-01 0.0000 Inf
+## g 6.47e-01 3.67e-06 0.6248 0.6677
+## sigma 1.27e+00 8.91e-06 0.8395 1.6929
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 67.7 2.25e+02 6.77e+01
+## IORE 58.2 1.07e+03 3.22e+02
+## DFOP 55.5 4.42e+11 2.42e+11
+##
+## Representative half-life:
+## [1] 321.51</code></pre>
+</div>
+<div id="example-on-page-5-lower-panel" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-5-lower-panel" class="anchor"></a>Example on page 5, lower panel</h2>
+<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="no">p5b</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p5b"</span>]])</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb10"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p5b</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p5b-1.png" width="700"></p>
+<div class="sourceCode" id="cb11"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p5b</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 94.81123 10.10936 7.55871
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 11.77879
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 96.497 2.32e-24 94.85271 98.14155
+## k_parent_sink 0.008 3.42e-14 0.00737 0.00869
+## sigma 2.295 1.22e-05 1.47976 3.11036
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.85e+01 1.17e-28 9.79e+01 9.92e+01
+## k__iore_parent_sink 1.53e-04 6.50e-03 7.21e-05 3.26e-04
+## N_parent 1.94e+00 5.88e-13 1.76e+00 2.12e+00
+## sigma 7.49e-01 1.63e-05 4.82e-01 1.02e+00
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.84e+01 1.24e-27 97.8078 98.9187
+## k1 1.55e-02 4.10e-04 0.0143 0.0167
+## k2 1.16e-11 5.00e-01 0.0000 Inf
+## g 6.89e-01 2.92e-03 0.6626 0.7142
+## sigma 6.48e-01 2.38e-05 0.4147 0.8813
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 86.6 2.88e+02 8.66e+01
+## IORE 85.5 7.17e+02 2.16e+02
+## DFOP 83.6 9.80e+10 5.98e+10
+##
+## Representative half-life:
+## [1] 215.87</code></pre>
+</div>
+<div id="example-on-page-6" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-6" class="anchor"></a>Example on page 6</h2>
+<div class="sourceCode" id="cb13"><html><body><pre class="r"><span class="no">p6</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p6"</span>]])</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb16"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p6</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p6-1.png" width="700"></p>
+<div class="sourceCode" id="cb17"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p6</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 188.45361 51.00699 42.46931
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 58.39888
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 94.7759 7.29e-24 92.3478 97.2039
+## k_parent_sink 0.0179 8.02e-16 0.0166 0.0194
+## sigma 3.0696 3.81e-06 2.0456 4.0936
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 97.12446 2.63e-26 95.62461 98.62431
+## k__iore_parent_sink 0.00252 1.95e-03 0.00134 0.00472
+## N_parent 1.49587 4.07e-13 1.33896 1.65279
+## sigma 1.59698 5.05e-06 1.06169 2.13227
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.66e+01 1.57e-25 95.3476 97.8979
+## k1 2.55e-02 7.33e-06 0.0233 0.0278
+## k2 4.90e-11 5.00e-01 0.0000 Inf
+## g 8.61e-01 7.55e-06 0.8314 0.8867
+## sigma 1.46e+00 6.93e-06 0.9661 1.9483
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 38.6 1.28e+02 3.86e+01
+## IORE 34.0 1.77e+02 5.32e+01
+## DFOP 34.1 6.66e+09 1.41e+10
+##
+## Representative half-life:
+## [1] 53.17</code></pre>
+</div>
+<div id="example-on-page-7" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-7" class="anchor"></a>Example on page 7</h2>
+<div class="sourceCode" id="cb19"><html><body><pre class="r"><span class="no">p7</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p7"</span>]])</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb22"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p7</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p7-1.png" width="700"></p>
+<div class="sourceCode" id="cb23"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p7</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 3661.661 3195.030 3174.145
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 3334.194
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 96.41796 4.80e-53 93.32245 99.51347
+## k_parent_sink 0.00735 7.64e-21 0.00641 0.00843
+## sigma 7.94557 1.83e-15 6.46713 9.42401
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.92e+01 NA 9.55e+01 1.03e+02
+## k__iore_parent_sink 1.60e-05 NA 1.45e-07 1.77e-03
+## N_parent 2.45e+00 NA 1.35e+00 3.54e+00
+## sigma 7.42e+00 NA 6.04e+00 8.80e+00
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.89e+01 9.44e-49 95.4640 102.2573
+## k1 1.81e-02 1.75e-01 0.0116 0.0281
+## k2 1.97e-10 5.00e-01 0.0000 Inf
+## g 6.06e-01 2.19e-01 0.4826 0.7178
+## sigma 7.40e+00 2.97e-15 6.0201 8.7754
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 94.3 3.13e+02 9.43e+01
+## IORE 96.7 1.51e+03 4.55e+02
+## DFOP 96.4 6.97e+09 3.52e+09
+##
+## Representative half-life:
+## [1] 454.55</code></pre>
+</div>
+</div>
+<div id="examples-where-the-representative-half-life-deviates-from-the-observed-dt50" class="section level1">
+<h1 class="hasAnchor">
+<a href="#examples-where-the-representative-half-life-deviates-from-the-observed-dt50" class="anchor"></a>Examples where the representative half-life deviates from the observed DT50</h1>
+<div id="example-on-page-8" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-8" class="anchor"></a>Example on page 8</h2>
+<p>For this dataset, the IORE fit does not converge when the default starting values used by mkin for the IORE model are used. Therefore, a lower value for the rate constant is used here.</p>
+<div class="sourceCode" id="cb25"><html><body><pre class="r"><span class="no">p8</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p8"</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__iore_parent_sink</span> <span class="kw">=</span> <span class="fl">1e-3</span>))</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb28"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p8</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p8-1.png" width="700"></p>
+<div class="sourceCode" id="cb29"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p8</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 1996.9408 444.9237 547.5616
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 477.4924
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 88.16549 6.53e-29 83.37344 92.95754
+## k_parent_sink 0.00803 1.67e-13 0.00674 0.00957
+## sigma 7.44786 4.17e-10 5.66209 9.23363
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.77e+01 7.03e-35 9.44e+01 1.01e+02
+## k__iore_parent_sink 6.14e-05 3.20e-02 2.12e-05 1.78e-04
+## N_parent 2.27e+00 4.23e-18 2.00e+00 2.54e+00
+## sigma 3.52e+00 5.36e-10 2.67e+00 4.36e+00
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 95.70619 8.99e-32 91.87941 99.53298
+## k1 0.02500 5.25e-04 0.01422 0.04394
+## k2 0.00273 6.84e-03 0.00125 0.00597
+## g 0.58835 2.84e-06 0.36595 0.77970
+## sigma 3.90001 6.94e-10 2.96260 4.83741
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 86.3 287 86.3
+## IORE 53.4 668 201.0
+## DFOP 55.6 517 253.0
+##
+## Representative half-life:
+## [1] 201.03</code></pre>
+</div>
+</div>
+<div id="examples-where-sfo-was-not-selected-for-an-abiotic-study" class="section level1">
+<h1 class="hasAnchor">
+<a href="#examples-where-sfo-was-not-selected-for-an-abiotic-study" class="anchor"></a>Examples where SFO was not selected for an abiotic study</h1>
+<div id="example-on-page-9-upper-panel" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-9-upper-panel" class="anchor"></a>Example on page 9, upper panel</h2>
+<div class="sourceCode" id="cb31"><html><body><pre class="r"><span class="no">p9a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p9a"</span>]])</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb34"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p9a</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p9a-1.png" width="700"></p>
+<div class="sourceCode" id="cb35"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p9a</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 839.35238 88.57064 9.93363
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 105.5678
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 88.1933 3.06e-12 79.9447 96.4419
+## k_parent_sink 0.0409 2.07e-07 0.0324 0.0516
+## sigma 7.2429 3.92e-05 4.4768 10.0090
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.89e+01 1.12e-16 9.54e+01 1.02e+02
+## k__iore_parent_sink 1.93e-05 1.13e-01 3.49e-06 1.06e-04
+## N_parent 2.91e+00 1.45e-09 2.50e+00 3.32e+00
+## sigma 2.35e+00 5.31e-05 1.45e+00 3.26e+00
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 9.85e+01 2.54e-20 97.390 99.672
+## k1 1.38e-01 3.52e-05 0.131 0.146
+## k2 6.02e-13 5.00e-01 0.000 Inf
+## g 6.52e-01 8.13e-06 0.642 0.661
+## sigma 7.88e-01 6.13e-02 0.481 1.095
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 16.9 5.63e+01 1.69e+01
+## IORE 11.6 3.37e+02 1.01e+02
+## DFOP 10.5 2.07e+12 1.15e+12
+##
+## Representative half-life:
+## [1] 101.43</code></pre>
+<p>In this example, the residuals of the SFO indicate a lack of fit of this model, so even if it was an abiotic experiment, the data do not suggest a simple exponential decline.</p>
+</div>
+<div id="example-on-page-9-lower-panel" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-9-lower-panel" class="anchor"></a>Example on page 9, lower panel</h2>
+<div class="sourceCode" id="cb37"><html><body><pre class="r"><span class="no">p9b</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p9b"</span>]])</pre></body></html></div>
+<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb44"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p9b</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p9b-1.png" width="700"></p>
+<div class="sourceCode" id="cb45"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p9b</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 35.64867 23.22334 35.64867
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 28.54188
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 94.7123 2.15e-19 93.178 96.2464
+## k_parent_sink 0.0389 4.47e-14 0.037 0.0408
+## sigma 1.5957 1.28e-04 0.932 2.2595
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 93.863 2.32e-18 92.4565 95.269
+## k__iore_parent_sink 0.127 1.85e-02 0.0504 0.321
+## N_parent 0.711 1.88e-05 0.4843 0.937
+## sigma 1.288 1.76e-04 0.7456 1.830
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 94.7123 1.61e-16 93.1355 96.2891
+## k1 0.0389 1.43e-06 0.0312 0.0485
+## k2 0.0389 6.67e-03 0.0186 0.0812
+## g 0.7742 NaN NA NA
+## sigma 1.5957 2.50e-04 0.9135 2.2779
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 17.8 59.2 17.8
+## IORE 18.4 49.2 14.8
+## DFOP 17.8 59.2 17.8
+##
+## Representative half-life:
+## [1] 14.8</code></pre>
+<p>Here, mkin gives a longer slow DT50 for the DFOP model (17.8 days) than PestDF (13.5 days). Presumably, this is related to the fact that PestDF gives a negative value for the proportion of the fast degradation which should be between 0 and 1, inclusive. This parameter is called f in PestDF and g in mkin. In mkin, it is restricted to the interval from 0 to 1.</p>
+</div>
+<div id="example-on-page-10" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-10" class="anchor"></a>Example on page 10</h2>
+<div class="sourceCode" id="cb47"><html><body><pre class="r"><span class="no">p10</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p10"</span>]])</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb50"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p10</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p10-1.png" width="700"></p>
+<div class="sourceCode" id="cb51"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p10</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 899.4089 336.4348 899.4089
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 413.4841
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 101.7315 6.42e-11 91.9259 111.5371
+## k_parent_sink 0.0495 1.70e-07 0.0404 0.0607
+## sigma 8.0152 1.28e-04 4.6813 11.3491
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 96.86 3.32e-12 90.848 102.863
+## k__iore_parent_sink 2.96 7.91e-02 0.687 12.761
+## N_parent 0.00 5.00e-01 -0.372 0.372
+## sigma 4.90 1.77e-04 2.837 6.968
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 101.7315 1.41e-09 91.6534 111.8097
+## k1 0.0495 6.42e-04 0.0301 0.0814
+## k2 0.0495 1.66e-02 0.0200 0.1225
+## g 0.6634 5.00e-01 0.0000 1.0000
+## sigma 8.0152 2.50e-04 4.5886 11.4418
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 14.0 46.5 14.00
+## IORE 16.4 29.4 8.86
+## DFOP 14.0 46.5 14.00
+##
+## Representative half-life:
+## [1] 8.86</code></pre>
+<p>Here, a value below N is given for the IORE model, because the data suggests a faster decline towards the end of the experiment, which appears physically rather unlikely in the case of a photolysis study. It seems PestDF does not constrain N to values above zero, thus the slight difference in IORE model parameters between PestDF and mkin.</p>
+</div>
+</div>
+<div id="the-dt50-was-not-observed-during-the-study" class="section level1">
+<h1 class="hasAnchor">
+<a href="#the-dt50-was-not-observed-during-the-study" class="anchor"></a>The DT50 was not observed during the study</h1>
+<div id="example-on-page-11" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-11" class="anchor"></a>Example on page 11</h2>
+<div class="sourceCode" id="cb53"><html><body><pre class="r"><span class="no">p11</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p11"</span>]])</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb56"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p11</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p11-1.png" width="700"></p>
+<div class="sourceCode" id="cb57"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p11</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 579.6805 204.7932 144.7783
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 251.6944
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 96.15820 4.83e-13 90.24934 1.02e+02
+## k_parent_sink 0.00321 4.71e-05 0.00222 4.64e-03
+## sigma 6.43473 1.28e-04 3.75822 9.11e+00
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 1.05e+02 NA 9.90e+01 1.10e+02
+## k__iore_parent_sink 3.11e-17 NA 1.35e-20 7.18e-14
+## N_parent 8.36e+00 NA 6.62e+00 1.01e+01
+## sigma 3.82e+00 NA 2.21e+00 5.44e+00
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 1.05e+02 9.47e-13 99.9990 109.1224
+## k1 4.41e-02 5.95e-03 0.0296 0.0658
+## k2 7.25e-13 5.00e-01 0.0000 Inf
+## g 3.22e-01 1.45e-03 0.2814 0.3650
+## sigma 3.22e+00 3.52e-04 1.8410 4.5906
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 2.16e+02 7.18e+02 2.16e+02
+## IORE 9.73e+02 1.37e+08 4.11e+07
+## DFOP 4.21e+11 2.64e+12 9.56e+11
+##
+## Representative half-life:
+## [1] 41148169</code></pre>
+<p>In this case, the DFOP fit reported for PestDF resulted in a negative value for the slower rate constant, which is not possible in mkin. The other results are in agreement.</p>
+</div>
+</div>
+<div id="n-is-less-than-1-and-the-dfop-rate-constants-are-like-the-sfo-rate-constant" class="section level1">
+<h1 class="hasAnchor">
+<a href="#n-is-less-than-1-and-the-dfop-rate-constants-are-like-the-sfo-rate-constant" class="anchor"></a>N is less than 1 and the DFOP rate constants are like the SFO rate constant</h1>
+<p>In the following three examples, the same results are obtained with mkin as reported for PestDF. As in the case on page 10, the N values below 1 are deemed unrealistic and appear to be the result of an overparameterisation.</p>
+<div id="example-on-page-12-upper-panel" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-12-upper-panel" class="anchor"></a>Example on page 12, upper panel</h2>
+<div class="sourceCode" id="cb59"><html><body><pre class="r"><span class="no">p12a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p12a"</span>]])</pre></body></html></div>
+<pre><code>## Warning in summary.mkinfit(x): Could not calculate correlation; no covariance
+## matrix</code></pre>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb63"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p12a</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p12a-1.png" width="700"></p>
+<div class="sourceCode" id="cb64"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p12a</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 695.4440 220.0685 695.4440
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 270.4679
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 100.521 8.75e-12 92.461 108.581
+## k_parent_sink 0.124 3.61e-08 0.104 0.148
+## sigma 7.048 1.28e-04 4.116 9.980
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 96.823 NA NA NA
+## k__iore_parent_sink 2.436 NA NA NA
+## N_parent 0.263 NA NA NA
+## sigma 3.965 NA NA NA
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 100.521 2.74e-10 92.2366 108.805
+## k1 0.124 5.74e-06 0.0958 0.161
+## k2 0.124 6.61e-02 0.0319 0.484
+## g 0.877 5.00e-01 0.0000 1.000
+## sigma 7.048 2.50e-04 4.0349 10.061
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 5.58 18.5 5.58
+## IORE 6.49 13.2 3.99
+## DFOP 5.58 18.5 5.58
+##
+## Representative half-life:
+## [1] 3.99</code></pre>
+</div>
+<div id="example-on-page-12-lower-panel" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-12-lower-panel" class="anchor"></a>Example on page 12, lower panel</h2>
+<div class="sourceCode" id="cb66"><html><body><pre class="r"><span class="no">p12b</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p12b"</span>]])</pre></body></html></div>
+<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre>
+<pre><code>## Warning in qt(alpha/2, rdf): NaNs produced</code></pre>
+<pre><code>## Warning in qt(1 - alpha/2, rdf): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs produced</code></pre>
+<pre><code>## Warning in pt(abs(tval), rdf, lower.tail = FALSE): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb76"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p12b</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p12b-1.png" width="700"></p>
+<div class="sourceCode" id="cb77"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p12b</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 58.90242 19.06353 58.90242
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 51.51756
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 97.6840 0.00039 85.9388 109.4292
+## k_parent_sink 0.0589 0.00261 0.0431 0.0805
+## sigma 3.4323 0.04356 -1.2377 8.1023
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 95.523 0.0055 74.539157 116.51
+## k__iore_parent_sink 0.333 0.1433 0.000717 154.57
+## N_parent 0.568 0.0677 -0.989464 2.13
+## sigma 1.953 0.0975 -5.893100 9.80
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 97.6840 NaN NaN NaN
+## k1 0.0589 NaN NA NA
+## k2 0.0589 NaN NA NA
+## g 0.6902 NaN NA NA
+## sigma 3.4323 NaN NaN NaN
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 11.8 39.1 11.80
+## IORE 12.9 31.4 9.46
+## DFOP 11.8 39.1 11.80
+##
+## Representative half-life:
+## [1] 9.46</code></pre>
+</div>
+<div id="example-on-page-13" class="section level2">
+<h2 class="hasAnchor">
+<a href="#example-on-page-13" class="anchor"></a>Example on page 13</h2>
+<div class="sourceCode" id="cb79"><html><body><pre class="r"><span class="no">p13</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p13"</span>]])</pre></body></html></div>
+<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb85"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p13</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p13-1.png" width="700"></p>
+<div class="sourceCode" id="cb86"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p13</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 174.5971 142.3951 174.5971
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 172.131
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 92.73500 5.99e-17 89.61936 95.85065
+## k_parent_sink 0.00258 2.42e-09 0.00223 0.00299
+## sigma 3.41172 7.07e-05 2.05455 4.76888
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 91.6016 6.34e-16 88.53086 94.672
+## k__iore_parent_sink 0.0396 2.36e-01 0.00207 0.759
+## N_parent 0.3541 1.46e-01 -0.35153 1.060
+## sigma 3.0811 9.64e-05 1.84296 4.319
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 92.73500 9.25e-15 8.95e+01 9.59e+01
+## k1 0.00258 4.28e-01 1.70e-08 3.92e+02
+## k2 0.00258 3.69e-08 2.20e-03 3.03e-03
+## g 0.00442 5.00e-01 NA NA
+## sigma 3.41172 1.35e-04 2.02e+00 4.80e+00
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 269 892 269
+## IORE 261 560 169
+## DFOP 269 892 269
+##
+## Representative half-life:
+## [1] 168.51</code></pre>
+</div>
+</div>
+<div id="dt50-not-observed-in-the-study-and-dfop-problems-in-pestdf" class="section level1">
+<h1 class="hasAnchor">
+<a href="#dt50-not-observed-in-the-study-and-dfop-problems-in-pestdf" class="anchor"></a>DT50 not observed in the study and DFOP problems in PestDF</h1>
+<div class="sourceCode" id="cb88"><html><body><pre class="r"><span class="no">p14</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p14"</span>]])</pre></body></html></div>
+<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb94"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p14</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p14-1.png" width="700"></p>
+<div class="sourceCode" id="cb95"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p14</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 48.43249 28.67746 27.26248
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 32.83337
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 99.47124 2.06e-30 98.42254 1.01e+02
+## k_parent_sink 0.00279 3.75e-15 0.00256 3.04e-03
+## sigma 1.55616 3.81e-06 1.03704 2.08e+00
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 1.00e+02 NA NaN NaN
+## k__iore_parent_sink 9.44e-08 NA NaN NaN
+## N_parent 3.31e+00 NA NaN NaN
+## sigma 1.20e+00 NA 0.796 1.6
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 1.00e+02 2.96e-28 99.40280 101.2768
+## k1 9.53e-03 1.20e-01 0.00638 0.0143
+## k2 7.29e-12 5.00e-01 0.00000 Inf
+## g 3.98e-01 2.19e-01 0.30481 0.4998
+## sigma 1.17e+00 7.68e-06 0.77406 1.5610
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 2.48e+02 8.25e+02 2.48e+02
+## IORE 4.34e+02 2.22e+04 6.70e+03
+## DFOP 2.54e+10 2.46e+11 9.51e+10
+##
+## Representative half-life:
+## [1] 6697.44</code></pre>
+<p>The slower rate constant reported by PestDF is negative, which is not physically realistic, and not possible in mkin. The other fits give the same results in mkin and PestDF.</p>
+</div>
+<div id="n-is-less-than-1-and-dfop-fraction-parameter-is-below-zero" class="section level1">
+<h1 class="hasAnchor">
+<a href="#n-is-less-than-1-and-dfop-fraction-parameter-is-below-zero" class="anchor"></a>N is less than 1 and DFOP fraction parameter is below zero</h1>
+<div class="sourceCode" id="cb97"><html><body><pre class="r"><span class="no">p15a</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p15a"</span>]])</pre></body></html></div>
+<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(diag(covar_notrans)): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb104"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p15a</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p15a-1.png" width="700"></p>
+<div class="sourceCode" id="cb105"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p15a</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 245.5248 135.0132 245.5248
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 165.9335
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 97.96751 2.00e-15 94.32049 101.615
+## k_parent_sink 0.00952 4.93e-09 0.00824 0.011
+## sigma 4.18778 1.28e-04 2.44588 5.930
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 95.874 2.94e-15 92.937 98.811
+## k__iore_parent_sink 0.629 2.11e-01 0.044 8.982
+## N_parent 0.000 5.00e-01 -0.642 0.642
+## sigma 3.105 1.78e-04 1.795 4.416
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 97.96752 2.85e-13 94.21914 101.7159
+## k1 0.00952 6.80e-02 0.00277 0.0327
+## k2 0.00952 3.82e-06 0.00902 0.0100
+## g 0.17247 NaN NA NA
+## sigma 4.18778 2.50e-04 2.39747 5.9781
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 72.8 242 72.8
+## IORE 76.3 137 41.3
+## DFOP 72.8 242 72.8
+##
+## Representative half-life:
+## [1] 41.33</code></pre>
+<div class="sourceCode" id="cb107"><html><body><pre class="r"><span class="no">p15b</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p15b"</span>]])</pre></body></html></div>
+<pre><code>## Warning in sqrt(diag(covar)): NaNs produced</code></pre>
+<pre><code>## Warning in sqrt(1/diag(V)): NaNs produced</code></pre>
+<pre><code>## Warning in cov2cor(ans$covar): diag(.) had 0 or NA entries; non-finite result is
+## doubtful</code></pre>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The half-life obtained from the IORE model may be used</code></pre>
+<div class="sourceCode" id="cb113"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p15b</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p15b-1.png" width="700"></p>
+<div class="sourceCode" id="cb114"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p15b</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 106.91629 68.55574 106.91629
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 84.25618
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 1.01e+02 3.06e-17 98.31594 1.03e+02
+## k_parent_sink 4.86e-03 2.48e-10 0.00435 5.42e-03
+## sigma 2.76e+00 1.28e-04 1.61402 3.91e+00
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 99.83 1.81e-16 97.51349 102.14
+## k__iore_parent_sink 0.38 3.22e-01 0.00352 41.05
+## N_parent 0.00 5.00e-01 -1.07695 1.08
+## sigma 2.21 2.57e-04 1.23245 3.19
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 1.01e+02 NA 9.82e+01 1.04e+02
+## k1 4.86e-03 NA 6.75e-04 3.49e-02
+## k2 4.86e-03 NA 3.37e-03 6.99e-03
+## g 1.50e-01 NA NA NA
+## sigma 2.76e+00 NA 1.58e+00 3.94e+00
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 143 474 143.0
+## IORE 131 236 71.2
+## DFOP 143 474 143.0
+##
+## Representative half-life:
+## [1] 71.18</code></pre>
+<p>In mkin, only the IORE fit is affected (deemed unrealistic), as the fraction parameter of the DFOP model is restricted to the interval between 0 and 1 in mkin. The SFO fits give the same results for both mkin and PestDF.</p>
+</div>
+<div id="the-dfop-fraction-parameter-is-greater-than-1" class="section level1">
+<h1 class="hasAnchor">
+<a href="#the-dfop-fraction-parameter-is-greater-than-1" class="anchor"></a>The DFOP fraction parameter is greater than 1</h1>
+<div class="sourceCode" id="cb116"><html><body><pre class="r"><span class="no">p16</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/nafta.html">nafta</a></span>(<span class="no">NAFTA_SOP_Attachment</span><span class="kw">[[</span><span class="st">"p16"</span>]])</pre></body></html></div>
+<pre><code>## The SFO model is rejected as S_SFO is equal or higher than the critical value S_c</code></pre>
+<pre><code>## The representative half-life of the IORE model is longer than the one corresponding</code></pre>
+<pre><code>## to the terminal degradation rate found with the DFOP model.</code></pre>
+<pre><code>## The representative half-life obtained from the DFOP model may be used</code></pre>
+<div class="sourceCode" id="cb121"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/plot.html">plot</a></span>(<span class="no">p16</span>)</pre></body></html></div>
+<p><img src="NAFTA_examples_files/figure-html/p16-1.png" width="700"></p>
+<div class="sourceCode" id="cb122"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">p16</span>)</pre></body></html></div>
+<pre><code>## Sums of squares:
+## SFO IORE DFOP
+## 3831.804 2062.008 1550.980
+##
+## Critical sum of squares for checking the SFO model:
+## [1] 2247.348
+##
+## Parameters:
+## $SFO
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 71.953 2.33e-13 60.509 83.40
+## k_parent_sink 0.159 4.86e-05 0.102 0.25
+## sigma 11.302 1.25e-08 8.308 14.30
+##
+## $IORE
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 8.74e+01 2.48e-16 7.72e+01 97.52972
+## k__iore_parent_sink 4.55e-04 2.16e-01 3.48e-05 0.00595
+## N_parent 2.70e+00 1.21e-08 1.99e+00 3.40046
+## sigma 8.29e+00 1.61e-08 6.09e+00 10.49062
+##
+## $DFOP
+## Estimate Pr(&gt;t) Lower Upper
+## parent_0 88.5333 7.40e-18 79.9836 97.083
+## k1 18.5561 5.00e-01 0.0000 Inf
+## k2 0.0776 1.41e-05 0.0518 0.116
+## g 0.4733 1.41e-09 0.3674 0.582
+## sigma 7.1902 2.11e-08 5.2785 9.102
+##
+##
+## DTx values:
+## DT50 DT90 DT50_rep
+## SFO 4.35 14.4 4.35
+## IORE 1.48 32.1 9.67
+## DFOP 0.67 21.4 8.93
+##
+## Representative half-life:
+## [1] 8.93</code></pre>
+<p>In PestDF, the DFOP fit seems to have stuck in a local minimum, as mkin finds a solution with a much lower <span class="math inline">\(\chi^2\)</span> error level. As the half-life from the slower rate constant of the DFOP model is larger than the IORE derived half-life, the NAFTA recommendation obtained with mkin is to use the DFOP representative half-life of 8.9 days.</p>
+</div>
+<div id="conclusions" class="section level1">
+<h1 class="hasAnchor">
+<a href="#conclusions" class="anchor"></a>Conclusions</h1>
+<p>The results obtained with mkin deviate from the results obtained with PestDF either in cases where one of the interpretive rules would apply, i.e. the IORE parameter N is less than one or the DFOP k values obtained with PestDF are equal to the SFO k values, or in cases where the DFOP model did not converge, which often lead to negative rate constants returned by PestDF.</p>
+<p>Therefore, mkin appears to suitable for kinetic evaluations according to the NAFTA guidance.</p>
+</div>
+<div id="references" class="section level1 unnumbered">
+<h1 class="hasAnchor">
+<a href="#references" class="anchor"></a>References</h1>
+<div id="refs" class="references">
+<div id="ref-usepa2015">
+<p>US EPA. 2015. “Standard Operating Procedure for Using the NAFTA Guidance to Calculate Representative Half-Life Values and Characterizing Pesticide Degradation.”</p>
+</div>
+</div>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+
+ <nav id="toc" data-toggle="toc"><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/articles/web_only/NAFTA_examples_files/figure-html/p10-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p10-1.png
new file mode 100644
index 00000000..291b48e1
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p10-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p11-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p11-1.png
new file mode 100644
index 00000000..149cf24c
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p11-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p12a-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p12a-1.png
new file mode 100644
index 00000000..85ea5f4e
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p12a-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p12b-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p12b-1.png
new file mode 100644
index 00000000..0ae354c4
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p12b-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p13-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p13-1.png
new file mode 100644
index 00000000..d0f89858
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p13-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p14-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p14-1.png
new file mode 100644
index 00000000..84b53d01
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p14-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p15a-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p15a-1.png
new file mode 100644
index 00000000..a09b2e3d
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p15a-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p15b-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p15b-1.png
new file mode 100644
index 00000000..5a51714c
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p15b-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p16-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p16-1.png
new file mode 100644
index 00000000..36999356
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p16-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p5a-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p5a-1.png
new file mode 100644
index 00000000..596a33b2
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p5a-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p5b-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p5b-1.png
new file mode 100644
index 00000000..e6f9716e
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p5b-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p6-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p6-1.png
new file mode 100644
index 00000000..f8576168
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p6-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png
new file mode 100644
index 00000000..218a790f
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p7-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p8-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p8-1.png
new file mode 100644
index 00000000..fa8621e7
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p8-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p9a-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p9a-1.png
new file mode 100644
index 00000000..aac3600b
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p9a-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p9b-1.png b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p9b-1.png
new file mode 100644
index 00000000..cb52aecd
--- /dev/null
+++ b/docs/dev/articles/web_only/NAFTA_examples_files/figure-html/p9b-1.png
Binary files differ
diff --git a/docs/dev/articles/web_only/benchmarks.html b/docs/dev/articles/web_only/benchmarks.html
new file mode 100644
index 00000000..b46b873c
--- /dev/null
+++ b/docs/dev/articles/web_only/benchmarks.html
@@ -0,0 +1,391 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Benchmark timings for mkin • mkin</title>
+<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous">
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script><!-- bootstrap-toc --><link rel="stylesheet" href="../../bootstrap-toc.css">
+<script src="../../bootstrap-toc.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
+<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../../pkgdown.css" rel="stylesheet">
+<script src="../../pkgdown.js"></script><meta property="og:title" content="Benchmark timings for mkin">
+<meta property="og:description" content="mkin">
+<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-article">
+ <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 toc-ignore">
+ <h1 data-toc-skip>Benchmark timings for mkin</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2020-05-27</h4>
+
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/benchmarks.rmd"><code>vignettes/web_only/benchmarks.rmd</code></a></small>
+ <div class="hidden name"><code>benchmarks.rmd</code></div>
+
+ </div>
+
+
+
+<p>Each system is characterized by its CPU type, the operating system type and the mkin version. Currently only values for one system are available. A compiler was available, so if no analytical solution was available, compiled ODE models are used.</p>
+<div id="test-cases" class="section level2">
+<h2 class="hasAnchor">
+<a href="#test-cases" class="anchor"></a>Test cases</h2>
+<p>Parent only:</p>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="no">FOCUS_C</span> <span class="kw">&lt;-</span> <span class="no">FOCUS_2006_C</span>
+<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="no">parent_datasets</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_C</span>, <span class="no">FOCUS_D</span>)
+
+<span class="no">t1</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="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="no">parent_datasets</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t2</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>, <span class="st">"HS"</span>), <span class="no">parent_datasets</span>,
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div>
+<p>One metabolite:</p>
+<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="no">SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"m1"</span>),
+ <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))
+<span class="no">FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>),
+ <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))
+<span class="no">DFOP_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>),
+ <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))
+<span class="no">t3</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t4</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t5</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOMC_SFO</span>, <span class="no">DFOP_SFO</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">FOCUS_D</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div>
+<p>Two metabolites, synthetic data:</p>
+<div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="no">m_synth_SFO_lin</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M1"</span>),
+ <span class="kw">M1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M2"</span>),
+ <span class="kw">M2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+
+<span class="no">m_synth_DFOP_par</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(<span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"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="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="kw">M2</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),
+ <span class="kw">use_of_ff</span> <span class="kw">=</span> <span class="st">"max"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+
+<span class="no">SFO_lin_a</span> <span class="kw">&lt;-</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="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">t6</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="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t7</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>)))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+
+<span class="no">t8</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="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t9</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"tc"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+
+<span class="no">t10</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="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_SFO_lin</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">SFO_lin_a</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]
+<span class="no">t11</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.time.html">system.time</a></span>(<span class="fu">mmkin_bench</span>(<span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">m_synth_DFOP_par</span>), <span class="fu"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="no">DFOP_par_c</span>),
+ <span class="kw">error_model</span> <span class="kw">=</span> <span class="st">"obs"</span>))<span class="kw">[[</span><span class="st">"elapsed"</span>]]</pre></body></html></div>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="no">mkin_benchmarks</span>[<span class="no">system_string</span>, <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span>(<span class="st">"t"</span>, <span class="fl">1</span>:<span class="fl">11</span>)] <span class="kw">&lt;-</span>
+ <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="no">t1</span>, <span class="no">t2</span>, <span class="no">t3</span>, <span class="no">t4</span>, <span class="no">t5</span>, <span class="no">t6</span>, <span class="no">t7</span>, <span class="no">t8</span>, <span class="no">t9</span>, <span class="no">t10</span>, <span class="no">t11</span>)
+<span class="fu"><a href="https://rdrr.io/r/base/save.html">save</a></span>(<span class="no">mkin_benchmarks</span>, <span class="kw">file</span> <span class="kw">=</span> <span class="st">"~/git/mkin/vignettes/web_only/mkin_benchmarks.rda"</span>)</pre></body></html></div>
+</div>
+<div id="results" class="section level2">
+<h2 class="hasAnchor">
+<a href="#results" class="anchor"></a>Results</h2>
+<p>Currently, we only have benchmark information on one system, therefore only the mkin version is shown with the results below. Timings are in seconds, shorter is better. All results were obtained by serial, i.e. not using multiple computing cores.</p>
+<p>Benchmarks for all available error models are shown.</p>
+<div id="parent-only" class="section level3">
+<h3 class="hasAnchor">
+<a href="#parent-only" class="anchor"></a>Parent only</h3>
+<p>Constant variance (t1) and two-component error model (t2) for four models fitted to two datasets, i.e. eight fits for each test.</p>
+<table class="table">
+<thead><tr class="header">
+<th align="left">mkin version</th>
+<th align="right">t1 [s]</th>
+<th align="right">t2 [s]</th>
+</tr></thead>
+<tbody>
+<tr class="odd">
+<td align="left">0.9.48.1</td>
+<td align="right">3.610</td>
+<td align="right">11.019</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.49.1</td>
+<td align="right">8.184</td>
+<td align="right">22.889</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.49.2</td>
+<td align="right">7.064</td>
+<td align="right">12.558</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.49.3</td>
+<td align="right">7.296</td>
+<td align="right">21.239</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.49.4</td>
+<td align="right">5.936</td>
+<td align="right">20.545</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.50.2</td>
+<td align="right">1.714</td>
+<td align="right">3.971</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.50.3</td>
+<td align="right">1.752</td>
+<td align="right">3.728</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div id="one-metabolite" class="section level3">
+<h3 class="hasAnchor">
+<a href="#one-metabolite" class="anchor"></a>One metabolite</h3>
+<p>Constant variance (t3), two-component error model (t4), and variance by variable (t5) for three models fitted to one dataset, i.e. three fits for each test.</p>
+<table class="table">
+<thead><tr class="header">
+<th align="left">mkin version</th>
+<th align="right">t3 [s]</th>
+<th align="right">t4 [s]</th>
+<th align="right">t5 [s]</th>
+</tr></thead>
+<tbody>
+<tr class="odd">
+<td align="left">0.9.48.1</td>
+<td align="right">3.764</td>
+<td align="right">14.347</td>
+<td align="right">9.495</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.49.1</td>
+<td align="right">4.649</td>
+<td align="right">13.789</td>
+<td align="right">6.395</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.49.2</td>
+<td align="right">4.786</td>
+<td align="right">8.461</td>
+<td align="right">5.675</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.49.3</td>
+<td align="right">4.510</td>
+<td align="right">13.805</td>
+<td align="right">7.386</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.49.4</td>
+<td align="right">4.446</td>
+<td align="right">15.335</td>
+<td align="right">6.002</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.50.2</td>
+<td align="right">1.402</td>
+<td align="right">6.174</td>
+<td align="right">2.764</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.50.3</td>
+<td align="right">1.389</td>
+<td align="right">6.579</td>
+<td align="right">2.740</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div id="two-metabolites" class="section level3">
+<h3 class="hasAnchor">
+<a href="#two-metabolites" class="anchor"></a>Two metabolites</h3>
+<p>Constant variance (t6 and t7), two-component error model (t8 and t9), and variance by variable (t10 and t11) for one model fitted to one dataset, i.e. one fit for each test.</p>
+<table class="table">
+<thead><tr class="header">
+<th align="left">mkin version</th>
+<th align="right">t6 [s]</th>
+<th align="right">t7 [s]</th>
+<th align="right">t8 [s]</th>
+<th align="right">t9 [s]</th>
+<th align="right">t10 [s]</th>
+<th align="right">t11 [s]</th>
+</tr></thead>
+<tbody>
+<tr class="odd">
+<td align="left">0.9.48.1</td>
+<td align="right">2.623</td>
+<td align="right">4.587</td>
+<td align="right">7.525</td>
+<td align="right">16.621</td>
+<td align="right">8.576</td>
+<td align="right">31.267</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.49.1</td>
+<td align="right">2.542</td>
+<td align="right">4.128</td>
+<td align="right">4.632</td>
+<td align="right">8.171</td>
+<td align="right">3.676</td>
+<td align="right">5.636</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.49.2</td>
+<td align="right">2.723</td>
+<td align="right">4.478</td>
+<td align="right">4.862</td>
+<td align="right">7.618</td>
+<td align="right">3.579</td>
+<td align="right">5.574</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.49.3</td>
+<td align="right">2.643</td>
+<td align="right">4.374</td>
+<td align="right">7.020</td>
+<td align="right">11.124</td>
+<td align="right">5.388</td>
+<td align="right">7.365</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.49.4</td>
+<td align="right">2.635</td>
+<td align="right">4.259</td>
+<td align="right">4.737</td>
+<td align="right">7.763</td>
+<td align="right">3.427</td>
+<td align="right">5.626</td>
+</tr>
+<tr class="even">
+<td align="left">0.9.50.2</td>
+<td align="right">0.777</td>
+<td align="right">1.236</td>
+<td align="right">1.332</td>
+<td align="right">2.872</td>
+<td align="right">2.069</td>
+<td align="right">2.987</td>
+</tr>
+<tr class="odd">
+<td align="left">0.9.50.3</td>
+<td align="right">0.760</td>
+<td align="right">1.252</td>
+<td align="right">1.457</td>
+<td align="right">4.201</td>
+<td align="right">2.007</td>
+<td align="right">2.979</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+
+ <nav id="toc" data-toggle="toc"><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/articles/web_only/compiled_models.html b/docs/dev/articles/web_only/compiled_models.html
new file mode 100644
index 00000000..7b5dc8ca
--- /dev/null
+++ b/docs/dev/articles/web_only/compiled_models.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Performance benefit by using compiled model definitions in mkin • 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="Performance benefit by using compiled model definitions in mkin">
+<meta property="og:description" content="mkin">
+<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-article">
+ <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 toc-ignore">
+ <h1 data-toc-skip>Performance benefit by using compiled model definitions in mkin</h1>
+ <h4 class="author">Johannes Ranke</h4>
+
+ <h4 class="date">2020-05-27</h4>
+
+ <small class="dont-index">Source: <a href="http://github.com/jranke/mkin/blob/master/vignettes/web_only/compiled_models.rmd"><code>vignettes/web_only/compiled_models.rmd</code></a></small>
+ <div class="hidden name"><code>compiled_models.rmd</code></div>
+
+ </div>
+
+
+
+<div id="how-to-benefit-from-compiled-models" class="section level2">
+<h2 class="hasAnchor">
+<a href="#how-to-benefit-from-compiled-models" class="anchor"></a>How to benefit from compiled models</h2>
+<p>When using an mkin version equal to or greater than 0.9-36 and a C compiler is available, you will see a message that the model is being compiled from autogenerated C code when defining a model using mkinmod. Starting from version 0.9.49.9, the <code><a href="../../reference/mkinmod.html">mkinmod()</a></code> function checks for presence of a compiler using</p>
+<div class="sourceCode" id="cb1"><html><body><pre class="r"><span class="kw pkg">pkgbuild</span><span class="kw ns">::</span><span class="fu"><a href="https://rdrr.io/pkg/pkgbuild/man/has_compiler.html">has_compiler</a></span>()</pre></body></html></div>
+<p>In previous versions, it used <code><a href="https://rdrr.io/r/base/Sys.which.html">Sys.which("gcc")</a></code> for this check.</p>
+<p>On Linux, you need to have the essential build tools like make and gcc or clang installed. On Debian based linux distributions, these will be pulled in by installing the build-essential package.</p>
+<p>On MacOS, which I do not use personally, I have had reports that a compiler is available by default.</p>
+<p>On Windows, you need to install Rtools and have the path to its bin directory in your PATH variable. You do not need to modify the PATH variable when installing Rtools. Instead, I would recommend to put the line</p>
+<div class="sourceCode" id="cb2"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/Sys.setenv.html">Sys.setenv</a></span>(<span class="kw">PATH</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html">paste</a></span>(<span class="st">"C:/Rtools/bin"</span>, <span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html">Sys.getenv</a></span>(<span class="st">"PATH"</span>), <span class="kw">sep</span><span class="kw">=</span><span class="st">";"</span>))</pre></body></html></div>
+<p>into your .Rprofile startup file. This is just a text file with some R code that is executed when your R session starts. It has to be named .Rprofile and has to be located in your home directory, which will generally be your Documents folder. You can check the location of the home directory used by R by issuing</p>
+<div class="sourceCode" id="cb3"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/Sys.getenv.html">Sys.getenv</a></span>(<span class="st">"HOME"</span>)</pre></body></html></div>
+</div>
+<div id="comparison-with-other-solution-methods" class="section level2">
+<h2 class="hasAnchor">
+<a href="#comparison-with-other-solution-methods" class="anchor"></a>Comparison with other solution methods</h2>
+<p>First, we build a simple degradation model for a parent compound with one metabolite, and we remove zero values from the dataset.</p>
+<div class="sourceCode" id="cb4"><html><body><pre class="r"><span class="fu"><a href="https://rdrr.io/r/base/library.html">library</a></span>(<span class="st">"mkin"</span>, <span class="kw">quietly</span> <span class="kw">=</span> <span class="fl">TRUE</span>)
+<span class="no">SFO_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"m1"</span>),
+ <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<div class="sourceCode" id="cb6"><html><body><pre class="r"><span class="no">FOCUS_D</span> <span class="kw">&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>)</pre></body></html></div>
+<p>We can compare the performance of the Eigenvalue based solution against the compiled version and the R implementation of the differential equations using the benchmark package. In the output of below code, the warnings about zero being removed from the FOCUS D dataset are suppressed. Since mkin version 0.9.49.11, an analytical solution is also implemented, which is included in the tests below.</p>
+<div class="sourceCode" id="cb7"><html><body><pre class="r"><span class="kw">if</span> (<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="no">rbenchmark</span>)) {
+ <span class="no">b.1</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html">benchmark</a></span>(
+ <span class="st">"deSolve, not compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"deSolve"</span>,
+ <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="st">"Eigenvalue based"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"eigen"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="st">"deSolve, compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"deSolve"</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="st">"analytical"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">SFO_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">solution_type</span> <span class="kw">=</span> <span class="st">"analytical"</span>,
+ <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="kw">replications</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">order</span> <span class="kw">=</span> <span class="st">"relative"</span>,
+ <span class="kw">columns</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"test"</span>, <span class="st">"replications"</span>, <span class="st">"relative"</span>, <span class="st">"elapsed"</span>))
+ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">b.1</span>)
+} <span class="kw">else</span> {
+ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="st">"R package rbenchmark is not available"</span>)
+}</pre></body></html></div>
+<pre><code>## test replications relative elapsed
+## 4 analytical 1 1.000 0.202
+## 3 deSolve, compiled 1 1.703 0.344
+## 2 Eigenvalue based 1 1.990 0.402
+## 1 deSolve, not compiled 1 40.173 8.115</code></pre>
+<p>We see that using the compiled model is by more than a factor of 10 faster than using deSolve without compiled code.</p>
+</div>
+<div id="model-without-analytical-solution" class="section level2">
+<h2 class="hasAnchor">
+<a href="#model-without-analytical-solution" class="anchor"></a>Model without analytical solution</h2>
+<p>This evaluation is also taken from the example section of mkinfit. No analytical solution is available for this system, and now Eigenvalue based solution is possible, so only deSolve using with or without compiled code is available.</p>
+<div class="sourceCode" id="cb9"><html><body><pre class="r"><span class="kw">if</span> (<span class="fu"><a href="https://rdrr.io/r/base/library.html">require</a></span>(<span class="no">rbenchmark</span>)) {
+ <span class="no">FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="../../reference/mkinmod.html">mkinmod</a></span>(
+ <span class="kw">parent</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>),
+ <span class="kw">m1</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinsub.html">mkinsub</a></span>( <span class="st">"SFO"</span>))
+
+ <span class="no">b.2</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/rbenchmark/man/benchmark.html">benchmark</a></span>(
+ <span class="st">"deSolve, not compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">FOMC_SFO</span>, <span class="no">FOCUS_D</span>,
+ <span class="kw">use_compiled</span> <span class="kw">=</span> <span class="fl">FALSE</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="st">"deSolve, compiled"</span> <span class="kw">=</span> <span class="fu"><a href="../../reference/mkinfit.html">mkinfit</a></span>(<span class="no">FOMC_SFO</span>, <span class="no">FOCUS_D</span>, <span class="kw">quiet</span> <span class="kw">=</span> <span class="fl">TRUE</span>),
+ <span class="kw">replications</span> <span class="kw">=</span> <span class="fl">1</span>, <span class="kw">order</span> <span class="kw">=</span> <span class="st">"relative"</span>,
+ <span class="kw">columns</span> <span class="kw">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"test"</span>, <span class="st">"replications"</span>, <span class="st">"relative"</span>, <span class="st">"elapsed"</span>))
+ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="no">b.2</span>)
+ <span class="no">factor_FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/Round.html">round</a></span>(<span class="no">b.2</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>])
+} <span class="kw">else</span> {
+ <span class="no">factor_FOMC_SFO</span> <span class="kw">&lt;-</span> <span class="fl">NA</span>
+ <span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span>(<span class="st">"R package benchmark is not available"</span>)
+}</pre></body></html></div>
+<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre>
+<pre><code>## test replications relative elapsed
+## 2 deSolve, compiled 1 1.000 0.469
+## 1 deSolve, not compiled 1 30.384 14.250</code></pre>
+<p>Here we get a performance benefit of a factor of 30 using the version of the differential equation model compiled from C code!</p>
+<p>This vignette was built with mkin 0.9.50.3 on</p>
+<pre><code>## R version 4.0.0 (2020-04-24)
+## Platform: x86_64-pc-linux-gnu (64-bit)
+## Running under: Debian GNU/Linux 10 (buster)</code></pre>
+<pre><code>## CPU model: AMD Ryzen 7 1700 Eight-Core Processor</code></pre>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+
+ <nav id="toc" data-toggle="toc"><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/authors.html b/docs/dev/authors.html
new file mode 100644
index 00000000..167a8d06
--- /dev/null
+++ b/docs/dev/authors.html
@@ -0,0 +1,186 @@
+<!-- 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>Authors • 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="Authors" />
+
+
+<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-authors">
+ <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>Authors</h1>
+ </div>
+
+ <ul class="list-unstyled">
+ <li>
+ <p><strong>Johannes Ranke</strong>. Author, maintainer, copyright holder. <a href='https://orcid.org/0000-0003-4371-6538' target='orcid.widget' aria-label='ORCID'><span class='fab fa-orcid orcid' aria-hidden='true'></span></a>
+ </p>
+ </li>
+ <li>
+ <p><strong>Katrin Lindenberger</strong>. Contributor.
+ </p>
+ </li>
+ <li>
+ <p><strong>René Lehmann</strong>. Contributor.
+ </p>
+ </li>
+ <li>
+ <p><strong>Eurofins Regulatory AG</strong>. Copyright holder.
+ </p>
+ </li>
+ </ul>
+
+ </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/bootstrap-toc.css b/docs/dev/bootstrap-toc.css
new file mode 100644
index 00000000..5a859415
--- /dev/null
+++ b/docs/dev/bootstrap-toc.css
@@ -0,0 +1,60 @@
+/*!
+ * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/)
+ * Copyright 2015 Aidan Feldman
+ * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */
+
+/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */
+
+/* All levels of nav */
+nav[data-toggle='toc'] .nav > li > a {
+ display: block;
+ padding: 4px 20px;
+ font-size: 13px;
+ font-weight: 500;
+ color: #767676;
+}
+nav[data-toggle='toc'] .nav > li > a:hover,
+nav[data-toggle='toc'] .nav > li > a:focus {
+ padding-left: 19px;
+ color: #563d7c;
+ text-decoration: none;
+ background-color: transparent;
+ border-left: 1px solid #563d7c;
+}
+nav[data-toggle='toc'] .nav > .active > a,
+nav[data-toggle='toc'] .nav > .active:hover > a,
+nav[data-toggle='toc'] .nav > .active:focus > a {
+ padding-left: 18px;
+ font-weight: bold;
+ color: #563d7c;
+ background-color: transparent;
+ border-left: 2px solid #563d7c;
+}
+
+/* Nav: second level (shown on .active) */
+nav[data-toggle='toc'] .nav .nav {
+ display: none; /* Hide by default, but at >768px, show it */
+ padding-bottom: 10px;
+}
+nav[data-toggle='toc'] .nav .nav > li > a {
+ padding-top: 1px;
+ padding-bottom: 1px;
+ padding-left: 30px;
+ font-size: 12px;
+ font-weight: normal;
+}
+nav[data-toggle='toc'] .nav .nav > li > a:hover,
+nav[data-toggle='toc'] .nav .nav > li > a:focus {
+ padding-left: 29px;
+}
+nav[data-toggle='toc'] .nav .nav > .active > a,
+nav[data-toggle='toc'] .nav .nav > .active:hover > a,
+nav[data-toggle='toc'] .nav .nav > .active:focus > a {
+ padding-left: 28px;
+ font-weight: 500;
+}
+
+/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */
+nav[data-toggle='toc'] .nav > .active > ul {
+ display: block;
+}
diff --git a/docs/dev/bootstrap-toc.js b/docs/dev/bootstrap-toc.js
new file mode 100644
index 00000000..1cdd573b
--- /dev/null
+++ b/docs/dev/bootstrap-toc.js
@@ -0,0 +1,159 @@
+/*!
+ * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/)
+ * Copyright 2015 Aidan Feldman
+ * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */
+(function() {
+ 'use strict';
+
+ window.Toc = {
+ helpers: {
+ // return all matching elements in the set, or their descendants
+ findOrFilter: function($el, selector) {
+ // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/
+ // http://stackoverflow.com/a/12731439/358804
+ var $descendants = $el.find(selector);
+ return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])');
+ },
+
+ generateUniqueIdBase: function(el) {
+ var text = $(el).text();
+ var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-');
+ return anchor || el.tagName.toLowerCase();
+ },
+
+ generateUniqueId: function(el) {
+ var anchorBase = this.generateUniqueIdBase(el);
+ for (var i = 0; ; i++) {
+ var anchor = anchorBase;
+ if (i > 0) {
+ // add suffix
+ anchor += '-' + i;
+ }
+ // check if ID already exists
+ if (!document.getElementById(anchor)) {
+ return anchor;
+ }
+ }
+ },
+
+ generateAnchor: function(el) {
+ if (el.id) {
+ return el.id;
+ } else {
+ var anchor = this.generateUniqueId(el);
+ el.id = anchor;
+ return anchor;
+ }
+ },
+
+ createNavList: function() {
+ return $('<ul class="nav"></ul>');
+ },
+
+ createChildNavList: function($parent) {
+ var $childList = this.createNavList();
+ $parent.append($childList);
+ return $childList;
+ },
+
+ generateNavEl: function(anchor, text) {
+ var $a = $('<a></a>');
+ $a.attr('href', '#' + anchor);
+ $a.text(text);
+ var $li = $('<li></li>');
+ $li.append($a);
+ return $li;
+ },
+
+ generateNavItem: function(headingEl) {
+ var anchor = this.generateAnchor(headingEl);
+ var $heading = $(headingEl);
+ var text = $heading.data('toc-text') || $heading.text();
+ return this.generateNavEl(anchor, text);
+ },
+
+ // Find the first heading level (`<h1>`, then `<h2>`, etc.) that has more than one element. Defaults to 1 (for `<h1>`).
+ getTopLevel: function($scope) {
+ for (var i = 1; i <= 6; i++) {
+ var $headings = this.findOrFilter($scope, 'h' + i);
+ if ($headings.length > 1) {
+ return i;
+ }
+ }
+
+ return 1;
+ },
+
+ // returns the elements for the top level, and the next below it
+ getHeadings: function($scope, topLevel) {
+ var topSelector = 'h' + topLevel;
+
+ var secondaryLevel = topLevel + 1;
+ var secondarySelector = 'h' + secondaryLevel;
+
+ return this.findOrFilter($scope, topSelector + ',' + secondarySelector);
+ },
+
+ getNavLevel: function(el) {
+ return parseInt(el.tagName.charAt(1), 10);
+ },
+
+ populateNav: function($topContext, topLevel, $headings) {
+ var $context = $topContext;
+ var $prevNav;
+
+ var helpers = this;
+ $headings.each(function(i, el) {
+ var $newNav = helpers.generateNavItem(el);
+ var navLevel = helpers.getNavLevel(el);
+
+ // determine the proper $context
+ if (navLevel === topLevel) {
+ // use top level
+ $context = $topContext;
+ } else if ($prevNav && $context === $topContext) {
+ // create a new level of the tree and switch to it
+ $context = helpers.createChildNavList($prevNav);
+ } // else use the current $context
+
+ $context.append($newNav);
+
+ $prevNav = $newNav;
+ });
+ },
+
+ parseOps: function(arg) {
+ var opts;
+ if (arg.jquery) {
+ opts = {
+ $nav: arg
+ };
+ } else {
+ opts = arg;
+ }
+ opts.$scope = opts.$scope || $(document.body);
+ return opts;
+ }
+ },
+
+ // accepts a jQuery object, or an options object
+ init: function(opts) {
+ opts = this.helpers.parseOps(opts);
+
+ // ensure that the data attribute is in place for styling
+ opts.$nav.attr('data-toggle', 'toc');
+
+ var $topContext = this.helpers.createChildNavList(opts.$nav);
+ var topLevel = this.helpers.getTopLevel(opts.$scope);
+ var $headings = this.helpers.getHeadings(opts.$scope, topLevel);
+ this.helpers.populateNav($topContext, topLevel, $headings);
+ }
+ };
+
+ $(function() {
+ $('nav[data-toggle="toc"]').each(function(i, el) {
+ var $nav = $(el);
+ Toc.init($nav);
+ });
+ });
+})();
diff --git a/docs/dev/docsearch.css b/docs/dev/docsearch.css
new file mode 100644
index 00000000..e5f1fe1d
--- /dev/null
+++ b/docs/dev/docsearch.css
@@ -0,0 +1,148 @@
+/* Docsearch -------------------------------------------------------------- */
+/*
+ Source: https://github.com/algolia/docsearch/
+ License: MIT
+*/
+
+.algolia-autocomplete {
+ display: block;
+ -webkit-box-flex: 1;
+ -ms-flex: 1;
+ flex: 1
+}
+
+.algolia-autocomplete .ds-dropdown-menu {
+ width: 100%;
+ min-width: none;
+ max-width: none;
+ padding: .75rem 0;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid rgba(0, 0, 0, .1);
+ box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175);
+}
+
+@media (min-width:768px) {
+ .algolia-autocomplete .ds-dropdown-menu {
+ width: 175%
+ }
+}
+
+.algolia-autocomplete .ds-dropdown-menu::before {
+ display: none
+}
+
+.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] {
+ padding: 0;
+ background-color: rgb(255,255,255);
+ border: 0;
+ max-height: 80vh;
+}
+
+.algolia-autocomplete .ds-dropdown-menu .ds-suggestions {
+ margin-top: 0
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion {
+ padding: 0;
+ overflow: visible
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--category-header {
+ padding: .125rem 1rem;
+ margin-top: 0;
+ font-size: 1.3em;
+ font-weight: 500;
+ color: #00008B;
+ border-bottom: 0
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--wrapper {
+ float: none;
+ padding-top: 0
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column {
+ float: none;
+ width: auto;
+ padding: 0;
+ text-align: left
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--content {
+ float: none;
+ width: auto;
+ padding: 0
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--content::before {
+ display: none
+}
+
+.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header {
+ padding-top: .75rem;
+ margin-top: .75rem;
+ border-top: 1px solid rgba(0, 0, 0, .1)
+}
+
+.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column {
+ display: block;
+ padding: .1rem 1rem;
+ margin-bottom: 0.1;
+ font-size: 1.0em;
+ font-weight: 400
+ /* display: none */
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--title {
+ display: block;
+ padding: .25rem 1rem;
+ margin-bottom: 0;
+ font-size: 0.9em;
+ font-weight: 400
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--text {
+ padding: 0 1rem .5rem;
+ margin-top: -.25rem;
+ font-size: 0.8em;
+ font-weight: 400;
+ line-height: 1.25
+}
+
+.algolia-autocomplete .algolia-docsearch-footer {
+ width: 110px;
+ height: 20px;
+ z-index: 3;
+ margin-top: 10.66667px;
+ float: right;
+ font-size: 0;
+ line-height: 0;
+}
+
+.algolia-autocomplete .algolia-docsearch-footer--logo {
+ background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 130 18' xmlns='http://www.w3.org/2000/svg'><defs><linearGradient x1='-36.868%' y1='134.936%' x2='129.432%' y2='-27.7%' id='a'><stop stop-color='%2300AEFF' offset='0%'/><stop stop-color='%233369E7' offset='100%'/></linearGradient></defs><g fill='none' fill-rule='evenodd'><path d='M59.399.022h13.299a2.372 2.372 0 0 1 2.377 2.364V15.62a2.372 2.372 0 0 1-2.377 2.364H59.399a2.372 2.372 0 0 1-2.377-2.364V2.381A2.368 2.368 0 0 1 59.399.022z' fill='url(%23a)'/><path d='M66.257 4.56c-2.815 0-5.1 2.272-5.1 5.078 0 2.806 2.284 5.072 5.1 5.072 2.815 0 5.1-2.272 5.1-5.078 0-2.806-2.279-5.072-5.1-5.072zm0 8.652c-1.983 0-3.593-1.602-3.593-3.574 0-1.972 1.61-3.574 3.593-3.574 1.983 0 3.593 1.602 3.593 3.574a3.582 3.582 0 0 1-3.593 3.574zm0-6.418v2.664c0 .076.082.131.153.093l2.377-1.226c.055-.027.071-.093.044-.147a2.96 2.96 0 0 0-2.465-1.487c-.055 0-.11.044-.11.104l.001-.001zm-3.33-1.956l-.312-.311a.783.783 0 0 0-1.106 0l-.372.37a.773.773 0 0 0 0 1.101l.307.305c.049.049.121.038.164-.011.181-.245.378-.479.597-.697.225-.223.455-.42.707-.599.055-.033.06-.109.016-.158h-.001zm5.001-.806v-.616a.781.781 0 0 0-.783-.779h-1.824a.78.78 0 0 0-.783.779v.632c0 .071.066.12.137.104a5.736 5.736 0 0 1 1.588-.223c.52 0 1.035.071 1.534.207a.106.106 0 0 0 .131-.104z' fill='%23FFF'/><path d='M102.162 13.762c0 1.455-.372 2.517-1.123 3.193-.75.676-1.895 1.013-3.44 1.013-.564 0-1.736-.109-2.673-.316l.345-1.689c.783.163 1.819.207 2.361.207.86 0 1.473-.174 1.84-.523.367-.349.548-.866.548-1.553v-.349a6.374 6.374 0 0 1-.838.316 4.151 4.151 0 0 1-1.194.158 4.515 4.515 0 0 1-1.616-.278 3.385 3.385 0 0 1-1.254-.817 3.744 3.744 0 0 1-.811-1.351c-.192-.539-.29-1.504-.29-2.212 0-.665.104-1.498.307-2.054a3.925 3.925 0 0 1 .904-1.433 4.124 4.124 0 0 1 1.441-.926 5.31 5.31 0 0 1 1.945-.365c.696 0 1.337.087 1.961.191a15.86 15.86 0 0 1 1.588.332v8.456h-.001zm-5.954-4.206c0 .893.197 1.885.592 2.299.394.414.904.621 1.528.621.34 0 .663-.049.964-.142a2.75 2.75 0 0 0 .734-.332v-5.29a8.531 8.531 0 0 0-1.413-.18c-.778-.022-1.369.294-1.786.801-.411.507-.619 1.395-.619 2.223zm16.12 0c0 .719-.104 1.264-.318 1.858a4.389 4.389 0 0 1-.904 1.52c-.389.42-.854.746-1.402.975-.548.229-1.391.36-1.813.36-.422-.005-1.26-.125-1.802-.36a4.088 4.088 0 0 1-1.397-.975 4.486 4.486 0 0 1-.909-1.52 5.037 5.037 0 0 1-.329-1.858c0-.719.099-1.411.318-1.999.219-.588.526-1.09.92-1.509.394-.42.865-.741 1.402-.97a4.547 4.547 0 0 1 1.786-.338 4.69 4.69 0 0 1 1.791.338c.548.229 1.019.55 1.402.97.389.42.69.921.909 1.509.23.588.345 1.28.345 1.999h.001zm-2.191.005c0-.921-.203-1.689-.597-2.223-.394-.539-.948-.806-1.654-.806-.707 0-1.26.267-1.654.806-.394.539-.586 1.302-.586 2.223 0 .932.197 1.558.592 2.098.394.545.948.812 1.654.812.707 0 1.26-.272 1.654-.812.394-.545.592-1.166.592-2.098h-.001zm6.962 4.707c-3.511.016-3.511-2.822-3.511-3.274L113.583.926l2.142-.338v10.003c0 .256 0 1.88 1.375 1.885v1.792h-.001zm3.774 0h-2.153V5.072l2.153-.338v9.534zm-1.079-10.542c.718 0 1.304-.578 1.304-1.291 0-.714-.581-1.291-1.304-1.291-.723 0-1.304.578-1.304 1.291 0 .714.586 1.291 1.304 1.291zm6.431 1.013c.707 0 1.304.087 1.786.262.482.174.871.42 1.156.73.285.311.488.735.608 1.182.126.447.186.937.186 1.476v5.481a25.24 25.24 0 0 1-1.495.251c-.668.098-1.419.147-2.251.147a6.829 6.829 0 0 1-1.517-.158 3.213 3.213 0 0 1-1.178-.507 2.455 2.455 0 0 1-.761-.904c-.181-.37-.274-.893-.274-1.438 0-.523.104-.855.307-1.215.208-.36.487-.654.838-.883a3.609 3.609 0 0 1 1.227-.49 7.073 7.073 0 0 1 2.202-.103c.263.027.537.076.833.147v-.349c0-.245-.027-.479-.088-.697a1.486 1.486 0 0 0-.307-.583c-.148-.169-.34-.3-.581-.392a2.536 2.536 0 0 0-.915-.163c-.493 0-.942.06-1.353.131-.411.071-.75.153-1.008.245l-.257-1.749c.268-.093.668-.185 1.183-.278a9.335 9.335 0 0 1 1.66-.142l-.001-.001zm.181 7.731c.657 0 1.145-.038 1.484-.104v-2.168a5.097 5.097 0 0 0-1.978-.104c-.241.033-.46.098-.652.191a1.167 1.167 0 0 0-.466.392c-.121.169-.175.267-.175.523 0 .501.175.79.493.981.323.196.75.289 1.293.289h.001zM84.109 4.794c.707 0 1.304.087 1.786.262.482.174.871.42 1.156.73.29.316.487.735.608 1.182.126.447.186.937.186 1.476v5.481a25.24 25.24 0 0 1-1.495.251c-.668.098-1.419.147-2.251.147a6.829 6.829 0 0 1-1.517-.158 3.213 3.213 0 0 1-1.178-.507 2.455 2.455 0 0 1-.761-.904c-.181-.37-.274-.893-.274-1.438 0-.523.104-.855.307-1.215.208-.36.487-.654.838-.883a3.609 3.609 0 0 1 1.227-.49 7.073 7.073 0 0 1 2.202-.103c.257.027.537.076.833.147v-.349c0-.245-.027-.479-.088-.697a1.486 1.486 0 0 0-.307-.583c-.148-.169-.34-.3-.581-.392a2.536 2.536 0 0 0-.915-.163c-.493 0-.942.06-1.353.131-.411.071-.75.153-1.008.245l-.257-1.749c.268-.093.668-.185 1.183-.278a8.89 8.89 0 0 1 1.66-.142l-.001-.001zm.186 7.736c.657 0 1.145-.038 1.484-.104v-2.168a5.097 5.097 0 0 0-1.978-.104c-.241.033-.46.098-.652.191a1.167 1.167 0 0 0-.466.392c-.121.169-.175.267-.175.523 0 .501.175.79.493.981.318.191.75.289 1.293.289h.001zm8.682 1.738c-3.511.016-3.511-2.822-3.511-3.274L89.461.926l2.142-.338v10.003c0 .256 0 1.88 1.375 1.885v1.792h-.001z' fill='%23182359'/><path d='M5.027 11.025c0 .698-.252 1.246-.757 1.644-.505.397-1.201.596-2.089.596-.888 0-1.615-.138-2.181-.414v-1.214c.358.168.739.301 1.141.397.403.097.778.145 1.125.145.508 0 .884-.097 1.125-.29a.945.945 0 0 0 .363-.779.978.978 0 0 0-.333-.747c-.222-.204-.68-.446-1.375-.725-.716-.29-1.221-.621-1.515-.994-.294-.372-.44-.82-.44-1.343 0-.655.233-1.171.698-1.547.466-.376 1.09-.564 1.875-.564.752 0 1.5.165 2.245.494l-.408 1.047c-.698-.294-1.321-.44-1.869-.44-.415 0-.73.09-.945.271a.89.89 0 0 0-.322.717c0 .204.043.379.129.524.086.145.227.282.424.411.197.129.551.299 1.063.51.577.24.999.464 1.268.671.269.208.466.442.591.704.125.261.188.569.188.924l-.001.002zm3.98 2.24c-.924 0-1.646-.269-2.167-.808-.521-.539-.782-1.281-.782-2.226 0-.97.242-1.733.725-2.288.483-.555 1.148-.833 1.993-.833.784 0 1.404.238 1.858.714.455.476.682 1.132.682 1.966v.682H7.357c.018.577.174 1.02.467 1.329.294.31.707.465 1.241.465.351 0 .678-.033.98-.099a5.1 5.1 0 0 0 .975-.33v1.026a3.865 3.865 0 0 1-.935.312 5.723 5.723 0 0 1-1.08.091l.002-.001zm-.231-5.199c-.401 0-.722.127-.964.381s-.386.625-.432 1.112h2.696c-.007-.491-.125-.862-.354-1.115-.229-.252-.544-.379-.945-.379l-.001.001zm7.692 5.092l-.252-.827h-.043c-.286.362-.575.608-.865.739-.29.131-.662.196-1.117.196-.584 0-1.039-.158-1.367-.473-.328-.315-.491-.761-.491-1.337 0-.612.227-1.074.682-1.386.455-.312 1.148-.482 2.079-.51l1.026-.032v-.317c0-.38-.089-.663-.266-.851-.177-.188-.452-.282-.824-.282-.304 0-.596.045-.876.134a6.68 6.68 0 0 0-.806.317l-.408-.902a4.414 4.414 0 0 1 1.058-.384 4.856 4.856 0 0 1 1.085-.132c.756 0 1.326.165 1.711.494.385.329.577.847.577 1.552v4.002h-.902l-.001-.001zm-1.88-.859c.458 0 .826-.128 1.104-.384.278-.256.416-.615.416-1.077v-.516l-.763.032c-.594.021-1.027.121-1.297.298s-.406.448-.406.814c0 .265.079.47.236.615.158.145.394.218.709.218h.001zm7.557-5.189c.254 0 .464.018.628.054l-.124 1.176a2.383 2.383 0 0 0-.559-.064c-.505 0-.914.165-1.227.494-.313.329-.47.757-.47 1.284v3.105h-1.262V7.218h.988l.167 1.047h.064c.197-.354.454-.636.771-.843a1.83 1.83 0 0 1 1.023-.312h.001zm4.125 6.155c-.899 0-1.582-.262-2.049-.787-.467-.525-.701-1.277-.701-2.259 0-.999.244-1.767.733-2.304.489-.537 1.195-.806 2.119-.806.627 0 1.191.116 1.692.349l-.381 1.015c-.534-.208-.974-.312-1.321-.312-1.028 0-1.542.682-1.542 2.046 0 .666.128 1.166.384 1.501.256.335.631.502 1.125.502a3.23 3.23 0 0 0 1.595-.419v1.101a2.53 2.53 0 0 1-.722.285 4.356 4.356 0 0 1-.932.086v.002zm8.277-.107h-1.268V9.506c0-.458-.092-.8-.277-1.026-.184-.226-.477-.338-.878-.338-.53 0-.919.158-1.168.475-.249.317-.373.848-.373 1.593v2.949h-1.262V4.801h1.262v2.122c0 .34-.021.704-.064 1.09h.081a1.76 1.76 0 0 1 .717-.666c.306-.158.663-.236 1.072-.236 1.439 0 2.159.725 2.159 2.175v3.873l-.001-.001zm7.649-6.048c.741 0 1.319.269 1.732.806.414.537.62 1.291.62 2.261 0 .974-.209 1.732-.628 2.275-.419.542-1.001.814-1.746.814-.752 0-1.336-.27-1.751-.811h-.086l-.231.704h-.945V4.801h1.262v1.987l-.021.655-.032.553h.054c.401-.591.992-.886 1.772-.886zm-.328 1.031c-.508 0-.875.149-1.098.448-.224.299-.339.799-.346 1.501v.086c0 .723.115 1.247.344 1.571.229.324.603.486 1.123.486.448 0 .787-.177 1.018-.532.231-.354.346-.867.346-1.536 0-1.35-.462-2.025-1.386-2.025l-.001.001zm3.244-.924h1.375l1.209 3.368c.183.48.304.931.365 1.354h.043c.032-.197.091-.436.177-.717.086-.281.541-1.616 1.364-4.004h1.364l-2.541 6.73c-.462 1.235-1.232 1.853-2.31 1.853-.279 0-.551-.03-.816-.091v-.999c.19.043.406.064.65.064.609 0 1.037-.353 1.284-1.058l.22-.559-2.385-5.941h.001z' fill='%231D3657'/></g></svg>");
+ background-repeat: no-repeat;
+ background-position: 50%;
+ background-size: 100%;
+ overflow: hidden;
+ text-indent: -9000px;
+ width: 100%;
+ height: 100%;
+ display: block;
+ transform: translate(-8px);
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--highlight {
+ color: #FF8C00;
+ background: rgba(232, 189, 54, 0.1)
+}
+
+
+.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
+ box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5)
+}
+
+.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content {
+ background-color: rgba(192, 192, 192, .15)
+}
diff --git a/docs/dev/docsearch.js b/docs/dev/docsearch.js
new file mode 100644
index 00000000..b35504cd
--- /dev/null
+++ b/docs/dev/docsearch.js
@@ -0,0 +1,85 @@
+$(function() {
+
+ // register a handler to move the focus to the search bar
+ // upon pressing shift + "/" (i.e. "?")
+ $(document).on('keydown', function(e) {
+ if (e.shiftKey && e.keyCode == 191) {
+ e.preventDefault();
+ $("#search-input").focus();
+ }
+ });
+
+ $(document).ready(function() {
+ // do keyword highlighting
+ /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */
+ var mark = function() {
+
+ var referrer = document.URL ;
+ var paramKey = "q" ;
+
+ if (referrer.indexOf("?") !== -1) {
+ var qs = referrer.substr(referrer.indexOf('?') + 1);
+ var qs_noanchor = qs.split('#')[0];
+ var qsa = qs_noanchor.split('&');
+ var keyword = "";
+
+ for (var i = 0; i < qsa.length; i++) {
+ var currentParam = qsa[i].split('=');
+
+ if (currentParam.length !== 2) {
+ continue;
+ }
+
+ if (currentParam[0] == paramKey) {
+ keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20"));
+ }
+ }
+
+ if (keyword !== "") {
+ $(".contents").unmark({
+ done: function() {
+ $(".contents").mark(keyword);
+ }
+ });
+ }
+ }
+ };
+
+ mark();
+ });
+});
+
+/* Search term highlighting ------------------------------*/
+
+function matchedWords(hit) {
+ var words = [];
+
+ var hierarchy = hit._highlightResult.hierarchy;
+ // loop to fetch from lvl0, lvl1, etc.
+ for (var idx in hierarchy) {
+ words = words.concat(hierarchy[idx].matchedWords);
+ }
+
+ var content = hit._highlightResult.content;
+ if (content) {
+ words = words.concat(content.matchedWords);
+ }
+
+ // return unique words
+ var words_uniq = [...new Set(words)];
+ return words_uniq;
+}
+
+function updateHitURL(hit) {
+
+ var words = matchedWords(hit);
+ var url = "";
+
+ if (hit.anchor) {
+ url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor;
+ } else {
+ url = hit.url + '?q=' + escape(words.join(" "));
+ }
+
+ return url;
+}
diff --git a/docs/dev/index.html b/docs/dev/index.html
new file mode 100644
index 00000000..4a71b99b
--- /dev/null
+++ b/docs/dev/index.html
@@ -0,0 +1,251 @@
+<!DOCTYPE html>
+<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>Kinetic Evaluation of Chemical Degradation Data • 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="Kinetic Evaluation of Chemical Degradation Data">
+<meta property="og:description" content="Calculation routines based on the FOCUS Kinetics Report (2006,
+ 2014). Includes a function for conveniently defining differential equation
+ models, model solution based on eigenvalues if possible or using numerical
+ solvers. If a C compiler (on windows: Rtools) is installed, differential
+ equation models are solved using automatically generated C functions. Please
+ note that no warranty is implied for correctness of results or fitness for a
+ particular purpose.">
+<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-home">
+ <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 id="mkin" class="section level1">
+<div class="page-header"><h1 class="hasAnchor">
+<a href="#mkin" class="anchor"></a>mkin</h1></div>
+
+<p>The R package <strong>mkin</strong> provides calculation routines for the analysis of chemical degradation data, including <b>m</b>ulticompartment <b>kin</b>etics as needed for modelling the formation and decline of transformation products, or if several degradation compartments are involved.</p>
+<div id="installation" class="section level2">
+<h2 class="hasAnchor">
+<a href="#installation" class="anchor"></a>Installation</h2>
+<p>You can install the latest released version from <a href="https://cran.r-project.org/package=mkin">CRAN</a> from within R:</p>
+<div class="sourceCode" id="cb1"><pre class="r"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"mkin"</span>)</pre></div>
+</div>
+<div id="background" class="section level2">
+<h2 class="hasAnchor">
+<a href="#background" class="anchor"></a>Background</h2>
+<p>In the regulatory evaluation of chemical substances like plant protection products (pesticides), biocides and other chemicals, degradation data play an important role. For the evaluation of pesticide degradation experiments, detailed guidance and helpful tools have been developed as detailed in ‘Credits and historical remarks’ below.</p>
+</div>
+<div id="usage" class="section level2">
+<h2 class="hasAnchor">
+<a href="#usage" class="anchor"></a>Usage</h2>
+<p>For a start, have a look at the code examples provided for <a href="https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html"><code>plot.mkinfit</code></a> and <a href="https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html"><code>plot.mmkin</code></a>, and at the package vignettes <a href="https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html"><code>FOCUS L</code></a> and <a href="https://pkgdown.jrwb.de/mkin/articles/FOCUS_D.html"><code>FOCUS D</code></a>.</p>
+</div>
+<div id="documentation" class="section level2">
+<h2 class="hasAnchor">
+<a href="#documentation" class="anchor"></a>Documentation</h2>
+<p>The HTML documentation is available at <a href="https://pkgdown.jrwb.de/mkin">jrwb.de</a>, at <a href="http://jranke.github.io/mkin">github</a> and at <a href="http://kinfit.r-forge.r-project.org/mkin_static/index.html">R-Forge</a>.</p>
+</div>
+<div id="features" class="section level2">
+<h2 class="hasAnchor">
+<a href="#features" class="anchor"></a>Features</h2>
+<ul>
+<li>Highly flexible model specification using <a href="https://pkgdown.jrwb.de/mkin/reference/mkinmod.html"><code>mkinmod</code></a>, including equilibrium reactions and using the single first-order reversible binding (SFORB) model, which will automatically create two latent state variables for the observed variable.</li>
+<li>As of version 0.9-39, fitting of several models to several datasets, optionally in parallel, is supported, see for example <a href="https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html"><code>plot.mmkin</code></a>.</li>
+<li>Model solution (forward modelling) in the function <a href="https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html"><code>mkinpredict</code></a> is performed either using the analytical solution for the case of parent only degradation, an eigenvalue based solution if only simple first-order (SFO) or SFORB kinetics are used in the model, or using a numeric solver from the <code>deSolve</code> package (default is <code>lsoda</code>).</li>
+<li>If a C compiler is installed, the kinetic models are compiled from automatically generated C code, see <a href="https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html">vignette <code>compiled_models</code></a>. The autogeneration of C code was inspired by the <a href="https://github.com/karlines/ccSolve"><code>ccSolve</code></a> package. Thanks to Karline Soetaert for her work on that.</li>
+<li>By default, kinetic rate constants and kinetic formation fractions are transformed internally using <a href="https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html"><code>transform_odeparms</code></a> so their estimators can more reasonably be expected to follow a normal distribution. This has the side effect that no constraints are needed in the optimisation. Thanks to René Lehmann for the nice cooperation on this, especially the isometric log-ratio transformation that is now used for the formation fractions.</li>
+<li>A side effect of this is that when parameter estimates are backtransformed to match the model definition, confidence intervals calculated from standard errors are also backtransformed to the correct scale, and will not include meaningless values like negative rate constants or formation fractions adding up to more than 1, which can not occur in a single experiment with a single defined radiolabel position.</li>
+<li>The usual one-sided t-test for significant difference from zero is nevertheless shown based on estimators for the untransformed parameters.</li>
+<li>Summary and plotting functions. The <code>summary</code> of an <code>mkinfit</code> object is in fact a full report that should give enough information to be able to approximately reproduce the fit with other tools.</li>
+<li>The chi-squared error level as defined in the FOCUS kinetics guidance (see below) is calculated for each observed variable.</li>
+<li>When a metabolite decline phase is not described well by SFO kinetics, SFORB kinetics can be used for the metabolite.</li>
+<li>Three different error models can be selected using the argument <code>error_model</code> to the <a href="https://pkgdown.jrwb.de/mkin/reference/mkinfit.html"><code>mkinfit</code></a> function.</li>
+<li>The ‘variance by variable’ error model which is often fitted using Iteratively Reweighted Least Squares (IRLS) should now be specified as <code>error_model = "obs"</code>.</li>
+<li>A two-component error model similar to the one proposed by <a href="https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html">Rocke and Lorenzato</a> can be selected using the argument <code>error_model = "tc"</code>.</li>
+<li>Nonlinear mixed-effects models can be created from fits of the same degradation model to different datasets for the same compound by using the <a href="https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html">nlme.mmkin</a> method.</li>
+</ul>
+</div>
+<div id="gui" class="section level2">
+<h2 class="hasAnchor">
+<a href="#gui" class="anchor"></a>GUI</h2>
+<p>There is a graphical user interface that may be useful. Please refer to its <a href="http://kinfit.r-forge.r-project.org/gmkin_static">documentation page</a> for installation instructions and a manual.</p>
+</div>
+<div id="news" class="section level2">
+<h2 class="hasAnchor">
+<a href="#news" class="anchor"></a>News</h2>
+<p>There is a ChangeLog, for the latest <a href="https://cran.r-project.org/package=mkin/news/news.html">CRAN release</a> and one for the <a href="https://github.com/jranke/mkin/blob/master/NEWS.md">github master branch</a>.</p>
+</div>
+<div id="credits-and-historical-remarks" class="section level2">
+<h2 class="hasAnchor">
+<a href="#credits-and-historical-remarks" class="anchor"></a>Credits and historical remarks</h2>
+<p><code>mkin</code> would not be possible without the underlying software stack consisting of, among others, R and the package <a href="https://cran.r-project.org/package=deSolve">deSolve</a>. In previous version, <code>mkin</code> was also using the functionality of the <a href="https://cran.r-project.org/package=FME">FME</a> package. Please refer to the <a href="https://cran.r-project.org/package=mkin">package page on CRAN</a> for the full list of imported and suggested R packages. Also, <a href="https://debian.org">Debian Linux</a>, the vim editor and the <a href="https://github.com/jalvesaq/Nvim-R">Nvim-R</a> plugin have been invaluable in its development.</p>
+<p><code>mkin</code> could not have been written without me being introduced to regulatory fate modelling of pesticides by Adrian Gurney during my time at Harlan Laboratories Ltd (formerly RCC Ltd). <code>mkin</code> greatly profits from and largely follows the work done by the <a href="http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics">FOCUS Degradation Kinetics Workgroup</a>, as detailed in their guidance document from 2006, slightly updated in 2011 and in 2014.</p>
+<p>Also, it was inspired by the first version of KinGUI developed by BayerCropScience, which is based on the MatLab runtime environment.</p>
+<p>The companion package <a href="http://kinfit.r-forge.r-project.org/kinfit_static/index.html">kinfit</a> (now deprecated) was <a href="https://r-forge.r-project.org/scm/viewvc.php?view=rev&amp;root=kinfit&amp;revision=2">started in 2008</a> and <a href="https://cran.r-project.org/src/contrib/Archive/kinfit/">first published</a> on CRAN on 01 May 2010.</p>
+<p>The first <code>mkin</code> code was <a href="https://r-forge.r-project.org/scm/viewvc.php?view=rev&amp;root=kinfit&amp;revision=8">published on 11 May 2010</a> and the <a href="https://cran.r-project.org/src/contrib/Archive/mkin">first CRAN version</a> on 18 May 2010.</p>
+<p>In 2011, Bayer Crop Science started to distribute an R based successor to KinGUI named KinGUII whose R code is based on <code>mkin</code>, but which added, among other refinements, a closed source graphical user interface (GUI), iteratively reweighted least squares (IRLS) optimisation of the variance for each of the observed variables, and Markov Chain Monte Carlo (MCMC) simulation functionality, similar to what is available e.g. in the <code>FME</code> package.</p>
+<p>Somewhat in parallel, Syngenta has sponsored the development of an <code>mkin</code> and KinGUII based GUI application called CAKE, which also adds IRLS and MCMC, is more limited in the model formulation, but puts more weight on usability. CAKE is available for download from the <a href="https://www.tessella.com/showcase/computer-assisted-kinetic-evaluation">CAKE website</a>, where you can also find a zip archive of the R scripts derived from <code>mkin</code>, published under the GPL license.</p>
+<p>Finally, there is <a href="http://github.com/zhenglei-gao/KineticEval">KineticEval</a>, which contains a further development of the scripts used for KinGUII, so the different tools will hopefully be able to learn from each other in the future as well.</p>
+</div>
+<div id="references" class="section level2">
+<h2 class="hasAnchor">
+<a href="#references" class="anchor"></a>References</h2>
+<table class="table">
+<tr>
+<td>
+Ranke J, Meinecke S (2019) Error Models for the Kinetic Evaluation of Chemical Degradation Data <i>Environments</i> <b>6</b> (12) 124 <a href="https://doi.org/10.3390/environments6120124">doi:10.3390/environments6120124</a>
+</td>
+</tr>
+<tr>
+<td>
+Ranke J, Wöltjen J, Meinecke S (2018) Comparison of software tools for kinetic evaluation of chemical degradation data <i>Environmental Sciences Europe</i> <b>30</b> 17 <a href="https://doi.org/10.1186/s12302-018-0145-1">doi:10.1186/s12302-018-0145-1</a>
+</td>
+</tr>
+</table>
+</div>
+<div id="development" class="section level2">
+<h2 class="hasAnchor">
+<a href="#development" class="anchor"></a>Development</h2>
+<p>Contributions are welcome!</p>
+</div>
+</div>
+ </div>
+
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <div class="links">
+<h2>Links</h2>
+<ul class="list-unstyled">
+<li>Download from CRAN at <br><a href="https://cloud.r-project.org/package=mkin">https://​cloud.r-project.org/​package=mkin</a>
+</li>
+<li>Browse source code at <br><a href="http://github.com/jranke/mkin/">http://​github.com/​jranke/​mkin/​</a>
+</li>
+<li>Report a bug at <br><a href="http://github.com/jranke/mkin/issues">http://​github.com/​jranke/​mkin/​issues</a>
+</li>
+</ul>
+</div>
+<div class="license">
+<h2>License</h2>
+<ul class="list-unstyled">
+<li>GPL</li>
+</ul>
+</div>
+<div class="developers">
+<h2>Developers</h2>
+<ul class="list-unstyled">
+<li>Johannes Ranke <br><small class="roles"> Author, maintainer, copyright holder </small> <a href="https://orcid.org/0000-0003-4371-6538" target="orcid.widget" aria-label="ORCID"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> </li>
+<li><a href="authors.html">All authors...</a></li>
+</ul>
+</div>
+
+ <div class="dev-status">
+<h2>Dev status</h2>
+<ul class="list-unstyled">
+<li><a href="https://cran.r-project.org/package=mkin"><img src="https://www.r-pkg.org/badges/version/mkin"></a></li>
+<li><a href="https://travis-ci.com/jranke/mkin"><img src="https://travis-ci.com/jranke/mkin.svg?branch=master" alt="Build Status"></a></li>
+<li><a href="https://codecov.io/github/jranke/mkin"><img src="https://codecov.io/github/jranke/mkin/branch/master/graphs/badge.svg" alt="codecov"></a></li>
+</ul>
+</div>
+</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/link.svg b/docs/dev/link.svg
new file mode 100644
index 00000000..88ad8276
--- /dev/null
+++ b/docs/dev/link.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill:#75AADB;}
+</style>
+<path class="st0" d="M4,11.3h1.3v1.3H4c-2,0-4-2.3-4-4.7s2.1-4.7,4-4.7h5.3c1.9,0,4,2.3,4,4.7c0,1.9-1.2,3.6-2.7,4.3v-1.5
+ C11.4,10.2,12,9.1,12,8c0-1.7-1.4-3.3-2.7-3.3H4C2.7,4.7,1.3,6.3,1.3,8S2.7,11.3,4,11.3z M16,7.3h-1.3v1.3H16c1.3,0,2.7,1.6,2.7,3.3
+ s-1.4,3.3-2.7,3.3h-5.3C9.4,15.3,8,13.7,8,12c0-1.1,0.6-2.2,1.3-2.8V7.7C7.9,8.4,6.7,10.1,6.7,12c0,2.4,2.1,4.7,4,4.7H16
+ c1.9,0,4-2.3,4-4.7S18,7.3,16,7.3z"/>
+</svg>
diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html
new file mode 100644
index 00000000..36f7025a
--- /dev/null
+++ b/docs/dev/news/index.html
@@ -0,0 +1,845 @@
+<!-- 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>Changelog • 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="Changelog" />
+
+
+<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-news">
+ <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 data-toc-skip>Changelog <small></small></h1>
+ <small>Source: <a href='http://github.com/jranke/mkin/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
+ </div>
+
+ <div id="mkin-0-9-50-3-unreleased" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.50.3">
+<a href="#mkin-0-9-50-3-unreleased" class="anchor"></a>mkin 0.9.50.3 (unreleased)<small> Unreleased </small>
+</h1>
+<ul>
+<li><p>‘parms’: Add a method for mmkin objects</p></li>
+<li><p>‘saemix_model’, ‘saemix_data’: Helper functions to fit nonlinear mixed-effects models for mmkin row objects using the saemix package</p></li>
+<li><p>‘mmkin’ and ‘confint(method = ’profile’): Use all cores detected by parallel::detectCores() per default</p></li>
+<li><p>‘confint(method = ’profile’): Choose accuracy based on ‘rel_tol’ argument, relative to the bounds obtained by the quadratic approximation</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-50-2-2020-05-12" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.50.2">
+<a href="#mkin-0-9-50-2-2020-05-12" class="anchor"></a>mkin 0.9.50.2 (2020-05-12)<small> 2020-05-12 </small>
+</h1>
+<ul>
+<li><p>Increase tolerance for a platform specific test results on the Solaris test machine on CRAN</p></li>
+<li><p>Updates and corrections (using the spelling package) to the documentation</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-50-1-2020-05-11" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.50.1">
+<a href="#mkin-0-9-50-1-2020-05-11" class="anchor"></a>mkin 0.9.50.1 (2020-05-11)<small> 2020-05-11 </small>
+</h1>
+<ul>
+<li><p>Support SFORB with formation fractions</p></li>
+<li><p>‘mkinmod’: Make ‘use_of_ff’ = “max” the default</p></li>
+<li><p>Improve performance by a) avoiding expensive calls in the cost function like merge() and data.frame(), and b) by implementing analytical solutions for SFO-SFO and DFOP-SFO</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-49-11-2020-04-20" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.49.11">
+<a href="#mkin-0-9-49-11-2020-04-20" class="anchor"></a>mkin 0.9.49.11 (2020-04-20)<small> 2020-04-20 </small>
+</h1>
+<ul>
+<li>Increase a test tolerance to make it pass on all CRAN check machines</li>
+</ul>
+</div>
+ <div id="mkin-0-9-49-10-2020-04-18" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.49.10">
+<a href="#mkin-0-9-49-10-2020-04-18" class="anchor"></a>mkin 0.9.49.10 (2020-04-18)<small> 2020-04-18 </small>
+</h1>
+<ul>
+<li><p>‘nlme.mmkin’: An nlme method for mmkin row objects and an associated S3 class with print, plot, anova and endpoint methods</p></li>
+<li><p>‘mean_degparms, nlme_data, nlme_function’: Three new functions to facilitate building nlme models from mmkin row objects</p></li>
+<li><p>‘endpoints’: Don’t return the SFORB list component if it’s empty. This reduces distraction and complies with the documentation</p></li>
+<li><p>Article in compiled models: Add some platform specific code and suppress warnings about zero values being removed from the FOCUS D dataset</p></li>
+<li><p>‘plot.mmkin’: Add the argument ‘standardized’ to avoid warnings that occurred when it was passed as part of the additional arguments captured by the dots (…)</p></li>
+<li><p>‘summary.mkinfit’: Add AIC, BIC and log likelihood to the summary</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-49-9-2020-03-31" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.49.9">
+<a href="#mkin-0-9-49-9-2020-03-31" class="anchor"></a>mkin 0.9.49.9 (2020-03-31)<small> 2020-03-31 </small>
+</h1>
+<ul>
+<li><p>‘mkinmod’: Use pkgbuild::has_compiler instead of Sys.which(‘gcc’), as the latter will often fail even if Rtools are installed</p></li>
+<li><p>‘mkinds’: Use roxygen for documenting fields and methods of this R6 class</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-49-8-2020-01-09" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.49.8">
+<a href="#mkin-0-9-49-8-2020-01-09" class="anchor"></a>mkin 0.9.49.8 (2020-01-09)<small> 2020-01-09 </small>
+</h1>
+<ul>
+<li><p>‘aw’: Generic function for calculating Akaike weights, methods for mkinfit objects and mmkin columns</p></li>
+<li><p>‘loftest’: Add a lack-of-fit test</p></li>
+<li><p>‘plot_res’, ‘plot_sep’ and ‘mkinerrplot’: Add the possibility to show standardized residuals and make it the default for fits with error models other than ‘const’</p></li>
+<li><p>‘lrtest.mkinfit’: Improve naming of the compared fits in the case of fixed parameters</p></li>
+<li><p>‘confint.mkinfit’: Make the quadratic approximation the default, as the likelihood profiling takes a lot of time, especially if the fit has more than three parameters</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-49-7-2019-11-01" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.49.7">
+<a href="#mkin-0-9-49-7-2019-11-01" class="anchor"></a>mkin 0.9.49.7 (2019-11-01)<small> 2019-11-02 </small>
+</h1>
+<ul>
+<li><p>Fix a bug introduced in 0.9.49.6 that occurred if the direct optimisation yielded a higher likelihood than the three-step optimisation in the d_3 algorithm, which caused the fitted parameters of the three-step optimisation to be returned instead of the parameters of the direct optimisation</p></li>
+<li><p>Add a ‘nobs’ method for mkinfit objects, enabling the default ‘BIC’ method from the stats package. Also, add a ‘BIC’ method for mmkin column objects.</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-49-6-2019-10-31" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.49.6">
+<a href="#mkin-0-9-49-6-2019-10-31" class="anchor"></a>mkin 0.9.49.6 (2019-10-31)<small> 2019-10-31 </small>
+</h1>
+<ul>
+<li><p>Implement a likelihood ratio test as a method for ‘lrtest’ from the lmtest package</p></li>
+<li><p>Add an ‘update’ method for mkinfit objects which remembers fitted parameters if appropriate</p></li>
+<li><p>Add a ‘residuals’ method for mkinfit objects that supports scaling based on the error model</p></li>
+<li><p>Fix a bug in ‘mkinfit’ that prevented summaries of objects fitted with fixed parameters to be generated</p></li>
+<li><p>Add ‘parms’ and ‘confint’ methods for mkinfit objects. Confidence intervals based on the quadratic approximation as in the summary, and based on the profile likelihood</p></li>
+<li><p>Move long-running tests to tests/testthat/slow with a separate test log. They currently take around 7 minutes on my system</p></li>
+<li><p>‘mkinfit’: Clean the code and return functions to calculate the log-likelihood and the sum of squared residuals</p></li>
+<li><p>Vignette ‘twa.html’: Add the maximum time weighted average formulas for the hockey stick model</p></li>
+<li><p>Support frameless plots (‘frame = FALSE’)</p></li>
+<li><p>Support to suppress the chi2 error level (‘show_errmin = FALSE’) in ‘plot.mmkin’</p></li>
+<li><p>Update README and the introductory vignette</p></li>
+<li><p>Report ‘OLS’ as error_model_algorithm in the summary in the case that the default error_model (‘const’) is used</p></li>
+<li><p>Support summarizing ‘mkinfit’ objects generated with versions &lt; 0.9.49.5</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-49-5-2019-07-04" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.49.5">
+<a href="#mkin-0-9-49-5-2019-07-04" class="anchor"></a>mkin 0.9.49.5 (2019-07-04)<small> 2019-07-04 </small>
+</h1>
+<ul>
+<li><p>Several algorithms for minimization of the negative log-likelihood for non-constant error models (two-component and variance by variable). In the case the error model is constant variance, least squares is used as this is more stable. The default algorithm ‘d_3’ tries direct minimization and a three-step procedure, and returns the model with the highest likelihood.</p></li>
+<li><p>The argument ‘reweight.method’ to mkinfit and mmkin is now obsolete, use ‘error_model’ and ‘error_model_algorithm’ instead</p></li>
+<li><p>Add a test that checks if we get the best known AIC for parent only fits to 12 test datasets. Add these test datasets for this purpose.</p></li>
+<li><p>New function ‘mkinerrplot’. This function is also used for residual plots in ‘plot.mmkin’ if the argument ‘resplot = “errmod”’ is given, and in ‘plot.mkinfit’ if ‘show_errplot’ is set to TRUE.</p></li>
+<li><p>Remove dependency on FME, only use nlminb for optimisation (‘Port’ algorithm). I cannot remember cases where one of the other optimisation algorithms was preferable, except that I sometime used Levenberg-Marquardt for speed in cases where I did not expect to get trapped in a local minimum.</p></li>
+<li><p>Use the numDeriv package to calculate hessians. This results in slightly different confidence intervals, takes a bit longer, but is apparently more robust</p></li>
+<li><p>Add a simple benchmark vignette to document the impact on performance.</p></li>
+<li><p>The code for manual weighting was removed. This functionality might get added again at a later time. For the time being, please use an earlier version, e.g. 0.9.48.1 if you want to do manual weighting.</p></li>
+<li><p>The fitting time reported in the summary now includes the time used for calculation of the hessians</p></li>
+<li><p>Adapt tests</p></li>
+<li><p>Fix an error in the FOCUS chi2 error level calculations that occurred if parameters were specified in parms.ini that were not in the model. A warning was already issued, but when fitting in parallel via mmkin this could go unnoticed.</p></li>
+<li><p>Add example datasets obtained from risk assessment reports published by the European Food Safety Agency.</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-48-1-2019-03-04" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.48.1">
+<a href="#mkin-0-9-48-1-2019-03-04" class="anchor"></a>mkin 0.9.48.1 (2019-03-04)<small> 2019-03-04 </small>
+</h1>
+<ul>
+<li><p>Add the function ‘logLik.mkinfit’ which makes it possible to calculate an AIC for mkinfit objects</p></li>
+<li><p>Add the function ‘AIC.mmkin’ to make it easy to compare columns of mmkin objects</p></li>
+<li><p>‘add_err’: Respect the argument giving the number of replicates in the synthetic dataset</p></li>
+<li><p>‘max_twa_parent’: Support maximum time weighted average concentration calculations for the hockey stick (HS) model</p></li>
+<li><p>‘mkinpredict’: Make the function generic and create a method for mkinfit objects</p></li>
+<li><p>‘mkinfit’: Improve the correctness of the fitted two component error model by fitting the mean absolute deviance at each observation against the observed values, weighting with the current two-component error model</p></li>
+<li><p>‘tests/testthat/test_irls.R’: Test if the components of the error model used to generate the data can be reproduced with moderate accuracy</p></li>
+<li><p>Add the function ‘CAKE_export’ to facilitate cross-checking of results</p></li>
+<li><p>Implement the logistic model (only tested for parent fits)</p></li>
+<li><p>‘nafta’: Add evaluations according to the NAFTA guidance</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-47-5-2018-09-14" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.47.5">
+<a href="#mkin-0-9-47-5-2018-09-14" class="anchor"></a>mkin 0.9.47.5 (2018-09-14)<small> 2018-09-14 </small>
+</h1>
+<ul>
+<li><p>Make the two-component error model stop in cases where it is inadequate to avoid nls crashes on windows</p></li>
+<li><p>Move two vignettes to a location where they will not be built on CRAN (to avoid more NOTES from long execution times)</p></li>
+<li><p>Exclude more example code from testing on CRAN to avoid NOTES from long execution times</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-47-3" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.47.3">
+<a href="#mkin-0-9-47-3" class="anchor"></a>mkin 0.9.47.3<small> Unreleased </small>
+</h1>
+<ul>
+<li><p>‘mkinfit’: Improve fitting the error model for reweight.method = ‘tc’. Add ‘manual’ to possible arguments for ‘weight’</p></li>
+<li><p>Test that FOCUS_2006_C can be evaluated with DFOP and reweight.method = ‘tc’</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-47-2-2018-07-19" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.47.2">
+<a href="#mkin-0-9-47-2-2018-07-19" class="anchor"></a>mkin 0.9.47.2 (2018-07-19)<small> 2018-07-19 </small>
+</h1>
+<ul>
+<li><p>‘sigma_twocomp’: Rename ‘sigma_rl’ to ‘sigma_twocomp’ as the Rocke and Lorenzato model assumes lognormal distribution for large y. Correct references to the Rocke and Lorenzato model accordingly.</p></li>
+<li><p>‘mkinfit’: Use 1.1 as starting value for N parameter of IORE models to obtain convergence in more difficult cases. Show parameter names when ‘trace_parms’ is ‘TRUE’.</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-47-1-2018-02-06" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.47.1">
+<a href="#mkin-0-9-47-1-2018-02-06" class="anchor"></a>mkin 0.9.47.1 (2018-02-06)<small> 2018-02-06 </small>
+</h1>
+<ul>
+<li><p>Skip some tests on CRAN and winbuilder to avoid timeouts</p></li>
+<li><p>‘test_data_from_UBA_2014’: Added this list of datasets containing experimental data used in the expertise from 2014</p></li>
+<li><p>‘mkinfit’: Added the iterative reweighting method ‘tc’ using the two-component error model from Rocke and Lorenzato. NA values in the data are not returned any more.</p></li>
+<li><p>‘mkinfit’: Work around a bug in the current FME version that prevented the convergence message to be returned in the case of non-convergence.</p></li>
+<li><p>‘summary.mkinfit’: Improved output regarding weighting method. No predictions are returned for NA values in the model (see above).</p></li>
+<li><p>‘summary.mkinfit’: Show versions of mkin and R used for fitting (not the ones used for the summary) if the fit was generated with mkin &gt;= 0.9.47.1</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-46-3-2017-11-16" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.46.3">
+<a href="#mkin-0-9-46-3-2017-11-16" class="anchor"></a>mkin 0.9.46.3 (2017-11-16)<small> 2017-11-16 </small>
+</h1>
+<ul>
+<li><p><code>README.md</code>, <code>vignettes/mkin.Rmd</code>: URLs were updated</p></li>
+<li><p><code>synthetic_data_for_UBA</code>: Add the code used to generate the data in the interest of reproducibility</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-46-2-2017-10-10" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.46.2">
+<a href="#mkin-0-9-46-2-2017-10-10" class="anchor"></a>mkin 0.9.46.2 (2017-10-10)<small> 2017-10-10 </small>
+</h1>
+<ul>
+<li><p>Converted the vignette FOCUS_Z from tex/pdf to markdown/html</p></li>
+<li><p><code>DESCRIPTION</code>: Add ORCID</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-46-1-2017-09-14" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.46.1">
+<a href="#mkin-0-9-46-1-2017-09-14" class="anchor"></a>mkin 0.9.46.1 (2017-09-14)<small> 2017-09-14 </small>
+</h1>
+<ul>
+<li><p><code>plot.mkinfit</code>: Fix scaling of residual plots for the case of separate plots for each observed variable</p></li>
+<li><p><code>plot.mkinfit</code>: Use all data points of the fitted curve for y axis scaling for the case of separate plots for each observed variable</p></li>
+<li><p>Documentation updates</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-46-2017-07-24" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.46">
+<a href="#mkin-0-9-46-2017-07-24" class="anchor"></a>mkin 0.9.46 (2017-07-24)<small> 2017-07-29 </small>
+</h1>
+<ul>
+<li>Remove <code>test_FOMC_ill-defined.R</code> as it is too platform dependent</li>
+</ul>
+</div>
+ <div id="mkin-0-9-45-2-2017-07-24" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.45.2">
+<a href="#mkin-0-9-45-2-2017-07-24" class="anchor"></a>mkin 0.9.45.2 (2017-07-24)<small> 2017-07-22 </small>
+</h1>
+<ul>
+<li><p>Rename <code>twa</code> to <code>max_twa_parent</code> to avoid conflict with <code>twa</code> from my <code>pfm</code> package</p></li>
+<li><p>Update URLs in documentation</p></li>
+<li><p>Limit test code to one core to pass on windows</p></li>
+<li><p>Switch from <code>microbenchmark</code> to <code>rbenchmark</code> as the former is not supported on all platforms</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-45-1-2016-12-20" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.45.1">
+<a href="#mkin-0-9-45-1-2016-12-20" class="anchor"></a>mkin 0.9.45.1 (2016-12-20)<small> Unreleased </small>
+</h1>
+<div id="new-features" class="section level2">
+<h2 class="hasAnchor">
+<a href="#new-features" class="anchor"></a>New features</h2>
+<ul>
+<li>A <code>twa</code> function, calculating maximum time weighted average concentrations for the parent (SFO, FOMC and DFOP).</li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-45-2016-12-08" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.45">
+<a href="#mkin-0-9-45-2016-12-08" class="anchor"></a>mkin 0.9.45 (2016-12-08)<small> 2016-12-08 </small>
+</h1>
+<div id="minor-changes" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p><code>plot.mkinfit</code> and <code>plot.mmkin</code>: If the plotting device is <code>tikz</code>, LaTeX markup is being used for the chi2 error in the graphs.</p></li>
+<li><p>Use <code>pkgdown</code>, the successor of <code>staticdocs</code> for generating static HTML documentation. Include example output and graphs also for <code>dontrun</code> sections.</p></li>
+<li><p><code>plot.mkinfit</code>: Plotting does not fail any more when the compiled model is not available, e.g. because it was removed from the temporary directory. In this case, the uncompiled model is now used for plotting</p></li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-44-2016-06-29" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.44">
+<a href="#mkin-0-9-44-2016-06-29" class="anchor"></a>mkin 0.9.44 (2016-06-29)<small> 2016-06-29 </small>
+</h1>
+<div id="bug-fixes" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li>The test <code>test_FOMC_ill-defined</code> failed on several architectures, so the test is now skipped</li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-43-2016-06-28" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.43">
+<a href="#mkin-0-9-43-2016-06-28" class="anchor"></a>mkin 0.9.43 (2016-06-28)<small> 2016-06-28 </small>
+</h1>
+<div id="major-changes" class="section level2">
+<h2 class="hasAnchor">
+<a href="#major-changes" class="anchor"></a>Major changes</h2>
+<ul>
+<li><p>The title was changed to <code>Kinetic evaluations of chemical degradation data</code></p></li>
+<li><p><code>plot.mkinfit</code>: Add the possibility to show fits (and residual plots if requested) separately for the observed variables</p></li>
+<li><p><code>plot.mkinfit</code>: Add the possibility to show the chi2 error levels in the plot, similar to the way they are shown in <code>plot.mmkin</code></p></li>
+<li><p><code>plot_sep</code>: Add this function as a convenience wrapper for plotting observed variables of mkinfit objects separately, with chi2 error values and residual plots.</p></li>
+<li><p>Vignettes: The main vignette <code>mkin</code> was converted to R markdown and updated. The other vignettes were also updated to show current improved functionality.</p></li>
+<li><p>The function <code>add_err</code> was added to the package, making it easy to generate simulated data using an error model based on the normal distribution</p></li>
+</ul>
+</div>
+<div id="minor-changes-1" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-1" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p>Remove an outdated reference to the inline package in the <code>compiled_models</code> vignette</p></li>
+<li><p><code>mkinfit</code>: Do not error out in cases where the fit converges, but the Jacobian for the untransformed model cost can not be estimated. Give a warning instead and return NA for the t-test results.</p></li>
+<li><p><code>summary.mkinfit</code>: Give a warning message when the covariance matrix can not be obtained.</p></li>
+<li><p>A test has been added to containing a corresponding edge case to check that the warnings are correctly issued and the fit does not terminate.</p></li>
+<li><p><code>plot.mmkin</code>: Round the chi2 error value to three significant digits, instead of two decimal digits.</p></li>
+<li><p><code>mkinfit</code>: Return the <code>err</code> values used on weighted fits as a column named <code>err</code>. Also include these inverse weights when the column <code>value</code> in the observed data is used, which is returned as <code>observed</code> in the data component of the mkinfit object.</p></li>
+</ul>
+</div>
+<div id="bug-fixes-1" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-1" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li><p><code>endpoints</code>: When the name of a substance degrading to a metabolite (e.g. a parent compound) used in the model formulation ended in the letter <code>f</code>, some rate parameters could be listed as formation fractions with mixed up names. These would also appear in the summary.</p></li>
+<li><p><code>mkinfit</code>: Check for all observed variables when checking if the user tried to fix formation fractions when fitting them using ilr transformation.</p></li>
+<li><p><code>plot.mmkin</code>: Set the plot margins correctly, also in the case of a single fit to be plotted, so the main title is placed in a reasonable way.</p></li>
+<li><p><code>plot.mkinfit</code>: Correct default values for <code>col_obs</code>, <code>pch_obs</code> and <code>lty_obs</code> for the case that <code>obs_vars</code> is specified.</p></li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-42-2016-03-25" class="section level1">
+<h1 class="page-header" data-toc-text="0.9.42">
+<a href="#mkin-0-9-42-2016-03-25" class="anchor"></a>mkin 0.9.42 (2016-03-25)<small> 2016-03-25 </small>
+</h1>
+<div id="major-changes-1" class="section level2">
+<h2 class="hasAnchor">
+<a href="#major-changes-1" class="anchor"></a>Major changes</h2>
+<ul>
+<li>Add the argument <code>from_max_mean</code> to <code>mkinfit</code>, for fitting only the decline from the maximum observed value for models with a single observed variable</li>
+</ul>
+</div>
+<div id="minor-changes-2" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-2" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p>Add plots to <code>compiled_models</code> vignette</p></li>
+<li><p>Give an explanatory error message when mkinmod fails due to a missing definition of a target variable</p></li>
+<li><p><code><a href="../reference/print.mkinmod.html">print.mkinmod()</a></code>: Improve formatting when printing mkinmod model definitions</p></li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-41-2015-11-09" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-41">
+<a href="#mkin-0-9-41-2015-11-09" class="anchor"></a>mkin 0.9-41 (2015-11-09)<small> 2015-11-09 </small>
+</h1>
+<div id="minor-changes-3" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-3" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p>Add an R6 class <code>mkinds</code> representing datasets with a printing method</p></li>
+<li><p>Add a printing method for mkinmod objects</p></li>
+<li><p>Make it possible to specify arbitrary strings as names for the compounds in <code>mkinmod</code>, and show them in the plot</p></li>
+<li><p>Use an index.r file to group help topics in static documentation</p></li>
+</ul>
+</div>
+<div id="bug-fixes-2" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-2" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li>
+<code><a href="../reference/summary.mkinfit.html">print.summary.mkinfit()</a></code>: Avoid an error that occurred when printing summaries generated with mkin versions before 0.9-36</li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-40-2015-07-21" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-40">
+<a href="#mkin-0-9-40-2015-07-21" class="anchor"></a>mkin 0.9-40 (2015-07-21)<small> 2015-07-21 </small>
+</h1>
+<div id="bug-fixes-3" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-3" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li>
+<code><a href="../reference/endpoints.html">endpoints()</a></code>: For DFOP and SFORB models, where <code><a href="https://rdrr.io/r/stats/optimize.html">optimize()</a></code> is used, make use of the fact that the DT50 must be between DT50_k1 and DT50_k2 (DFOP) or DT50_b1 and DT50_b2 (SFORB), as <code><a href="https://rdrr.io/r/stats/optimize.html">optimize()</a></code> sometimes did not find the minimum. Likewise for finding DT90 values. Also fit on the log scale to make the function more efficient.</li>
+</ul>
+</div>
+<div id="internal-changes" class="section level2">
+<h2 class="hasAnchor">
+<a href="#internal-changes" class="anchor"></a>Internal changes</h2>
+<ul>
+<li>
+<code>DESCRIPTION</code>, <code>NAMESPACE</code>, <code>R/*.R</code>: Import (from) stats, graphics and methods packages, and qualify some function calls for non-base packages installed with R to avoid NOTES made by R CMD check –as-cran with upcoming R versions.</li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-39-2015-06-26" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-39">
+<a href="#mkin-0-9-39-2015-06-26" class="anchor"></a>mkin 0.9-39 (2015-06-26)<small> 2015-06-26 </small>
+</h1>
+<div id="major-changes-2" class="section level2">
+<h2 class="hasAnchor">
+<a href="#major-changes-2" class="anchor"></a>Major changes</h2>
+<ul>
+<li><p>New function <code><a href="../reference/mmkin.html">mmkin()</a></code>: This function takes a character vector of model shorthand names, or alternatively a list of mkinmod models, as well as a list of dataset as main arguments. It returns a matrix of mkinfit objects, with a row for each model and a column for each dataset. A subsetting method with single brackets is available. Fitting the models in parallel using the <code>parallel</code> package is supported.</p></li>
+<li><p>New function <code><a href="../reference/plot.mmkin.html">plot.mmkin()</a></code>: Plots single-row or single-column <code>mmkin</code> objects including residual plots.</p></li>
+</ul>
+</div>
+<div id="bug-fixes-4" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-4" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li>
+<code><a href="../reference/mkinparplot.html">mkinparplot()</a></code>: Fix the x axis scaling for rate constants and formation fractions that got confused by the introduction of the t-values of transformed parameters.</li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-38-2015-06-24" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-38">
+<a href="#mkin-0-9-38-2015-06-24" class="anchor"></a>mkin 0.9-38 (2015-06-24)<small> 2015-06-23 </small>
+</h1>
+<div id="minor-changes-4" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-4" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p><code>vignettes/compiled_models.html</code>: Show the performance improvement factor actually obtained when building the vignette, as well as mkin version, some system info and the CPU model used for building the vignette.</p></li>
+<li><p><code>GNUMakefile</code>,<code>vignettes/*</code>: Clean up vignette generation and include table of contents in HTML vignettes.</p></li>
+</ul>
+</div>
+<div id="bug-fixes-5" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-5" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li>
+<code><a href="../reference/mkinmod.html">mkinmod()</a></code>: When generating the C code for the derivatives, only declare the time variable when it is needed and remove the ‘-W-no-unused-variable’ compiler flag as the C compiler used in the CRAN checks on Solaris does not know it.</li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-36-2015-06-21" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-36">
+<a href="#mkin-0-9-36-2015-06-21" class="anchor"></a>mkin 0.9-36 (2015-06-21)<small> 2015-06-21 </small>
+</h1>
+<div id="major-changes-3" class="section level2">
+<h2 class="hasAnchor">
+<a href="#major-changes-3" class="anchor"></a>Major changes</h2>
+<ul>
+<li><p><code><a href="../reference/summary.mkinfit.html">summary.mkinfit()</a></code>: A one-sided t-test for significant difference of untransformed parameters from zero is now always shown, based on the assumption of normal distribution for estimators of all untransformed parameters. Use with caution, as this assumption is unrealistic e.g. for rate constants in these nonlinear kinetic models.</p></li>
+<li><p>If a compiler (gcc) is installed, use a version of the differential equation model compiled from C code, which is a huge performance boost for models where only the deSolve method works.</p></li>
+<li><p><code><a href="../reference/mkinmod.html">mkinmod()</a></code>: Create a list component $cf (of class CFuncList) in the list returned by mkinmod, if a version can be compiled from autogenerated C code (see above).</p></li>
+<li><p><code><a href="../reference/mkinfit.html">mkinfit()</a></code>: Set the default <code>solution_type</code> to <code>deSolve</code> when a compiled version of the model is present, except when an analytical solution is possible.</p></li>
+</ul>
+</div>
+<div id="minor-changes-5" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-5" class="anchor"></a>Minor changes</h2>
+<ul>
+<li>Added a simple showcase vignette with an evaluation of FOCUS example dataset D</li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-35-2015-05-15" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-35">
+<a href="#mkin-0-9-35-2015-05-15" class="anchor"></a>mkin 0.9-35 (2015-05-15)<small> 2015-05-15 </small>
+</h1>
+<div id="major-changes-4" class="section level2">
+<h2 class="hasAnchor">
+<a href="#major-changes-4" class="anchor"></a>Major changes</h2>
+<ul>
+<li>Switch from RUnit to testthat for testing</li>
+</ul>
+</div>
+<div id="bug-fixes-6" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-6" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li><p><code><a href="../reference/mkinparplot.html">mkinparplot()</a></code>: Avoid warnings that occurred when not all confidence intervals were available in the summary of the fit</p></li>
+<li><p><code><a href="../reference/summary.mkinfit.html">print.summary.mkinfit()</a></code>: Fix printing the summary for the case that the number of iterations is not available</p></li>
+<li><p>NAMESPACE: export S3 methods plot.mkinfit, summary.mkinfit and print.summary.mkinfit to satisfy R CMD check on R-devel</p></li>
+<li><p><code><a href="../reference/mkinparplot.html">mkinparplot()</a></code>: Avoid warning in R CMD check about undeclared global variable <code>Lower</code></p></li>
+</ul>
+</div>
+<div id="new-features-1" class="section level2">
+<h2 class="hasAnchor">
+<a href="#new-features-1" class="anchor"></a>New features</h2>
+<ul>
+<li><p><code><a href="../reference/mkinfit.html">mkinfit()</a></code>: Report successful termination when quiet = FALSE. This is helpful for more difficult problems fitted with reweight.method = obs, as no progress is often indicated during the reweighting.</p></li>
+<li><p>A first test using results established in the expertise written for the German Federal Environmental Agency (UBA) was added.</p></li>
+<li><p>Add synthetic datasets generated for expertise written for the German Federal Environmental Agency UBA</p></li>
+<li><p>Add tests based on these datasets</p></li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-34-2014-11-22" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-34">
+<a href="#mkin-0-9-34-2014-11-22" class="anchor"></a>mkin 0.9-34 (2014-11-22)<small> 2014-11-22 </small>
+</h1>
+<div id="new-features-2" class="section level2">
+<h2 class="hasAnchor">
+<a href="#new-features-2" class="anchor"></a>New features</h2>
+<ul>
+<li><p>Add the convenience function <code><a href="../reference/mkinsub.html">mkinsub()</a></code> for creating the lists used in <code><a href="../reference/mkinmod.html">mkinmod()</a></code></p></li>
+<li><p>Add the possibility to fit indeterminate order rate equation (IORE) models using an analytical solution (parent only) or a numeric solution. Paths from IORE compounds to metabolites are supported when using formation fractions (use_of_ff = ‘max’). Note that the numerical solution (method.ode = ‘deSolve’) of the IORE differential equations sometimes fails due to numerical problems.</p></li>
+<li><p>Switch to using the Port algorithm (using a model/trust region approach) per default. While needing more iterations than the Levenberg-Marquardt algorithm previously used per default, it is less sensitive to starting parameters.</p></li>
+</ul>
+</div>
+<div id="minor-changes-6" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-6" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p>The formatting of differential equations in the summary was further improved</p></li>
+<li><p>Always include 0 on y axis when plotting during the fit</p></li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-33-2014-10-22" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-33">
+<a href="#mkin-0-9-33-2014-10-22" class="anchor"></a>mkin 0.9-33 (2014-10-22)<small> 2014-10-12 </small>
+</h1>
+<div id="new-features-3" class="section level2">
+<h2 class="hasAnchor">
+<a href="#new-features-3" class="anchor"></a>New features</h2>
+<ul>
+<li><p>The initial value (state.ini) for the observed variable with the highest observed residue is set to 100 in case it has no time zero observation and <code>state.ini = "auto"</code></p></li>
+<li><p>A basic unit test for <code><a href="../reference/mkinerrmin.html">mkinerrmin()</a></code> was written</p></li>
+</ul>
+</div>
+<div id="bug-fixes-7" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-7" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li><p><code><a href="../reference/mkinfit.html">mkinfit()</a></code>: The internally fitted parameter for <code>g</code> was named <code>g_ilr</code> even when <code>transform_fractions=FALSE</code></p></li>
+<li><p><code><a href="../reference/mkinfit.html">mkinfit()</a></code>: The initial value (state.ini) for the parent compound was not set when the parent was not the (only) variable with the highest value in the observed data.</p></li>
+<li><p><code><a href="../reference/mkinerrmin.html">mkinerrmin()</a></code>: When checking for degrees of freedom for metabolites, check if their time zero value is fixed instead of checking if the observed value is zero. This ensures correct calculation of degrees of freedom also in cases where the metabolite residue at time zero is greater zero.</p></li>
+<li><p><code><a href="../reference/plot.mkinfit.html">plot.mkinfit()</a></code>: Avoid a warning message about only using the first component of ylim that occurred when ylim was specified explicitly</p></li>
+</ul>
+</div>
+<div id="minor-changes-7" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-7" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p>The formatting of differential equations in the summary was improved by wrapping overly long lines</p></li>
+<li><p>The FOCUS_Z vignette was rebuilt with the above improvement and using a width of 70 to avoid output outside of the grey area</p></li>
+<li><p><code><a href="../reference/summary.mkinfit.html">print.summary.mkinfit()</a></code>: Avoid a warning that occurred when gmkin showed summaries of initial fits without iterations</p></li>
+<li><p><code><a href="../reference/mkinfit.html">mkinfit()</a></code>: Avoid a warning that occurred when summarising a fit that was performed with maxitmodFit = 0 as done in gmkin for configuring new fits.</p></li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-32-2014-07-24" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-32">
+<a href="#mkin-0-9-32-2014-07-24" class="anchor"></a>mkin 0.9-32 (2014-07-24)<small> 2014-07-24 </small>
+</h1>
+<div id="new-features-4" class="section level2">
+<h2 class="hasAnchor">
+<a href="#new-features-4" class="anchor"></a>New features</h2>
+<ul>
+<li><p>The number of degrees of freedom is difficult to define in the case of ilr transformation of formation fractions. Now for each source compartment the number of ilr parameters (=number of optimised parameters) is divided by the number of pathways to metabolites (=number of affected data series) which leads to fractional degrees of freedom in some cases.</p></li>
+<li><p>The default for the initial value for the first state value is now taken from the mean of the observations at time zero, if available.</p></li>
+<li><p>The kinetic model can alternatively be specified with a shorthand name for parent only degradation models, e.g. <code>SFO</code>, or <code>DFOP</code>.</p></li>
+<li><p>Optimisation method, number of model evaluations and time elapsed during optimisation are given in the summary of mkinfit objects.</p></li>
+<li><p>The maximum number of iterations in the optimisation algorithm can be specified using the argument <code>maxit.modFit</code> to the mkinfit function.</p></li>
+<li><p>mkinfit gives a warning when the fit does not converge (does not apply to SANN method). This warning is included in the summary.</p></li>
+</ul>
+</div>
+<div id="bug-fixes-8" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-8" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li><p>Avoid plotting an artificial 0 residual at time zero in <code>mkinresplot</code></p></li>
+<li><p>In the determination of the degrees of freedom in <code>mkinerrmin</code>, formation fractions were accounted for multiple times in the case of parallel formation of metabolites. See the new feature described above for the solution.</p></li>
+<li><p><code>transform_rates=FALSE</code> in <code>mkinfit</code> now also works for FOMC and HS models.</p></li>
+<li><p>Initial values for formation fractions were not set in all cases.</p></li>
+<li><p>No warning was given when the fit did not converge when a method other than the default Levenberg-Marquardt method <code>Marq</code> was used.</p></li>
+</ul>
+</div>
+<div id="minor-changes-8" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-8" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p>Vignettes were rebuilt to reflect the changes in the summary method.</p></li>
+<li><p>Algorithm <code>Pseudo</code> was excluded because it needs user-defined parameter limits which are not supported.</p></li>
+<li><p>Algorithm <code>Newton</code> was excluded because of its different way to specify the maximum number of iterations and because it does not appear to provide additional benefits.</p></li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-31-2014-07-14" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-31">
+<a href="#mkin-0-9-31-2014-07-14" class="anchor"></a>mkin 0.9-31 (2014-07-14)<small> 2014-07-14 </small>
+</h1>
+<div id="bug-fixes-9" class="section level2">
+<h2 class="hasAnchor">
+<a href="#bug-fixes-9" class="anchor"></a>Bug fixes</h2>
+<ul>
+<li>The internal renaming of optimised parameters in Version 0.9-30 led to errors in the determination of the degrees of freedom for the chi2 error level calulations in <code><a href="../reference/mkinerrmin.html">mkinerrmin()</a></code> used by the summary function.</li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-30-2014-07-11" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-30">
+<a href="#mkin-0-9-30-2014-07-11" class="anchor"></a>mkin 0.9-30 (2014-07-11)<small> 2014-07-11 </small>
+</h1>
+<div id="new-features-5" class="section level2">
+<h2 class="hasAnchor">
+<a href="#new-features-5" class="anchor"></a>New features</h2>
+<ul>
+<li>It is now possible to use formation fractions in combination with turning off the sink in <code><a href="../reference/mkinmod.html">mkinmod()</a></code>.</li>
+</ul>
+</div>
+<div id="major-changes-5" class="section level2">
+<h2 class="hasAnchor">
+<a href="#major-changes-5" class="anchor"></a>Major changes</h2>
+<ul>
+<li><p>The original and the transformed parameters now have different names (e.g. <code>k_parent</code> and <code>log_k_parent</code>. They also differ in how many they are when we have formation fractions but no pathway to sink.</p></li>
+<li><p>The order of some of the information blocks in <code>print.summary.mkinfit.R()</code> has been ordered in a more logical way.</p></li>
+</ul>
+</div>
+<div id="minor-changes-9" class="section level2">
+<h2 class="hasAnchor">
+<a href="#minor-changes-9" class="anchor"></a>Minor changes</h2>
+<ul>
+<li><p>The vignette FOCUS_Z has been simplified to use formation fractions with turning off the sink, and slightly amended to use the new versions of DT50 values calculated since mkin 0.9-29.</p></li>
+<li><p>All vignettes have been rebuilt so they reflect all changes.</p></li>
+<li><p>The ChangeLog was renamed to NEWS.md and the entries were converted to markdown syntax compatible with the <code>tools::news()</code> function built into R.</p></li>
+<li><p>The test suite was overhauled. Tests of the DFOP and SFORB models with dataset FOCUS_2006_A were removed, as they were too much dependent on the optimisation algorithm and/or starting parameters, because the dataset is SFO (compare kinfit vignette).</p></li>
+<li><p>Also, the Schaefer complex case can now be fitted using formation fractions, and with the ‘Port’ optimisation method we also fit A2 in the same way as published in the Piacenza paper.</p></li>
+<li><p>Some more checks were introduced to <code><a href="../reference/mkinfit.html">mkinfit()</a></code>, leading to warnings or stopping execution if unsupported combinations of methods and parameters are requested.</p></li>
+</ul>
+</div>
+</div>
+ <div id="mkin-0-9-29-2014-06-27" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-29">
+<a href="#mkin-0-9-29-2014-06-27" class="anchor"></a>mkin 0.9-29 (2014-06-27)<small> 2014-06-27 </small>
+</h1>
+<ul>
+<li><p>R/mkinresplot.R: Make it possible to specify <code>xlim</code></p></li>
+<li><p>R/geometric_mean.R, man/geometric_mean.Rd: Add geometric mean function</p></li>
+<li><p>R/endpoints.R, man/endpoints.Rd: Calculate additional (pseudo)-DT50 values for FOMC, DFOP, HS and SFORB. Avoid calculation of formation fractions from rate constants when they are directly fitted</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-28-2014-05-20" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-28">
+<a href="#mkin-0-9-28-2014-05-20" class="anchor"></a>mkin 0.9-28 (2014-05-20)<small> 2014-05-20 </small>
+</h1>
+<ul>
+<li><p>Do not backtransform confidence intervals for formation fractions if more than one compound is formed, as such parameters only define the pathways as a set</p></li>
+<li><p>Add historical remarks and some background to the main package vignette</p></li>
+<li><p>Correct ‘isotropic’ into ‘isometric’ for the ilr transformation</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-27-2014-05-10" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-27">
+<a href="#mkin-0-9-27-2014-05-10" class="anchor"></a>mkin 0.9-27 (2014-05-10)<small> 2014-05-10 </small>
+</h1>
+<ul>
+<li><p>Fork the GUI into a separate package <a href="http://github.com/jranke/gmkin">gmkin</a></p></li>
+<li><p>DESCRIPTION, NAMESPACE, TODO: Adapt and add copyright information</p></li>
+<li><p>Remove files belonging to the GUI</p></li>
+<li><p>Possibility to fit without parameter transformations, using bounds as implemented in FME</p></li>
+<li><p>Add McCall 2,4,5-T dataset</p></li>
+<li><p>Enable selection of observed variables in plotting</p></li>
+<li><p>Add possibility to show residual plot in <code>plot.mkinfit</code></p></li>
+<li><p>R/mkinparplot.R, man/mkinparplot.Rd: plot parameters with confidence intervals</p></li>
+<li><p>Change vignette format from Sweave to knitr</p></li>
+<li><p>Split examples vignette to FOCUS_L and FOCUS_Z</p></li>
+<li><p>Remove warning about constant formation fractions in mkinmod as it was based on a misconception</p></li>
+<li><p>Restrict the unit test with the Schaefer data to parent and primary metabolites as formation fraction and DT50 for A2 are highly correlated and passing the test is platform dependent. For example, the test fails in 1 out of 14 platforms on CRAN as of today.</p></li>
+<li><p>Add Eurofins Regulatory AG copyright notices</p></li>
+<li><p>Import FME and deSolve instead of depending on them to have clean startup</p></li>
+<li><p>Add a starter function for the GUI: <code>gmkin()</code></p></li>
+<li><p>Change the format of the workspace files of gmkin so they can be distributed and documented in the package</p></li>
+<li><p>Add gmkin workspace datasets FOCUS_2006_gmkin and FOCUS_2006_Z_gmkin</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-24-2013-11-06" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-24">
+<a href="#mkin-0-9-24-2013-11-06" class="anchor"></a>mkin 0.9-24 (2013-11-06)<small> 2013-11-06 </small>
+</h1>
+<ul>
+<li><p>Bugfix re-enabling the fixing of any combination of initial values for state variables</p></li>
+<li><p>Default values for kinetic rate constants are not all 0.1 any more but are “salted” with a small increment to avoid numeric artefacts with the eigenvalue based solutions</p></li>
+<li><p>Backtransform fixed ODE parameters for the summary</p></li>
+</ul>
+</div>
+ <div id="mkin-0-9-22-2013-10-26" class="section level1">
+<h1 class="page-header" data-toc-text="0.9-22">
+<a href="#mkin-0-9-22-2013-10-26" class="anchor"></a>mkin 0.9-22 (2013-10-26)<small> 2013-10-26 </small>
+</h1>
+<ul>
+<li><p>Get rid of the optimisation step in <code>mkinerrmin</code> - this was unnecessary. Thanks to KinGUII for the inspiration - actually this is equation 6-2 in FOCUS kinetics p. 91 that I had overlooked originally</p></li>
+<li><p>Fix <code>plot.mkinfit</code> as it passed graphical arguments like main to the solver</p></li>
+<li><p>Do not use <code>plot=TRUE</code> in <code><a href="../reference/mkinfit.html">mkinfit()</a></code> example</p></li>
+<li><p>The first successful fits in the not so simple GUI</p></li>
+<li><p>Fix iteratively reweighted least squares for the case of many metabolites</p></li>
+<li><p>Unify naming of initial values of state variables</p></li>
+<li><p>Unify naming in dataframes of optimised and fixed parameters in the summary</p></li>
+<li><p>Show the weighting method for residuals in the summary</p></li>
+<li><p>Correct the output of the data in the case of manual weighting</p></li>
+<li><p>Implement IRLS assuming different variances for observed variables</p></li>
+<li><p>Do not use 0 values at time zero for chi2 error level calculations. This is the way it is done in KinGUII and it makes sense. It does impact the chi2 error levels in the output. Generally they seem to be lower for metabolites now, presumably because the mean of the observed values is higher</p></li>
+</ul>
+<p>For a detailed list of changes to the mkin source please consult the commit history on <a href="http://github.com/jranke/mkin" class="uri">http://github.com/jranke/mkin</a></p>
+</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/pkgdown.css b/docs/dev/pkgdown.css
new file mode 100644
index 00000000..c01e5923
--- /dev/null
+++ b/docs/dev/pkgdown.css
@@ -0,0 +1,367 @@
+/* Sticky footer */
+
+/**
+ * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
+ * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css
+ *
+ * .Site -> body > .container
+ * .Site-content -> body > .container .row
+ * .footer -> footer
+ *
+ * Key idea seems to be to ensure that .container and __all its parents__
+ * have height set to 100%
+ *
+ */
+
+html, body {
+ height: 100%;
+}
+
+body {
+ position: relative;
+}
+
+body > .container {
+ display: flex;
+ height: 100%;
+ flex-direction: column;
+}
+
+body > .container .row {
+ flex: 1 0 auto;
+}
+
+footer {
+ margin-top: 45px;
+ padding: 35px 0 36px;
+ border-top: 1px solid #e5e5e5;
+ color: #666;
+ display: flex;
+ flex-shrink: 0;
+}
+footer p {
+ margin-bottom: 0;
+}
+footer div {
+ flex: 1;
+}
+footer .pkgdown {
+ text-align: right;
+}
+footer p {
+ margin-bottom: 0;
+}
+
+img.icon {
+ float: right;
+}
+
+img {
+ max-width: 100%;
+}
+
+/* Fix bug in bootstrap (only seen in firefox) */
+summary {
+ display: list-item;
+}
+
+/* Typographic tweaking ---------------------------------*/
+
+.contents .page-header {
+ margin-top: calc(-60px + 1em);
+}
+
+dd {
+ margin-left: 3em;
+}
+
+/* Section anchors ---------------------------------*/
+
+a.anchor {
+ margin-left: -30px;
+ display:inline-block;
+ width: 30px;
+ height: 30px;
+ visibility: hidden;
+
+ background-image: url(./link.svg);
+ background-repeat: no-repeat;
+ background-size: 20px 20px;
+ background-position: center center;
+}
+
+.hasAnchor:hover a.anchor {
+ visibility: visible;
+}
+
+@media (max-width: 767px) {
+ .hasAnchor:hover a.anchor {
+ visibility: hidden;
+ }
+}
+
+
+/* Fixes for fixed navbar --------------------------*/
+
+.contents h1, .contents h2, .contents h3, .contents h4 {
+ padding-top: 60px;
+ margin-top: -40px;
+}
+
+/* Navbar submenu --------------------------*/
+
+.dropdown-submenu {
+ position: relative;
+}
+
+.dropdown-submenu>.dropdown-menu {
+ top: 0;
+ left: 100%;
+ margin-top: -6px;
+ margin-left: -1px;
+ border-radius: 0 6px 6px 6px;
+}
+
+.dropdown-submenu:hover>.dropdown-menu {
+ display: block;
+}
+
+.dropdown-submenu>a:after {
+ display: block;
+ content: " ";
+ float: right;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+ border-width: 5px 0 5px 5px;
+ border-left-color: #cccccc;
+ margin-top: 5px;
+ margin-right: -10px;
+}
+
+.dropdown-submenu:hover>a:after {
+ border-left-color: #ffffff;
+}
+
+.dropdown-submenu.pull-left {
+ float: none;
+}
+
+.dropdown-submenu.pull-left>.dropdown-menu {
+ left: -100%;
+ margin-left: 10px;
+ border-radius: 6px 0 6px 6px;
+}
+
+/* Sidebar --------------------------*/
+
+#pkgdown-sidebar {
+ margin-top: 30px;
+ position: -webkit-sticky;
+ position: sticky;
+ top: 70px;
+}
+
+#pkgdown-sidebar h2 {
+ font-size: 1.5em;
+ margin-top: 1em;
+}
+
+#pkgdown-sidebar h2:first-child {
+ margin-top: 0;
+}
+
+#pkgdown-sidebar .list-unstyled li {
+ margin-bottom: 0.5em;
+}
+
+/* bootstrap-toc tweaks ------------------------------------------------------*/
+
+/* All levels of nav */
+
+nav[data-toggle='toc'] .nav > li > a {
+ padding: 4px 20px 4px 6px;
+ font-size: 1.5rem;
+ font-weight: 400;
+ color: inherit;
+}
+
+nav[data-toggle='toc'] .nav > li > a:hover,
+nav[data-toggle='toc'] .nav > li > a:focus {
+ padding-left: 5px;
+ color: inherit;
+ border-left: 1px solid #878787;
+}
+
+nav[data-toggle='toc'] .nav > .active > a,
+nav[data-toggle='toc'] .nav > .active:hover > a,
+nav[data-toggle='toc'] .nav > .active:focus > a {
+ padding-left: 5px;
+ font-size: 1.5rem;
+ font-weight: 400;
+ color: inherit;
+ border-left: 2px solid #878787;
+}
+
+/* Nav: second level (shown on .active) */
+
+nav[data-toggle='toc'] .nav .nav {
+ display: none; /* Hide by default, but at >768px, show it */
+ padding-bottom: 10px;
+}
+
+nav[data-toggle='toc'] .nav .nav > li > a {
+ padding-left: 16px;
+ font-size: 1.35rem;
+}
+
+nav[data-toggle='toc'] .nav .nav > li > a:hover,
+nav[data-toggle='toc'] .nav .nav > li > a:focus {
+ padding-left: 15px;
+}
+
+nav[data-toggle='toc'] .nav .nav > .active > a,
+nav[data-toggle='toc'] .nav .nav > .active:hover > a,
+nav[data-toggle='toc'] .nav .nav > .active:focus > a {
+ padding-left: 15px;
+ font-weight: 500;
+ font-size: 1.35rem;
+}
+
+/* orcid ------------------------------------------------------------------- */
+
+.orcid {
+ font-size: 16px;
+ color: #A6CE39;
+ /* margins are required by official ORCID trademark and display guidelines */
+ margin-left:4px;
+ margin-right:4px;
+ vertical-align: middle;
+}
+
+/* Reference index & topics ----------------------------------------------- */
+
+.ref-index th {font-weight: normal;}
+
+.ref-index td {vertical-align: top;}
+.ref-index .icon {width: 40px;}
+.ref-index .alias {width: 40%;}
+.ref-index-icons .alias {width: calc(40% - 40px);}
+.ref-index .title {width: 60%;}
+
+.ref-arguments th {text-align: right; padding-right: 10px;}
+.ref-arguments th, .ref-arguments td {vertical-align: top;}
+.ref-arguments .name {width: 20%;}
+.ref-arguments .desc {width: 80%;}
+
+/* Nice scrolling for wide elements --------------------------------------- */
+
+table {
+ display: block;
+ overflow: auto;
+}
+
+/* Syntax highlighting ---------------------------------------------------- */
+
+pre {
+ word-wrap: normal;
+ word-break: normal;
+ border: 1px solid #eee;
+}
+
+pre, code {
+ background-color: #f8f8f8;
+ color: #333;
+}
+
+pre code {
+ overflow: auto;
+ word-wrap: normal;
+ white-space: pre;
+}
+
+pre .img {
+ margin: 5px 0;
+}
+
+pre .img img {
+ background-color: #fff;
+ display: block;
+ height: auto;
+}
+
+code a, pre a {
+ color: #375f84;
+}
+
+a.sourceLine:hover {
+ text-decoration: none;
+}
+
+.fl {color: #1514b5;}
+.fu {color: #000000;} /* function */
+.ch,.st {color: #036a07;} /* string */
+.kw {color: #264D66;} /* keyword */
+.co {color: #888888;} /* comment */
+
+.message { color: black; font-weight: bolder;}
+.error { color: orange; font-weight: bolder;}
+.warning { color: #6A0366; font-weight: bolder;}
+
+/* Clipboard --------------------------*/
+
+.hasCopyButton {
+ position: relative;
+}
+
+.btn-copy-ex {
+ position: absolute;
+ right: 0;
+ top: 0;
+ visibility: hidden;
+}
+
+.hasCopyButton:hover button.btn-copy-ex {
+ visibility: visible;
+}
+
+/* headroom.js ------------------------ */
+
+.headroom {
+ will-change: transform;
+ transition: transform 200ms linear;
+}
+.headroom--pinned {
+ transform: translateY(0%);
+}
+.headroom--unpinned {
+ transform: translateY(-100%);
+}
+
+/* mark.js ----------------------------*/
+
+mark {
+ background-color: rgba(255, 255, 51, 0.5);
+ border-bottom: 2px solid rgba(255, 153, 51, 0.3);
+ padding: 1px;
+}
+
+/* vertical spacing after htmlwidgets */
+.html-widget {
+ margin-bottom: 10px;
+}
+
+/* fontawesome ------------------------ */
+
+.fab {
+ font-family: "Font Awesome 5 Brands" !important;
+}
+
+/* don't display links in code chunks when printing */
+/* source: https://stackoverflow.com/a/10781533 */
+@media print {
+ code a:link:after, code a:visited:after {
+ content: "";
+ }
+}
diff --git a/docs/dev/pkgdown.js b/docs/dev/pkgdown.js
new file mode 100644
index 00000000..7e7048fa
--- /dev/null
+++ b/docs/dev/pkgdown.js
@@ -0,0 +1,108 @@
+/* http://gregfranko.com/blog/jquery-best-practices/ */
+(function($) {
+ $(function() {
+
+ $('.navbar-fixed-top').headroom();
+
+ $('body').css('padding-top', $('.navbar').height() + 10);
+ $(window).resize(function(){
+ $('body').css('padding-top', $('.navbar').height() + 10);
+ });
+
+ $('[data-toggle="tooltip"]').tooltip();
+
+ var cur_path = paths(location.pathname);
+ var links = $("#navbar ul li a");
+ var max_length = -1;
+ var pos = -1;
+ for (var i = 0; i < links.length; i++) {
+ if (links[i].getAttribute("href") === "#")
+ continue;
+ // Ignore external links
+ if (links[i].host !== location.host)
+ continue;
+
+ var nav_path = paths(links[i].pathname);
+
+ var length = prefix_length(nav_path, cur_path);
+ if (length > max_length) {
+ max_length = length;
+ pos = i;
+ }
+ }
+
+ // Add class to parent <li>, and enclosing <li> if in dropdown
+ if (pos >= 0) {
+ var menu_anchor = $(links[pos]);
+ menu_anchor.parent().addClass("active");
+ menu_anchor.closest("li.dropdown").addClass("active");
+ }
+ });
+
+ function paths(pathname) {
+ var pieces = pathname.split("/");
+ pieces.shift(); // always starts with /
+
+ var end = pieces[pieces.length - 1];
+ if (end === "index.html" || end === "")
+ pieces.pop();
+ return(pieces);
+ }
+
+ // Returns -1 if not found
+ function prefix_length(needle, haystack) {
+ if (needle.length > haystack.length)
+ return(-1);
+
+ // Special case for length-0 haystack, since for loop won't run
+ if (haystack.length === 0) {
+ return(needle.length === 0 ? 0 : -1);
+ }
+
+ for (var i = 0; i < haystack.length; i++) {
+ if (needle[i] != haystack[i])
+ return(i);
+ }
+
+ return(haystack.length);
+ }
+
+ /* Clipboard --------------------------*/
+
+ function changeTooltipMessage(element, msg) {
+ var tooltipOriginalTitle=element.getAttribute('data-original-title');
+ element.setAttribute('data-original-title', msg);
+ $(element).tooltip('show');
+ element.setAttribute('data-original-title', tooltipOriginalTitle);
+ }
+
+ if(ClipboardJS.isSupported()) {
+ $(document).ready(function() {
+ var copyButton = "<button type='button' class='btn btn-primary btn-copy-ex' type = 'submit' title='Copy to clipboard' aria-label='Copy to clipboard' data-toggle='tooltip' data-placement='left auto' data-trigger='hover' data-clipboard-copy><i class='fa fa-copy'></i></button>";
+
+ $(".examples, div.sourceCode").addClass("hasCopyButton");
+
+ // Insert copy buttons:
+ $(copyButton).prependTo(".hasCopyButton");
+
+ // Initialize tooltips:
+ $('.btn-copy-ex').tooltip({container: 'body'});
+
+ // Initialize clipboard:
+ var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', {
+ text: function(trigger) {
+ return trigger.parentNode.textContent;
+ }
+ });
+
+ clipboardBtnCopies.on('success', function(e) {
+ changeTooltipMessage(e.trigger, 'Copied!');
+ e.clearSelection();
+ });
+
+ clipboardBtnCopies.on('error', function() {
+ changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy');
+ });
+ });
+ }
+})(window.jQuery || window.$)
diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml
new file mode 100644
index 00000000..0dbb110e
--- /dev/null
+++ b/docs/dev/pkgdown.yml
@@ -0,0 +1,17 @@
+pandoc: 2.2.1
+pkgdown: 1.5.1
+pkgdown_sha: ~
+articles:
+ FOCUS_D: FOCUS_D.html
+ FOCUS_L: FOCUS_L.html
+ mkin: mkin.html
+ twa: twa.html
+ FOCUS_Z: web_only/FOCUS_Z.html
+ NAFTA_examples: web_only/NAFTA_examples.html
+ benchmarks: web_only/benchmarks.html
+ compiled_models: web_only/compiled_models.html
+last_built: 2020-05-27T03:53Z
+urls:
+ reference: https://pkgdown.jrwb.de/mkin/reference
+ article: https://pkgdown.jrwb.de/mkin/articles
+
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>
+
+
diff --git a/docs/dev/sitemap.xml b/docs/dev/sitemap.xml
new file mode 100644
index 00000000..e284abf6
--- /dev/null
+++ b/docs/dev/sitemap.xml
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/index.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/AIC.mmkin.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/CAKE_export.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/DFOP.solution.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/Extract.mmkin.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_DFOP_ref_A_to_B.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_FOMC_ref_A_to_F.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_HS_ref_A_to_F.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_SFO_ref_A_to_F.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/FOCUS_2006_datasets.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/FOMC.solution.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/HS.solution.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/IORE.solution.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_2015.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/NAFTA_SOP_Attachment.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/SFO.solution.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/SFORB.solution.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/add_err.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/aw.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/confint.mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/create_deg_func.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/endpoints.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/experimental_data_for_UBA.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/get_deg_func.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/ilr.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/loftest.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/logLik.mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/logistic.solution.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/lrtest.mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/max_twa_parent.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mccall81_245T.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkin_long_to_wide.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkin_wide_to_long.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinds.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinerrmin.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinerrplot.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinmod.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinparplot.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinplot.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinpredict.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinresplot.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mkinsub.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/mmkin.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/nafta.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/nlme.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/nlme.mmkin.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/nobs.mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/parms.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/plot.mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/plot.mmkin.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/plot.nafta.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/plot.nlme.mmkin.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/print.mkinds.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/print.mkinmod.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/reexports.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/residuals.mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/saemix.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/schaefer07_complex_case.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/sigma_twocomp.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/summary.mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/synthetic_data_for_UBA_2014.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/test_data_from_UBA_2014.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/transform_odeparms.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/reference/update.mkinfit.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/articles/FOCUS_D.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/articles/FOCUS_L.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/articles/mkin.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/articles/twa.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/articles/web_only/FOCUS_Z.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/articles/web_only/NAFTA_examples.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/articles/web_only/benchmarks.html</loc>
+ </url>
+ <url>
+ <loc>https://pkgdown.jrwb.de/mkin/articles/web_only/compiled_models.html</loc>
+ </url>
+</urlset>
diff --git a/vignettes/web_only/mkin_benchmarks.rda b/vignettes/web_only/mkin_benchmarks.rda
index a95680c0..c38cd1ea 100644
--- a/vignettes/web_only/mkin_benchmarks.rda
+++ b/vignettes/web_only/mkin_benchmarks.rda
Binary files differ

Contact - Imprint