diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2018-03-03 10:39:34 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2018-03-03 10:39:34 +0100 |
commit | 5aec8e34680e05671347f7577ae36c9ad8e37063 (patch) | |
tree | 2cfc0f696cc202e9c9a7b7951930bfe88c355d23 /docs | |
parent | 7ceb1dc732ac8674dd8dd70b798fe12378ec10af (diff) | |
parent | 8650f26f63a64ac8b72326e2679719744ac99f07 (diff) |
Merge branch 'master' of kolab:mkin
Diffstat (limited to 'docs')
134 files changed, 1117 insertions, 2478 deletions
diff --git a/docs/articles/FOCUS_D.R b/docs/articles/FOCUS_D.R deleted file mode 100644 index b831e14e..00000000 --- a/docs/articles/FOCUS_D.R +++ /dev/null @@ -1,24 +0,0 @@ -## ---- include = FALSE---------------------------------------------------- -library(knitr) -opts_chunk$set(tidy = FALSE, cache = TRUE) - -## ----data---------------------------------------------------------------- -library("mkin", quietly = TRUE) -print(FOCUS_2006_D) - -## ----model--------------------------------------------------------------- -SFO_SFO <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) -print(SFO_SFO$diffs) - -## ----fit----------------------------------------------------------------- -fit <- mkinfit(SFO_SFO, FOCUS_2006_D, quiet = TRUE) - -## ----plot, fig.height = 6, fig.width = 8--------------------------------- -plot_sep(fit, lpos = c("topright", "bottomright")) - -## ----plot_2, fig.height = 4, fig.width = 8------------------------------- -mkinparplot(fit) - -## ------------------------------------------------------------------------ -summary(fit) - diff --git a/docs/articles/FOCUS_D.html b/docs/articles/FOCUS_D.html index d9dd8ad5..af04f755 100644 --- a/docs/articles/FOCUS_D.html +++ b/docs/articles/FOCUS_D.html @@ -8,8 +8,11 @@ <title>Example evaluation of FOCUS Example Dataset D • mkin</title> <!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> -<!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> -<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]> +<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><meta property="og:title" content="Example evaluation of FOCUS Example Dataset D"> +<meta property="og:description" content=""> +<meta name="twitter:card" content="summary"> +<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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]--> @@ -77,7 +80,7 @@ <h1>Example evaluation of FOCUS Example Dataset D</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-01-16</h4> + <h4 class="date">2018-03-01</h4> </div> @@ -85,7 +88,7 @@ <div class="contents"> <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 a 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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>) -<span class="kw">print</span>(FOCUS_2006_D)</code></pre></div> +<span class="kw">print</span>(FOCUS_<span class="dv">2006</span>_D)</code></pre></div> <pre><code>## name time value ## 1 parent 0 99.46 ## 2 parent 0 102.04 @@ -135,13 +138,13 @@ <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"><pre class="sourceCode r"><code class="sourceCode r">SFO_SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">parent =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"m1"</span>), <span class="dt">m1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">print</span>(SFO_SFO$diffs)</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">print</span>(SFO_SFO<span class="op">$</span>diffs)</code></pre></div> <pre><code>## parent ## "d_parent = - k_parent_sink * parent - k_parent_m1 * parent" ## m1 ## "d_m1 = + k_parent_m1 * parent - k_m1_sink * m1"</code></pre> <p>We do the fitting without progress report (<code>quiet = TRUE</code>).</p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">fit <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">fit <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_<span class="dv">2006</span>_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</code></pre></div> <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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(fit, <span class="dt">lpos =</span> <span class="kw">c</span>(<span class="st">"topright"</span>, <span class="st">"bottomright"</span>))</code></pre></div> <p><img src="FOCUS_D_files/figure-html/plot-1.png" width="768"></p> @@ -150,10 +153,10 @@ <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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(fit)</code></pre></div> -<pre><code>## mkin version: 0.9.46.1 -## R version: 3.4.1 -## Date of fit: Thu Sep 14 12:15:01 2017 -## Date of summary: Thu Sep 14 12:15:02 2017 +<pre><code>## mkin version: 0.9.46.3 +## R version: 3.4.3 +## Date of fit: Thu Mar 1 14:17:55 2018 +## Date of summary: Thu Mar 1 14:17:55 2018 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -161,7 +164,7 @@ ## ## Model predictions using solution type deSolve ## -## Fitted with method Port using 153 model solutions performed in 1.14 s +## Fitted with method Port using 153 model solutions performed in 0.993 s ## ## Weighting: none ## @@ -286,7 +289,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/articles/FOCUS_D_files/figure-html/plot-1.png b/docs/articles/FOCUS_D_files/figure-html/plot-1.png Binary files differindex 75c4c299..b4fa2ff4 100644 --- a/docs/articles/FOCUS_D_files/figure-html/plot-1.png +++ b/docs/articles/FOCUS_D_files/figure-html/plot-1.png diff --git a/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png b/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png Binary files differindex 94e7e2b3..ba06ce31 100644 --- a/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png +++ b/docs/articles/FOCUS_D_files/figure-html/plot_2-1.png diff --git a/docs/articles/FOCUS_L.html b/docs/articles/FOCUS_L.html index 42ec2df1..5de06ad5 100644 --- a/docs/articles/FOCUS_L.html +++ b/docs/articles/FOCUS_L.html @@ -8,8 +8,11 @@ <title>Example evaluation of FOCUS Laboratory Data L1 to L3 • mkin</title> <!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> -<!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> -<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]> +<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><meta property="og:title" content="Example evaluation of FOCUS Laboratory Data L1 to L3"> +<meta property="og:description" content=""> +<meta name="twitter:card" content="summary"> +<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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]--> @@ -77,7 +80,7 @@ <h1>Example evaluation of FOCUS Laboratory Data L1 to L3</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-01-16</h4> + <h4 class="date">2018-03-01</h4> </div> @@ -88,27 +91,27 @@ <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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>) -FOCUS_2006_L1 =<span class="st"> </span><span class="kw">data.frame</span>( +FOCUS_<span class="dv">2006</span>_L1 =<span class="st"> </span><span class="kw">data.frame</span>( <span class="dt">t =</span> <span class="kw">rep</span>(<span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">5</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">21</span>, <span class="dv">30</span>), <span class="dt">each =</span> <span class="dv">2</span>), <span class="dt">parent =</span> <span class="kw">c</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>)) -FOCUS_2006_L1_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_2006_L1)</code></pre></div> +FOCUS_<span class="dv">2006</span>_L1_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L1)</code></pre></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"><pre class="sourceCode r"><code class="sourceCode r">m.L1.SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, FOCUS_2006_L1_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L1.SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, FOCUS_<span class="dv">2006</span>_L1_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw">summary</span>(m.L1.SFO)</code></pre></div> -<pre><code>## mkin version: 0.9.47.1 +<pre><code>## mkin version: 0.9.46.3 ## R version: 3.4.3 -## Date of fit: Tue Jan 16 06:11:06 2018 -## Date of summary: Tue Jan 16 06:11:06 2018 +## Date of fit: Thu Mar 1 14:31:57 2018 +## Date of summary: Thu Mar 1 14:31:57 2018 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 37 model solutions performed in 0.245 s +## Fitted with method Port using 37 model solutions performed in 0.24 s ## ## Weighting: none ## @@ -185,28 +188,21 @@ FOCUS_2006_L1_mkin <-<span class="st"> </span><span class="kw"><a href="../re <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/mkinresplot.html">mkinresplot</a></span>(m.L1.SFO, <span class="dt">ylab =</span> <span class="st">"Observed"</span>, <span class="dt">xlab =</span> <span class="st">"Time"</span>)</code></pre></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"><pre class="sourceCode r"><code class="sourceCode r">m.L1.FOMC <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, FOCUS_2006_L1_mkin, <span class="dt">quiet=</span><span class="ot">TRUE</span>)</code></pre></div> -<pre><code>## Warning in mkinfit("FOMC", FOCUS_2006_L1_mkin, quiet = TRUE): Optimisation by method Port did not converge. -## Convergence code is 1</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plot</span>(m.L1.FOMC, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L1 - FOMC"</span>)</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L1.FOMC <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, FOCUS_<span class="dv">2006</span>_L1_mkin, <span class="dt">quiet=</span><span class="ot">TRUE</span>) +<span class="kw">plot</span>(m.L1.FOMC, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L1 - FOMC"</span>)</code></pre></div> <p><img src="FOCUS_L_files/figure-html/unnamed-chunk-6-1.png" width="576"></p> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L1.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> -<pre><code>## mkin version: 0.9.47.1 +<pre><code>## mkin version: 0.9.46.3 ## R version: 3.4.3 -## Date of fit: Tue Jan 16 06:11:07 2018 -## Date of summary: Tue Jan 16 06:11:07 2018 -## -## -## Warning: Optimisation by method Port did not converge. -## Convergence code is 1 -## +## Date of fit: Thu Mar 1 14:31:59 2018 +## Date of summary: Thu Mar 1 14:32:00 2018 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 155 model solutions performed in 0.424 s +## Fitted with method Port using 611 model solutions performed in 1.375 s ## ## Weighting: none ## @@ -226,16 +222,16 @@ FOCUS_2006_L1_mkin <-<span class="st"> </span><span class="kw"><a href="../re ## None ## ## Optimised, transformed parameters with symmetric confidence intervals: -## Estimate Std. Error Lower Upper -## parent_0 92.47 1.449 89.38 95.56 -## log_alpha 11.35 435.800 -917.60 940.30 -## log_beta 13.70 435.800 -915.20 942.60 +## Estimate Std. Error Lower Upper +## parent_0 92.47 1.482 89.31 95.63 +## log_alpha 11.25 598.200 -1264.00 1286.00 +## log_beta 13.60 598.200 -1261.00 1289.00 ## ## Parameter correlation: ## parent_0 log_alpha log_beta -## parent_0 1.0000 0.2209 0.2208 -## log_alpha 0.2209 1.0000 1.0000 -## log_beta 0.2208 1.0000 1.0000 +## parent_0 1.0000 -0.3016 -0.3016 +## log_alpha -0.3016 1.0000 1.0000 +## log_beta -0.3016 1.0000 1.0000 ## ## Residual standard error: 3.045 on 15 degrees of freedom ## @@ -244,9 +240,9 @@ FOCUS_2006_L1_mkin <-<span class="st"> </span><span class="kw"><a href="../re ## t-test (unrealistically) based on the assumption of normal distribution ## for estimators of untransformed parameters. ## Estimate t value Pr(>t) Lower Upper -## parent_0 92.47 63.33000 6.183e-20 89.38 95.56 -## alpha 85190.00 0.03367 4.868e-01 0.00 Inf -## beta 891000.00 0.03367 4.868e-01 0.00 Inf +## parent_0 92.47 64.45000 4.757e-20 89.31 95.63 +## alpha 76830.00 0.02852 4.888e-01 0.00 Inf +## beta 803500.00 0.02852 4.888e-01 0.00 Inf ## ## Chi2 error levels in percent: ## err.min n.optim df @@ -264,17 +260,17 @@ FOCUS_2006_L1_mkin <-<span class="st"> </span><span class="kw"><a href="../re <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"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_2006_L2 =<span class="st"> </span><span class="kw">data.frame</span>( +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_<span class="dv">2006</span>_L2 =<span class="st"> </span><span class="kw">data.frame</span>( <span class="dt">t =</span> <span class="kw">rep</span>(<span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">28</span>), <span class="dt">each =</span> <span class="dv">2</span>), <span class="dt">parent =</span> <span class="kw">c</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>)) -FOCUS_2006_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_2006_L2)</code></pre></div> +FOCUS_<span class="dv">2006</span>_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L2)</code></pre></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"><pre class="sourceCode r"><code class="sourceCode r">m.L2.SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, FOCUS_2006_L2_mkin, <span class="dt">quiet=</span><span class="ot">TRUE</span>) +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L2.SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"SFO"</span>, FOCUS_<span class="dv">2006</span>_L2_mkin, <span class="dt">quiet=</span><span class="ot">TRUE</span>) <span class="kw">plot</span>(m.L2.SFO, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L2 - SFO"</span>)</code></pre></div> <p><img src="FOCUS_L_files/figure-html/unnamed-chunk-8-1.png" width="672"></p> @@ -286,22 +282,22 @@ FOCUS_2006_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../re <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"><pre class="sourceCode r"><code class="sourceCode r">m.L2.FOMC <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, FOCUS_2006_L2_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L2.FOMC <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"FOMC"</span>, FOCUS_<span class="dv">2006</span>_L2_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw">plot</span>(m.L2.FOMC, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L2 - FOMC"</span>)</code></pre></div> <p><img src="FOCUS_L_files/figure-html/unnamed-chunk-9-1.png" width="672"></p> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L2.FOMC, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> -<pre><code>## mkin version: 0.9.47.1 +<pre><code>## mkin version: 0.9.46.3 ## R version: 3.4.3 -## Date of fit: Tue Jan 16 06:11:08 2018 -## Date of summary: Tue Jan 16 06:11:08 2018 +## Date of fit: Thu Mar 1 14:32:00 2018 +## Date of summary: Thu Mar 1 14:32:00 2018 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 81 model solutions performed in 0.168 s +## Fitted with method Port using 81 model solutions performed in 0.158 s ## ## Weighting: none ## @@ -357,15 +353,15 @@ FOCUS_2006_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../re <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"><pre class="sourceCode r"><code class="sourceCode r">m.L2.DFOP <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"DFOP"</span>, FOCUS_2006_L2_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.L2.DFOP <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(<span class="st">"DFOP"</span>, FOCUS_<span class="dv">2006</span>_L2_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw">plot</span>(m.L2.DFOP, <span class="dt">show_residuals =</span> <span class="ot">TRUE</span>, <span class="dt">show_errmin =</span> <span class="ot">TRUE</span>, <span class="dt">main =</span> <span class="st">"FOCUS L2 - DFOP"</span>)</code></pre></div> <p><img src="FOCUS_L_files/figure-html/unnamed-chunk-10-1.png" width="672"></p> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.L2.DFOP, <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> -<pre><code>## mkin version: 0.9.47.1 +<pre><code>## mkin version: 0.9.46.3 ## R version: 3.4.3 -## Date of fit: Tue Jan 16 06:11:09 2018 -## Date of summary: Tue Jan 16 06:11:09 2018 +## Date of fit: Thu Mar 1 14:32:01 2018 +## Date of summary: Thu Mar 1 14:32:01 2018 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * @@ -374,7 +370,7 @@ FOCUS_2006_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../re ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 336 model solutions performed in 0.774 s +## Fitted with method Port using 336 model solutions performed in 0.708 s ## ## Weighting: none ## @@ -433,17 +429,17 @@ FOCUS_2006_L2_mkin <-<span class="st"> </span><span class="kw"><a href="../re <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"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_2006_L3 =<span class="st"> </span><span class="kw">data.frame</span>( +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_<span class="dv">2006</span>_L3 =<span class="st"> </span><span class="kw">data.frame</span>( <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">30</span>, <span class="dv">60</span>, <span class="dv">91</span>, <span class="dv">120</span>), <span class="dt">parent =</span> <span class="kw">c</span>(<span class="fl">97.8</span>, <span class="dv">60</span>, <span class="dv">51</span>, <span class="dv">43</span>, <span class="dv">35</span>, <span class="dv">22</span>, <span class="dv">15</span>, <span class="dv">12</span>)) -FOCUS_2006_L3_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_2006_L3)</code></pre></div> +FOCUS_<span class="dv">2006</span>_L3_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L3)</code></pre></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"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Only use one core here, not to offend the CRAN checks</span> mm.L3 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin.html">mmkin</a></span>(<span class="kw">c</span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>, <span class="st">"DFOP"</span>), <span class="dt">cores =</span> <span class="dv">1</span>, - <span class="kw">list</span>(<span class="st">"FOCUS L3"</span> =<span class="st"> </span>FOCUS_2006_L3_mkin), <span class="dt">quiet =</span> <span class="ot">TRUE</span>) + <span class="kw">list</span>(<span class="st">"FOCUS L3"</span> =<span class="st"> </span>FOCUS_<span class="dv">2006</span>_L3_mkin), <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw">plot</span>(mm.L3)</code></pre></div> <p><img src="FOCUS_L_files/figure-html/unnamed-chunk-12-1.png" width="672"></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> @@ -454,10 +450,10 @@ mm.L3 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin <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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L3[[<span class="st">"DFOP"</span>, <span class="dv">1</span>]])</code></pre></div> -<pre><code>## mkin version: 0.9.47.1 +<pre><code>## mkin version: 0.9.46.3 ## R version: 3.4.3 -## Date of fit: Tue Jan 16 06:11:10 2018 -## Date of summary: Tue Jan 16 06:11:10 2018 +## Date of fit: Thu Mar 1 14:32:02 2018 +## Date of summary: Thu Mar 1 14:32:02 2018 ## ## Equations: ## d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * @@ -542,30 +538,30 @@ mm.L3 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin <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"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_2006_L4 =<span class="st"> </span><span class="kw">data.frame</span>( +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">FOCUS_<span class="dv">2006</span>_L4 =<span class="st"> </span><span class="kw">data.frame</span>( <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">30</span>, <span class="dv">60</span>, <span class="dv">91</span>, <span class="dv">120</span>), <span class="dt">parent =</span> <span class="kw">c</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>)) -FOCUS_2006_L4_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_2006_L4)</code></pre></div> +FOCUS_<span class="dv">2006</span>_L4_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_L4)</code></pre></div> <p>Fits of the SFO and FOMC models, plots and summaries are produced below:</p> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Only use one core here, not to offend the CRAN checks</span> mm.L4 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin.html">mmkin</a></span>(<span class="kw">c</span>(<span class="st">"SFO"</span>, <span class="st">"FOMC"</span>), <span class="dt">cores =</span> <span class="dv">1</span>, - <span class="kw">list</span>(<span class="st">"FOCUS L4"</span> =<span class="st"> </span>FOCUS_2006_L4_mkin), + <span class="kw">list</span>(<span class="st">"FOCUS L4"</span> =<span class="st"> </span>FOCUS_<span class="dv">2006</span>_L4_mkin), <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw">plot</span>(mm.L4)</code></pre></div> <p><img src="FOCUS_L_files/figure-html/unnamed-chunk-15-1.png" width="672"></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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L4[[<span class="st">"SFO"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> -<pre><code>## mkin version: 0.9.47.1 +<pre><code>## mkin version: 0.9.46.3 ## R version: 3.4.3 -## Date of fit: Tue Jan 16 06:11:10 2018 -## Date of summary: Tue Jan 16 06:11:10 2018 +## Date of fit: Thu Mar 1 14:32:03 2018 +## Date of summary: Thu Mar 1 14:32:03 2018 ## ## Equations: ## d_parent/dt = - k_parent_sink * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 46 model solutions performed in 0.094 s +## Fitted with method Port using 46 model solutions performed in 0.089 s ## ## Weighting: none ## @@ -615,17 +611,17 @@ mm.L4 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin ## DT50 DT90 ## parent 106 352</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(mm.L4[[<span class="st">"FOMC"</span>, <span class="dv">1</span>]], <span class="dt">data =</span> <span class="ot">FALSE</span>)</code></pre></div> -<pre><code>## mkin version: 0.9.47.1 +<pre><code>## mkin version: 0.9.46.3 ## R version: 3.4.3 -## Date of fit: Tue Jan 16 06:11:10 2018 -## Date of summary: Tue Jan 16 06:11:10 2018 +## Date of fit: Thu Mar 1 14:32:03 2018 +## Date of summary: Thu Mar 1 14:32:03 2018 ## ## Equations: ## d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent ## ## Model predictions using solution type analytical ## -## Fitted with method Port using 66 model solutions performed in 0.139 s +## Fitted with method Port using 66 model solutions performed in 0.134 s ## ## Weighting: none ## @@ -690,7 +686,8 @@ mm.L4 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <div id="tocnav"> - <h2>Contents</h2> + <h2 class="hasAnchor"> +<a href="#tocnav" class="anchor"></a>Contents</h2> <ul class="nav nav-pills nav-stacked"> <li><a href="#laboratory-data-l1">Laboratory Data L1</a></li> <li> @@ -720,7 +717,7 @@ mm.L4 <-<span class="st"> </span><span class="kw"><a href="../reference/mmkin </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png Binary files differindex f5f45ac6..c9da66ac 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-10-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png Binary files differindex 22f3a530..aa728f0f 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-12-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png Binary files differindex 9eb0378f..4eb7f3b1 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-13-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png Binary files differindex 93966e70..56654730 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-15-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png Binary files differindex 1a9c8457..b143282b 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-4-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-5-1.png Binary files differindex 12b4beea..a4753a7e 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-5-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-5-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png Binary files differindex 55e96a9e..50528c8a 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-6-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png Binary files differindex 7b8e7f95..95a5bc5c 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-8-1.png diff --git a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-9-1.png b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-9-1.png Binary files differindex 49c48168..745477a3 100644 --- a/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-9-1.png +++ b/docs/articles/FOCUS_L_files/figure-html/unnamed-chunk-9-1.png diff --git a/docs/articles/FOCUS_Z.R b/docs/articles/FOCUS_Z.R deleted file mode 100644 index 4d2dffca..00000000 --- a/docs/articles/FOCUS_Z.R +++ /dev/null @@ -1,115 +0,0 @@ -## ---- include = FALSE---------------------------------------------------- -require(knitr) -options(digits = 5) -opts_chunk$set(engine='R', tidy = FALSE) - -## ---- echo = TRUE, fig = TRUE, fig.width = 8, fig.height = 7------------- -library(mkin, quietly = TRUE) -LOD = 0.5 -FOCUS_2006_Z = data.frame( - t = c(0, 0.04, 0.125, 0.29, 0.54, 1, 2, 3, 4, 7, 10, 14, 21, - 42, 61, 96, 124), - Z0 = c(100, 81.7, 70.4, 51.1, 41.2, 6.6, 4.6, 3.9, 4.6, 4.3, 6.8, - 2.9, 3.5, 5.3, 4.4, 1.2, 0.7), - Z1 = c(0, 18.3, 29.6, 46.3, 55.1, 65.7, 39.1, 36, 15.3, 5.6, 1.1, - 1.6, 0.6, 0.5 * LOD, NA, NA, NA), - Z2 = c(0, NA, 0.5 * LOD, 2.6, 3.8, 15.3, 37.2, 31.7, 35.6, 14.5, - 0.8, 2.1, 1.9, 0.5 * LOD, NA, NA, NA), - Z3 = c(0, NA, NA, NA, NA, 0.5 * LOD, 9.2, 13.1, 22.3, 28.4, 32.5, - 25.2, 17.2, 4.8, 4.5, 2.8, 4.4)) - -FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z) - -## ----FOCUS_2006_Z_fits_1, echo=TRUE, fig.height=6------------------------ -Z.2a <- mkinmod(Z0 = mkinsub("SFO", "Z1"), - Z1 = mkinsub("SFO")) -m.Z.2a <- mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.2a) -summary(m.Z.2a, data = FALSE)$bpar - -## ----FOCUS_2006_Z_fits_2, echo=TRUE, fig.height=6------------------------ -Z.2a.ff <- mkinmod(Z0 = mkinsub("SFO", "Z1"), - Z1 = mkinsub("SFO"), - use_of_ff = "max") - -m.Z.2a.ff <- mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.2a.ff) -summary(m.Z.2a.ff, data = FALSE)$bpar - -## ----FOCUS_2006_Z_fits_3, echo=TRUE, fig.height=6------------------------ -Z.3 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), - Z1 = mkinsub("SFO"), use_of_ff = "max") -m.Z.3 <- mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.3) -summary(m.Z.3, data = FALSE)$bpar - -## ----FOCUS_2006_Z_fits_5, echo=TRUE, fig.height=7------------------------ -Z.5 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO"), use_of_ff = "max") -m.Z.5 <- mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.5) - -## ----FOCUS_2006_Z_fits_6, echo=TRUE, fig.height=8------------------------ -Z.FOCUS <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFO"), - use_of_ff = "max") -m.Z.FOCUS <- mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, - parms.ini = m.Z.5$bparms.ode, - quiet = TRUE) -plot_sep(m.Z.FOCUS) -summary(m.Z.FOCUS, data = FALSE)$bpar -endpoints(m.Z.FOCUS) - -## ----FOCUS_2006_Z_fits_7, echo=TRUE, fig.height=8------------------------ -Z.mkin.1 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFORB")) -m.Z.mkin.1 <- mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.mkin.1) -summary(m.Z.mkin.1, data = FALSE)$cov.unscaled - -## ----FOCUS_2006_Z_fits_9, echo=TRUE, fig.height=8------------------------ -Z.mkin.3 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO")) -m.Z.mkin.3 <- mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.mkin.3) - -## ----FOCUS_2006_Z_fits_10, echo=TRUE, fig.height=8----------------------- -Z.mkin.4 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFO")) -m.Z.mkin.4 <- mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, - parms.ini = m.Z.mkin.3$bparms.ode, - quiet = TRUE) -plot_sep(m.Z.mkin.4) - -## ----FOCUS_2006_Z_fits_11, echo=TRUE, fig.height=8----------------------- -Z.mkin.5 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFORB")) -m.Z.mkin.5 <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, - parms.ini = m.Z.mkin.4$bparms.ode[1:4], - quiet = TRUE) -plot_sep(m.Z.mkin.5) - -## ----FOCUS_2006_Z_fits_11a, echo=TRUE------------------------------------ -m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, - parms.ini = c(m.Z.mkin.5$bparms.ode[1:7], - k_Z3_bound_free = 0), - fixed_parms = "k_Z3_bound_free", - quiet = TRUE) -plot_sep(m.Z.mkin.5a) - -## ----FOCUS_2006_Z_fits_11b, echo=TRUE------------------------------------ -mkinparplot(m.Z.mkin.5a) - -## ----FOCUS_2006_Z_fits_11b_endpoints, echo=TRUE-------------------------- -endpoints(m.Z.mkin.5a) - diff --git a/docs/articles/FOCUS_Z.Rnw b/docs/articles/FOCUS_Z.Rnw deleted file mode 100644 index 5abda0e1..00000000 --- a/docs/articles/FOCUS_Z.Rnw +++ /dev/null @@ -1,274 +0,0 @@ -%\VignetteIndexEntry{Example evaluation of FOCUS dataset Z} -%\VignetteEngine{knitr::knitr} -\documentclass[12pt,a4paper]{article} -\usepackage{a4wide} -\input{header} -\hypersetup{ - pdftitle = {Example evaluation of FOCUS dataset Z}, - pdfsubject = {Manuscript}, - pdfauthor = {Johannes Ranke}, - colorlinks = {true}, - linkcolor = {blue}, - citecolor = {blue}, - urlcolor = {red}, - hyperindex = {true}, - linktocpage = {true}, -} - -\begin{document} - -<<include=FALSE>>= -require(knitr) -opts_chunk$set(engine='R', tidy = FALSE, cache = TRUE) -options(width=70) -@ - -\title{Example evaluation of FOCUS dataset Z} -\author{\textbf{Johannes Ranke} \\[0.5cm] -%EndAName -Wissenschaftlicher Berater\\ -Kronacher Str. 8, 79639 Grenzach-Wyhlen, Germany\\[0.5cm] -and\\[0.5cm] -University of Bremen\\ -} -\maketitle - -\thispagestyle{empty} \setcounter{page}{0} - -\clearpage - -\tableofcontents - -\textbf{Key words}: Kinetics, FOCUS, nonlinear optimisation - -\section{The data} - -The following code defines the example dataset from Appendix 7 to the FOCUS kinetics -report \citep{FOCUSkinetics2011}, p.350. - -<<FOCUS_2006_Z_data, echo=TRUE, eval=TRUE>>= -require(mkin) -LOD = 0.5 -FOCUS_2006_Z = data.frame( - t = c(0, 0.04, 0.125, 0.29, 0.54, 1, 2, 3, 4, 7, 10, 14, 21, - 42, 61, 96, 124), - Z0 = c(100, 81.7, 70.4, 51.1, 41.2, 6.6, 4.6, 3.9, 4.6, 4.3, 6.8, - 2.9, 3.5, 5.3, 4.4, 1.2, 0.7), - Z1 = c(0, 18.3, 29.6, 46.3, 55.1, 65.7, 39.1, 36, 15.3, 5.6, 1.1, - 1.6, 0.6, 0.5 * LOD, NA, NA, NA), - Z2 = c(0, NA, 0.5 * LOD, 2.6, 3.8, 15.3, 37.2, 31.7, 35.6, 14.5, - 0.8, 2.1, 1.9, 0.5 * LOD, NA, NA, NA), - Z3 = c(0, NA, NA, NA, NA, 0.5 * LOD, 9.2, 13.1, 22.3, 28.4, 32.5, - 25.2, 17.2, 4.8, 4.5, 2.8, 4.4)) - -FOCUS_2006_Z_mkin <- mkin_wide_to_long(FOCUS_2006_Z) -@ - -\section{Parent compound and one metabolite} - -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). - -<<FOCUS_2006_Z_fits_1, echo=TRUE, fig.height=6>>= -Z.2a <- mkinmod(Z0 = mkinsub("SFO", "Z1"), - Z1 = mkinsub("SFO")) -m.Z.2a <- mkinfit(Z.2a, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.2a) -summary(m.Z.2a, data = FALSE)$bpar -@ - -As obvious from the parameter summary (the \texttt{bpar} component of the -summary), the kinetic rate constant from parent compound Z to sink -is negligible. Accordingly, the exact magnitude of the fitted parameter -\texttt{log k\_Z0\_sink} is ill-defined and the covariance matrix is not -returned (not shown, would be visible in the complete summary). -This suggests, in agreement with the analysis in the FOCUS kinetics report, to -simplify the model by removing the pathway to sink. - -A similar result can be obtained when formation fractions are used in the model -formulation: - -<<FOCUS_2006_Z_fits_2, echo=TRUE, fig.height=6>>= -Z.2a.ff <- mkinmod(Z0 = mkinsub("SFO", "Z1"), - Z1 = mkinsub("SFO"), - use_of_ff = "max") - -m.Z.2a.ff <- mkinfit(Z.2a.ff, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.2a.ff) -summary(m.Z.2a.ff, data = FALSE)$bpar -@ - -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. Again, the covariance matrix is not returned as the model is -overparameterised. - -The simplified model is obtained by setting the list component \texttt{sink} to -\texttt{FALSE}.\footnote{If the model formulation without formation fractions -is used, the same effect can be obtained by fixing the parameter \texttt{k\_Z\_sink} -to a value of zero.} - -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. - -<<FOCUS_2006_Z_fits_3, echo=TRUE, fig.height=6>>= -Z.3 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), - Z1 = mkinsub("SFO"), use_of_ff = "max") -m.Z.3 <- mkinfit(Z.3, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.3) -summary(m.Z.3, data = FALSE)$bpar -@ - -As there is only one transformation product for Z0 and no pathway -to sink, the formation fraction is internally fixed to unity. - -\section{Including metabolites Z2 and Z3} - -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. - -<<FOCUS_2006_Z_fits_5, echo=TRUE, fig.height=7>>= -Z.5 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO"), use_of_ff = "max") -m.Z.5 <- mkinfit(Z.5, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.5) -@ - -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. - -<<FOCUS_2006_Z_fits_6, echo=TRUE, fig.height=8>>= -Z.FOCUS <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFO"), - use_of_ff = "max") -m.Z.FOCUS <- mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, - parms.ini = m.Z.5$bparms.ode, - quiet = TRUE) -plot_sep(m.Z.FOCUS) -summary(m.Z.FOCUS, data = FALSE)$bpar -endpoints(m.Z.FOCUS) -@ - -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. - -\section{Using the SFORB model for parent and metabolites} - -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. - -Therefore, an additional model is offered here, using the single first-order -reversible binding (SFORB) model for metabolite Z3. As expected, the $\chi^2$ -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. - -<<FOCUS_2006_Z_fits_7, echo=TRUE, fig.height=8>>= -Z.mkin.1 <- mkinmod(Z0 = mkinsub("SFO", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFORB")) -m.Z.mkin.1 <- mkinfit(Z.mkin.1, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.mkin.1) -summary(m.Z.mkin.1, data = FALSE)$cov.unscaled -@ - -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. - -<<FOCUS_2006_Z_fits_9, echo=TRUE, fig.height=8>>= -Z.mkin.3 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO")) -m.Z.mkin.3 <- mkinfit(Z.mkin.3, FOCUS_2006_Z_mkin, quiet = TRUE) -plot_sep(m.Z.mkin.3) -@ - -This results in a much better representation of the behaviour of the parent -compound Z0. - -Finally, Z3 is added as well. These models appear overparameterised (no -covariance matrix returned) if the sink for Z1 is left in the models. - -<<FOCUS_2006_Z_fits_10, echo=TRUE, fig.height=8>>= -Z.mkin.4 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFO")) -m.Z.mkin.4 <- mkinfit(Z.mkin.4, FOCUS_2006_Z_mkin, - parms.ini = m.Z.mkin.3$bparms.ode, - quiet = TRUE) -plot_sep(m.Z.mkin.4) -@ - -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. - -<<FOCUS_2006_Z_fits_11, echo=TRUE, fig.height=8>>= -Z.mkin.5 <- mkinmod(Z0 = mkinsub("SFORB", "Z1", sink = FALSE), - Z1 = mkinsub("SFO", "Z2", sink = FALSE), - Z2 = mkinsub("SFO", "Z3"), - Z3 = mkinsub("SFORB")) -m.Z.mkin.5 <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, - parms.ini = m.Z.mkin.4$bparms.ode[1:4], - quiet = TRUE) -plot_sep(m.Z.mkin.5) -@ - -The summary view of the backtransformed parameters shows that we get no -confidence intervals due to overparameterisation. As the optimized -\texttt{k\_Z3\_bound\_free} is excessively small, it seems reasonable to fix it to -zero. - -<<FOCUS_2006_Z_fits_11a, echo=TRUE>>= -m.Z.mkin.5a <- mkinfit(Z.mkin.5, FOCUS_2006_Z_mkin, - parms.ini = c(m.Z.mkin.5$bparms.ode[1:7], - k_Z3_bound_free = 0), - fixed_parms = "k_Z3_bound_free", - quiet = TRUE) -plot_sep(m.Z.mkin.5a) -@ - -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 -\texttt{Z.mkin.5a} is proposed as the best-fit model for the dataset from -Appendix 7 of the FOCUS report. - -A graphical representation of the confidence intervals can finally be obtained. - -<<FOCUS_2006_Z_fits_11b, echo=TRUE>>= -mkinparplot(m.Z.mkin.5a) -@ - -The endpoints obtained with this model are - -<<FOCUS_2006_Z_fits_11b_endpoints, echo=TRUE>>= -endpoints(m.Z.mkin.5a) -@ - -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. - -\bibliographystyle{plainnat} -\bibliography{references} - -\end{document} -% vim: set foldmethod=syntax: diff --git a/docs/articles/FOCUS_Z.html b/docs/articles/FOCUS_Z.html index a5cfc616..52a1db77 100644 --- a/docs/articles/FOCUS_Z.html +++ b/docs/articles/FOCUS_Z.html @@ -8,8 +8,11 @@ <title>Example evaluation of FOCUS dataset Z • mkin</title> <!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> -<!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> -<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]> +<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><meta property="og:title" content="Example evaluation of FOCUS dataset Z"> +<meta property="og:description" content=""> +<meta name="twitter:card" content="summary"> +<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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]--> @@ -77,7 +80,7 @@ <h1>Example evaluation of FOCUS dataset Z</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-01-16</h4> + <h4 class="date">2018-03-01</h4> </div> @@ -90,64 +93,64 @@ <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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">library</span>(mkin, <span class="dt">quietly =</span> <span class="ot">TRUE</span>) LOD =<span class="st"> </span><span class="fl">0.5</span> -FOCUS_2006_Z =<span class="st"> </span><span class="kw">data.frame</span>( +FOCUS_<span class="dv">2006</span>_Z =<span class="st"> </span><span class="kw">data.frame</span>( <span class="dt">t =</span> <span class="kw">c</span>(<span class="dv">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="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>, <span class="dv">7</span>, <span class="dv">10</span>, <span class="dv">14</span>, <span class="dv">21</span>, <span class="dv">42</span>, <span class="dv">61</span>, <span class="dv">96</span>, <span class="dv">124</span>), <span class="dt">Z0 =</span> <span class="kw">c</span>(<span class="dv">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="dt">Z1 =</span> <span class="kw">c</span>(<span class="dv">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="dv">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="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>), - <span class="dt">Z2 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> *<span class="st"> </span>LOD, <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="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>), - <span class="dt">Z3 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> *<span class="st"> </span>LOD, <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">1.6</span>, <span class="fl">0.6</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>), + <span class="dt">Z2 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <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="op">*</span><span class="st"> </span>LOD, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>), + <span class="dt">Z3 =</span> <span class="kw">c</span>(<span class="dv">0</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="ot">NA</span>, <span class="fl">0.5</span> <span class="op">*</span><span class="st"> </span>LOD, <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>)) -FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_2006_Z)</code></pre></div> +FOCUS_<span class="dv">2006</span>_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../reference/mkin_wide_to_long.html">mkin_wide_to_long</a></span>(FOCUS_<span class="dv">2006</span>_Z)</code></pre></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"><pre class="sourceCode r"><code class="sourceCode r">Z.2a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>), +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.2</span>a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>), <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.2a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.2a, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) -<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.2a)</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z<span class="fl">.2</span>a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.2</span>a, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.2</span>a)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png" width="672"></p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.2a, <span class="dt">data =</span> <span class="ot">FALSE</span>)$bpar</code></pre></div> -<pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper -## Z0_0 9.7015e+01 3.553135 2.7304e+01 1.6792e-21 91.4014 102.62838 -## k_Z0_sink 6.2135e-10 0.226894 2.7385e-09 5.0000e-01 0.0000 Inf -## k_Z0_Z1 2.2360e+00 0.165073 1.3546e+01 7.3939e-14 1.8374 2.72107 -## k_Z1_sink 4.8212e-01 0.065854 7.3212e+00 3.5520e-08 0.4006 0.58024</code></pre> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z<span class="fl">.2</span>a, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</code></pre></div> +<pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper +## Z0_0 9.7015e+01 3.553140 2.7304e+01 1.6793e-21 NA NA +## k_Z0_sink 1.2790e-11 0.226895 5.6368e-11 5.0000e-01 NA NA +## k_Z0_Z1 2.2360e+00 0.165073 1.3546e+01 7.3938e-14 NA NA +## k_Z1_sink 4.8212e-01 0.065854 7.3212e+00 3.5520e-08 NA NA</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"><pre class="sourceCode r"><code class="sourceCode r">Z.2a.ff <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>), +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.2</span>a.ff <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>), <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.2a.ff <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.2a.ff, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) -<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.2a.ff)</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z<span class="fl">.2</span>a.ff <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.2</span>a.ff, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.2</span>a.ff)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png" width="672"></p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.2a.ff, <span class="dt">data =</span> <span class="ot">FALSE</span>)$bpar</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z<span class="fl">.2</span>a.ff, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</code></pre></div> <pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper -## Z0_0 97.01488 3.553146 27.3039 1.6793e-21 NA NA -## k_Z0 2.23601 0.216847 10.3114 3.6617e-11 NA NA +## Z0_0 97.01488 3.553145 27.3039 1.6793e-21 NA NA +## k_Z0 2.23601 0.216849 10.3114 3.6623e-11 NA NA ## k_Z1 0.48212 0.065854 7.3211 3.5520e-08 NA NA -## f_Z0_to_Z1 1.00000 0.101473 9.8548 9.7071e-11 NA NA</code></pre> +## f_Z0_to_Z1 1.00000 0.101473 9.8548 9.7068e-11 NA NA</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"><pre class="sourceCode r"><code class="sourceCode r">Z<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>), <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.3</span>, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.3</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.3</span>)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png" width="672"></p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z<span class="fl">.3</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)$bpar</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z<span class="fl">.3</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</code></pre></div> <pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper -## Z0_0 97.01488 2.681771 36.176 2.3636e-25 91.52152 102.508 -## k_Z0 2.23601 0.146862 15.225 2.2470e-15 1.95453 2.558 +## Z0_0 97.01488 2.681772 36.176 2.3636e-25 91.52152 102.508 +## k_Z0 2.23601 0.146861 15.225 2.2464e-15 1.95453 2.558 ## k_Z1 0.48212 0.042687 11.294 3.0686e-12 0.40216 0.578</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> @@ -159,7 +162,7 @@ FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../ref <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>), <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z<span class="fl">.5</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.5</span>, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z<span class="fl">.5</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z<span class="fl">.5</span>)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png" width="672"></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> @@ -169,25 +172,25 @@ FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../ref <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>), <span class="dt">use_of_ff =</span> <span class="st">"max"</span>)</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.FOCUS <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.FOCUS, FOCUS_2006_Z_mkin, - <span class="dt">parms.ini =</span> m.Z<span class="fl">.5</span>$bparms.ode, +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.FOCUS <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.FOCUS, FOCUS_<span class="dv">2006</span>_Z_mkin, + <span class="dt">parms.ini =</span> m.Z<span class="fl">.5</span><span class="op">$</span>bparms.ode, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</code></pre></div> <pre><code>## Warning in mkinfit(Z.FOCUS, FOCUS_2006_Z_mkin, parms.ini = m.Z.5$bparms.ode, : Optimisation by method Port did not converge. ## Convergence code is 1</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.FOCUS)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png" width="672"></p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.FOCUS, <span class="dt">data =</span> <span class="ot">FALSE</span>)$bpar</code></pre></div> -<pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper -## Z0_0 96.84024 2.058814 47.0369 5.5723e-44 92.706852 100.973637 -## k_Z0 2.21540 0.118128 18.7543 7.7369e-25 1.990504 2.465708 -## k_Z1 0.47836 0.029294 16.3298 3.3443e-22 0.423035 0.540918 -## k_Z2 0.45166 0.044186 10.2218 3.0364e-14 0.371065 0.549767 -## k_Z3 0.05869 0.014290 4.1072 7.2560e-05 0.035983 0.095725 -## f_Z2_to_Z3 0.47147 0.057027 8.2676 2.7790e-11 0.360295 0.585556</code></pre> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.FOCUS, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>bpar</code></pre></div> +<pre><code>## Estimate se_notrans t value Pr(>t) Lower Upper +## Z0_0 96.837112 2.058861 47.0343 5.5877e-44 92.703779 100.970445 +## k_Z0 2.215368 0.118098 18.7587 7.6563e-25 1.990525 2.465609 +## k_Z1 0.478302 0.029289 16.3302 3.3408e-22 0.422977 0.540864 +## k_Z2 0.451617 0.044214 10.2144 3.1133e-14 0.371034 0.549702 +## k_Z3 0.058693 0.014296 4.1056 7.2924e-05 0.035994 0.095705 +## f_Z2_to_Z3 0.471516 0.057057 8.2639 2.8156e-11 0.360381 0.585548</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.FOCUS)</code></pre></div> <pre><code>## $ff ## Z2_Z3 Z2_sink -## 0.47147 0.52853 +## 0.47152 0.52848 ## ## $SFORB ## logical(0) @@ -195,9 +198,9 @@ FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../ref ## $distimes ## DT50 DT90 ## Z0 0.31288 1.0394 -## Z1 1.44901 4.8135 -## Z2 1.53466 5.0980 -## Z3 11.81037 39.2332</code></pre> +## Z1 1.44918 4.8141 +## Z2 1.53481 5.0985 +## Z3 11.80973 39.2311</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"> @@ -210,17 +213,17 @@ FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../ref <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>), <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.1</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.1</span>, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.1</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.1</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.1</span>)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png" width="672"></p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.mkin<span class="fl">.1</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)$cov.unscaled</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">summary</span>(m.Z.mkin<span class="fl">.1</span>, <span class="dt">data =</span> <span class="ot">FALSE</span>)<span class="op">$</span>cov.unscaled</code></pre></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"><pre class="sourceCode r"><code class="sourceCode r">Z.mkin<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>(<span class="dt">Z0 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>, <span class="st">"Z1"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>), <span class="dt">Z1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z2"</span>, <span class="dt">sink =</span> <span class="ot">FALSE</span>), <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.3</span>, FOCUS_2006_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.3</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.3</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.3</span>)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png" width="672"></p> <p>This results in a much better representation of the behaviour of the parent compound Z0.</p> @@ -230,8 +233,8 @@ FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../ref <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>), <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.4</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.4</span>, FOCUS_2006_Z_mkin, - <span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.3</span>$bparms.ode, +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.4</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.4</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, + <span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.3</span><span class="op">$</span>bparms.ode, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.4</span>)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png" width="672"></p> @@ -241,36 +244,36 @@ FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../ref <span class="dt">Z2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"Z3"</span>), <span class="dt">Z3 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFORB"</span>))</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.5</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_2006_Z_mkin, - <span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.4</span>$bparms.ode[<span class="dv">1</span>:<span class="dv">4</span>], +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.5</span> <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, + <span class="dt">parms.ini =</span> m.Z.mkin<span class="fl">.4</span><span class="op">$</span>bparms.ode[<span class="dv">1</span><span class="op">:</span><span class="dv">4</span>], <span class="dt">quiet =</span> <span class="ot">TRUE</span>) <span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.5</span>)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png" width="672"></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"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin.5a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_2006_Z_mkin, - <span class="dt">parms.ini =</span> <span class="kw">c</span>(m.Z.mkin<span class="fl">.5</span>$bparms.ode[<span class="dv">1</span>:<span class="dv">7</span>], +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">m.Z.mkin<span class="fl">.5</span>a <-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(Z.mkin<span class="fl">.5</span>, FOCUS_<span class="dv">2006</span>_Z_mkin, + <span class="dt">parms.ini =</span> <span class="kw">c</span>(m.Z.mkin<span class="fl">.5</span><span class="op">$</span>bparms.ode[<span class="dv">1</span><span class="op">:</span><span class="dv">7</span>], <span class="dt">k_Z3_bound_free =</span> <span class="dv">0</span>), <span class="dt">fixed_parms =</span> <span class="st">"k_Z3_bound_free"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>) -<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin.5a)</code></pre></div> +<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(m.Z.mkin<span class="fl">.5</span>a)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png" width="672"></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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/mkinparplot.html">mkinparplot</a></span>(m.Z.mkin.5a)</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/mkinparplot.html">mkinparplot</a></span>(m.Z.mkin<span class="fl">.5</span>a)</code></pre></div> <p><img src="FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png" width="672"></p> <p>The endpoints obtained with this model are</p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.mkin.5a)</code></pre></div> +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/endpoints.html">endpoints</a></span>(m.Z.mkin<span class="fl">.5</span>a)</code></pre></div> <pre><code>## $ff ## Z0_free_Z1 Z1_Z2 Z2_sink Z2_Z3_free Z3_free_sink ## 1.00000 1.00000 0.46344 0.53656 1.00000 ## ## $SFORB ## Z0_b1 Z0_b2 Z3_b1 Z3_b2 -## 2.4471373 0.0075126 0.0800076 0.0000000 +## 2.4471382 0.0075127 0.0800075 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.265 NA NA +## Z0 0.3043 1.1848 0.28325 92.264 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.6635 Inf</code></pre> @@ -291,7 +294,8 @@ FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../ref <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <div id="tocnav"> - <h2>Contents</h2> + <h2 class="hasAnchor"> +<a href="#tocnav" class="anchor"></a>Contents</h2> <ul class="nav nav-pills nav-stacked"> <li><a href="#the-data">The data</a></li> <li><a href="#parent-and-one-metabolite">Parent and one metabolite</a></li> @@ -310,7 +314,7 @@ FOCUS_2006_Z_mkin <-<span class="st"> </span><span class="kw"><a href="../ref </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png Binary files differindex cb32b3c6..b66289d9 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_1-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png Binary files differindex 7ce8a39c..af26f416 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_10-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png Binary files differindex a7528057..d4e7a647 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png Binary files differindex 3fe80d42..8c6d81ef 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11a-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png Binary files differindex ff0dbbbd..fffb4892 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_11b-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png Binary files differindex dfe447ed..0ac5b6ce 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_2-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png Binary files differindex 8f7102aa..87226454 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_3-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png Binary files differindex 74a82e2b..58241d1d 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_5-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png Binary files differindex 7042e390..381e7df5 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_6-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png Binary files differindex 29824228..19e73f1c 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_7-1.png diff --git a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png Binary files differindex 79f1b87e..891d8d92 100644 --- a/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png +++ b/docs/articles/FOCUS_Z_files/figure-html/FOCUS_2006_Z_fits_9-1.png diff --git a/docs/articles/compiled_models.R b/docs/articles/compiled_models.R deleted file mode 100644 index c5b06c11..00000000 --- a/docs/articles/compiled_models.R +++ /dev/null @@ -1,55 +0,0 @@ -## ---- include = FALSE---------------------------------------------------- -library(knitr) -opts_chunk$set(tidy = FALSE, cache = FALSE) - -## ----check_gcc----------------------------------------------------------- -Sys.which("gcc") - -## ----create_SFO_SFO------------------------------------------------------ -library("mkin", quietly = TRUE) -SFO_SFO <- mkinmod( - parent = mkinsub("SFO", "m1"), - m1 = mkinsub("SFO")) - -## ----benchmark_SFO_SFO, fig.height = 3----------------------------------- -if (require(rbenchmark)) { - b.1 <- benchmark( - "deSolve, not compiled" = mkinfit(SFO_SFO, FOCUS_2006_D, - solution_type = "deSolve", - use_compiled = FALSE, quiet = TRUE), - "Eigenvalue based" = mkinfit(SFO_SFO, FOCUS_2006_D, - solution_type = "eigen", quiet = TRUE), - "deSolve, compiled" = mkinfit(SFO_SFO, FOCUS_2006_D, - solution_type = "deSolve", quiet = TRUE), - replications = 3) - print(b.1) - factor_SFO_SFO <- round(b.1["1", "relative"]) -} else { - factor_SFO_SFO <- NA - print("R package benchmark is not available") -} - -## ----benchmark_FOMC_SFO, fig.height = 3---------------------------------- -if (require(rbenchmark)) { - FOMC_SFO <- mkinmod( - parent = mkinsub("FOMC", "m1"), - m1 = mkinsub( "SFO")) - - b.2 <- benchmark( - "deSolve, not compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, - use_compiled = FALSE, quiet = TRUE), - "deSolve, compiled" = mkinfit(FOMC_SFO, FOCUS_2006_D, quiet = TRUE), - replications = 3) - print(b.2) - factor_FOMC_SFO <- round(b.2["1", "relative"]) -} else { - factor_FOMC_SFO <- NA - print("R package benchmark is not available") -} - -## ----sessionInfo, echo = FALSE------------------------------------------- -cat(capture.output(sessionInfo())[1:3], sep = "\n") -if(!inherits(try(cpuinfo <- readLines("/proc/cpuinfo")), "try-error")) { - cat(gsub("model name\t: ", "CPU model: ", cpuinfo[grep("model name", cpuinfo)[1]])) -} - diff --git a/docs/articles/compiled_models.html b/docs/articles/compiled_models.html index d5d29a1a..9f0b5708 100644 --- a/docs/articles/compiled_models.html +++ b/docs/articles/compiled_models.html @@ -8,8 +8,11 @@ <title>Performance benefit by using compiled model definitions in mkin • mkin</title> <!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> -<!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> -<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]> +<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><meta property="og:title" content="Performance benefit by using compiled model definitions in mkin"> +<meta property="og:description" content=""> +<meta name="twitter:card" content="summary"> +<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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]--> @@ -77,7 +80,7 @@ <h1>Performance benefit by using compiled model definitions in mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-01-16</h4> + <h4 class="date">2018-03-01</h4> </div> @@ -97,73 +100,66 @@ SFO_SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mki <span class="dt">m1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>))</code></pre></div> <pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> <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.</p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">if (<span class="kw">require</span>(rbenchmark)) { +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="cf">if</span> (<span class="kw">require</span>(rbenchmark)) { b<span class="fl">.1</span> <-<span class="st"> </span><span class="kw">benchmark</span>( - <span class="st">"deSolve, not compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D, + <span class="st">"deSolve, not compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_<span class="dv">2006</span>_D, <span class="dt">solution_type =</span> <span class="st">"deSolve"</span>, <span class="dt">use_compiled =</span> <span class="ot">FALSE</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>), - <span class="st">"Eigenvalue based"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D, + <span class="st">"Eigenvalue based"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_<span class="dv">2006</span>_D, <span class="dt">solution_type =</span> <span class="st">"eigen"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>), - <span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_2006_D, + <span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(SFO_SFO, FOCUS_<span class="dv">2006</span>_D, <span class="dt">solution_type =</span> <span class="st">"deSolve"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>), <span class="dt">replications =</span> <span class="dv">3</span>) <span class="kw">print</span>(b<span class="fl">.1</span>) factor_SFO_SFO <-<span class="st"> </span><span class="kw">round</span>(b<span class="fl">.1</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>]) -} else { +} <span class="cf">else</span> { factor_SFO_SFO <-<span class="st"> </span><span class="ot">NA</span> <span class="kw">print</span>(<span class="st">"R package benchmark is not available"</span>) }</code></pre></div> <pre><code>## Lade nötiges Paket: rbenchmark</code></pre> -<pre><code>## test replications elapsed relative user.self sys.self -## 3 deSolve, compiled 3 1.940 1.000 1.940 0 -## 1 deSolve, not compiled 3 13.865 7.147 13.864 0 -## 2 Eigenvalue based 3 2.427 1.251 2.428 0 -## user.child sys.child -## 3 0 0 -## 1 0 0 -## 2 0 0</code></pre> -<p>We see that using the compiled model is by a factor of around 7 faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs.</p> +<pre><code>## Warning in library(package, lib.loc = lib.loc, character.only = TRUE, +## logical.return = TRUE, : es gibt kein Paket namens 'rbenchmark'</code></pre> +<pre><code>## [1] "R package benchmark is not available"</code></pre> +<p>We see that using the compiled model is by a factor of around NA faster than using the R version with the default ode solver, and it is even faster than the Eigenvalue based solution implemented in R which does not need iterative solution of the ODEs.</p> </div> <div id="model-that-can-not-be-solved-with-eigenvalues" class="section level2"> <h2 class="hasAnchor"> <a href="#model-that-can-not-be-solved-with-eigenvalues" class="anchor"></a>Model that can not be solved with Eigenvalues</h2> <p>This evaluation is also taken from the example section of mkinfit.</p> -<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">if (<span class="kw">require</span>(rbenchmark)) { +<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="cf">if</span> (<span class="kw">require</span>(rbenchmark)) { FOMC_SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mkinmod.html">mkinmod</a></span>( <span class="dt">parent =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"FOMC"</span>, <span class="st">"m1"</span>), <span class="dt">m1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>( <span class="st">"SFO"</span>)) b<span class="fl">.2</span> <-<span class="st"> </span><span class="kw">benchmark</span>( - <span class="st">"deSolve, not compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(FOMC_SFO, FOCUS_2006_D, + <span class="st">"deSolve, not compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(FOMC_SFO, FOCUS_<span class="dv">2006</span>_D, <span class="dt">use_compiled =</span> <span class="ot">FALSE</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>), - <span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(FOMC_SFO, FOCUS_2006_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>), + <span class="st">"deSolve, compiled"</span> =<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(FOMC_SFO, FOCUS_<span class="dv">2006</span>_D, <span class="dt">quiet =</span> <span class="ot">TRUE</span>), <span class="dt">replications =</span> <span class="dv">3</span>) <span class="kw">print</span>(b<span class="fl">.2</span>) factor_FOMC_SFO <-<span class="st"> </span><span class="kw">round</span>(b<span class="fl">.2</span>[<span class="st">"1"</span>, <span class="st">"relative"</span>]) -} else { +} <span class="cf">else</span> { factor_FOMC_SFO <-<span class="st"> </span><span class="ot">NA</span> <span class="kw">print</span>(<span class="st">"R package benchmark is not available"</span>) }</code></pre></div> -<pre><code>## Successfully compiled differential equation model from auto-generated C code.</code></pre> -<pre><code>## test replications elapsed relative user.self sys.self -## 2 deSolve, compiled 3 3.432 1.000 3.428 0 -## 1 deSolve, not compiled 3 28.844 8.404 28.840 0 -## user.child sys.child -## 2 0 0 -## 1 0 0</code></pre> -<p>Here we get a performance benefit of a factor of 8 using the version of the differential equation model compiled from C code!</p> -<p>This vignette was built with mkin 0.9.47.1 on</p> +<pre><code>## Lade nötiges Paket: rbenchmark</code></pre> +<pre><code>## Warning in library(package, lib.loc = lib.loc, character.only = TRUE, +## logical.return = TRUE, : es gibt kein Paket namens 'rbenchmark'</code></pre> +<pre><code>## [1] "R package benchmark is not available"</code></pre> +<p>Here we get a performance benefit of a factor of NA using the version of the differential equation model compiled from C code!</p> +<p>This vignette was built with mkin 0.9.46.3 on</p> <pre><code>## R version 3.4.3 (2017-11-30) ## Platform: x86_64-pc-linux-gnu (64-bit) ## Running under: Debian GNU/Linux 9 (stretch)</code></pre> -<pre><code>## CPU model: Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz</code></pre> +<pre><code>## CPU model: AMD Ryzen 7 1700 Eight-Core Processor</code></pre> </div> </div> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <div id="tocnav"> - <h2>Contents</h2> + <h2 class="hasAnchor"> +<a href="#tocnav" class="anchor"></a>Contents</h2> <ul class="nav nav-pills nav-stacked"> <li><a href="#model-that-can-also-be-solved-with-eigenvalues">Model that can also be solved with Eigenvalues</a></li> <li><a href="#model-that-can-not-be-solved-with-eigenvalues">Model that can not be solved with Eigenvalues</a></li> @@ -179,7 +175,7 @@ SFO_SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mki </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png b/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png Binary files differdeleted file mode 100644 index dae2c9d4..00000000 --- a/docs/articles/compiled_models_files/figure-html/benchmark_FOMC_SFO-1.png +++ /dev/null diff --git a/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png b/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png Binary files differdeleted file mode 100644 index 696236dc..00000000 --- a/docs/articles/compiled_models_files/figure-html/benchmark_SFO_SFO-1.png +++ /dev/null diff --git a/docs/articles/header.tex b/docs/articles/header.tex deleted file mode 100644 index b8644ae2..00000000 --- a/docs/articles/header.tex +++ /dev/null @@ -1,22 +0,0 @@ -\usepackage{booktabs} -\usepackage{amsfonts} -\usepackage{latexsym} -\usepackage{amsmath} -\usepackage{amssymb} -\usepackage{graphicx} -\usepackage{parskip} -\usepackage[round]{natbib} -\usepackage{amstext} -\usepackage{hyperref} - -\newcommand{\Rpackage}[1]{{\normalfont\fontseries{b}\selectfont #1}} -\newcommand{\Robject}[1]{\texttt{#1}} -\newcommand{\Rclass}[1]{\textit{#1}} -\newcommand{\Rcmd}[1]{\texttt{#1}} - -\newcommand{\RR}{\textsf{R}} - -\RequirePackage[T1]{fontenc} -\RequirePackage{graphicx,ae,fancyvrb} -\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{} -\usepackage{relsize} diff --git a/docs/articles/index.html b/docs/articles/index.html index c1dc0b64..2b16580a 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -18,12 +18,16 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <script src="../pkgdown.js"></script> - + + +<meta property="og:title" content="Articles" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -123,7 +127,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/articles/mkin.R b/docs/articles/mkin.R deleted file mode 100644 index 19e80322..00000000 --- a/docs/articles/mkin.R +++ /dev/null @@ -1,34 +0,0 @@ -## ---- include = FALSE---------------------------------------------------- -require(knitr) -opts_chunk$set(engine='R', tidy=FALSE) - -## ---- echo = TRUE, cache = TRUE, fig = TRUE, fig.width = 8, fig.height = 7---- -library("mkin", quietly = TRUE) -# Define the kinetic model -m_SFO_SFO_SFO <- mkinmod(parent = mkinsub("SFO", "M1"), - M1 = mkinsub("SFO", "M2"), - M2 = mkinsub("SFO"), - use_of_ff = "max", quiet = TRUE) - - -# Produce model predictions using some arbitrary parameters -sampling_times = c(0, 1, 3, 7, 14, 28, 60, 90, 120) -d_SFO_SFO_SFO <- mkinpredict(m_SFO_SFO_SFO, - c(k_parent = 0.03, - f_parent_to_M1 = 0.5, k_M1 = log(2)/100, - f_M1_to_M2 = 0.9, k_M2 = log(2)/50), - c(parent = 100, M1 = 0, M2 = 0), - sampling_times) - -# Generate a dataset by adding normally distributed errors with -# standard deviation 3, for two replicates at each sampling time -d_SFO_SFO_SFO_err <- add_err(d_SFO_SFO_SFO, reps = 2, - sdfunc = function(x) 3, - n = 1, seed = 123456789 ) - -# Fit the model to the dataset -f_SFO_SFO_SFO <- mkinfit(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[1]], quiet = TRUE) - -# Plot the results separately for parent and metabolites -plot_sep(f_SFO_SFO_SFO, lpos = c("topright", "bottomright", "bottomright")) - diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html index b70918ab..a91da0a4 100644 --- a/docs/articles/mkin.html +++ b/docs/articles/mkin.html @@ -8,8 +8,11 @@ <title>Introduction to mkin • mkin</title> <!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> -<!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> -<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]> +<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><meta property="og:title" content="Introduction to mkin"> +<meta property="og:description" content=""> +<meta name="twitter:card" content="summary"> +<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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]--> @@ -77,7 +80,7 @@ <h1>Introduction to mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-01-16</h4> + <h4 class="date">2018-03-01</h4> </div> @@ -100,15 +103,15 @@ m_SFO_SFO_SFO <-<span class="st"> </span><span class="kw"><a href="../referen sampling_times =<span class="st"> </span><span class="kw">c</span>(<span class="dv">0</span>, <span class="dv">1</span>, <span class="dv">3</span>, <span class="dv">7</span>, <span class="dv">14</span>, <span class="dv">28</span>, <span class="dv">60</span>, <span class="dv">90</span>, <span class="dv">120</span>) d_SFO_SFO_SFO <-<span class="st"> </span><span class="kw"><a href="../reference/mkinpredict.html">mkinpredict</a></span>(m_SFO_SFO_SFO, <span class="kw">c</span>(<span class="dt">k_parent =</span> <span class="fl">0.03</span>, - <span class="dt">f_parent_to_M1 =</span> <span class="fl">0.5</span>, <span class="dt">k_M1 =</span> <span class="kw">log</span>(<span class="dv">2</span>)/<span class="dv">100</span>, - <span class="dt">f_M1_to_M2 =</span> <span class="fl">0.9</span>, <span class="dt">k_M2 =</span> <span class="kw">log</span>(<span class="dv">2</span>)/<span class="dv">50</span>), + <span class="dt">f_parent_to_M1 =</span> <span class="fl">0.5</span>, <span class="dt">k_M1 =</span> <span class="kw">log</span>(<span class="dv">2</span>)<span class="op">/</span><span class="dv">100</span>, + <span class="dt">f_M1_to_M2 =</span> <span class="fl">0.9</span>, <span class="dt">k_M2 =</span> <span class="kw">log</span>(<span class="dv">2</span>)<span class="op">/</span><span class="dv">50</span>), <span class="kw">c</span>(<span class="dt">parent =</span> <span class="dv">100</span>, <span class="dt">M1 =</span> <span class="dv">0</span>, <span class="dt">M2 =</span> <span class="dv">0</span>), sampling_times) <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> d_SFO_SFO_SFO_err <-<span class="st"> </span><span class="kw"><a href="../reference/add_err.html">add_err</a></span>(d_SFO_SFO_SFO, <span class="dt">reps =</span> <span class="dv">2</span>, - <span class="dt">sdfunc =</span> function(x) <span class="dv">3</span>, + <span class="dt">sdfunc =</span> <span class="cf">function</span>(x) <span class="dv">3</span>, <span class="dt">n =</span> <span class="dv">1</span>, <span class="dt">seed =</span> <span class="dv">123456789</span> ) <span class="co"># Fit the model to the dataset</span> @@ -208,7 +211,8 @@ f_SFO_SFO_SFO <-<span class="st"> </span><span class="kw"><a href="../referen <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <div id="tocnav"> - <h2>Contents</h2> + <h2 class="hasAnchor"> +<a href="#tocnav" class="anchor"></a>Contents</h2> <ul class="nav nav-pills nav-stacked"> <li><a href="#abstract">Abstract</a></li> <li> @@ -236,7 +240,7 @@ f_SFO_SFO_SFO <-<span class="st"> </span><span class="kw"><a href="../referen </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png Binary files differindex fafe8afd..5a3e3b6c 100644 --- a/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png +++ b/docs/articles/mkin_files/figure-html/unnamed-chunk-2-1.png diff --git a/docs/articles/twa.R b/docs/articles/twa.R deleted file mode 100644 index 8b137891..00000000 --- a/docs/articles/twa.R +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/articles/twa.html b/docs/articles/twa.html index 086c8593..400b1383 100644 --- a/docs/articles/twa.html +++ b/docs/articles/twa.html @@ -8,8 +8,11 @@ <title>Calculation of time weighted average concentrations with mkin • mkin</title> <!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> -<!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> -<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]> +<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script><script src="../pkgdown.js"></script><meta property="og:title" content="Calculation of time weighted average concentrations with mkin"> +<meta property="og:description" content=""> +<meta name="twitter:card" content="summary"> +<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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]--> @@ -77,7 +80,7 @@ <h1>Calculation of time weighted average concentrations with mkin</h1> <h4 class="author">Johannes Ranke</h4> - <h4 class="date">2018-01-16</h4> + <h4 class="date">2018-03-01</h4> </div> @@ -126,7 +129,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/authors.html b/docs/authors.html index 7f3918c8..7abb53de 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -18,12 +18,16 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="pkgdown.css" rel="stylesheet"> <script src="jquery.sticky-kit.min.js"></script> <script src="pkgdown.js"></script> - + + +<meta property="og:title" content="Authors" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -103,19 +107,19 @@ <ul class="list-unstyled"> <li> - <p><strong>Johannes Ranke</strong>. Author, maintainer, copyright holder. - <br /><small>0000-0003-4371-6538</small></p> + <p><strong>Johannes Ranke</strong>. Author, maintainer, copyright holder. <a href='https://orcid.org/0000-0003-4371-6538' target='orcid.widget'><img src='https://members.orcid.org/sites/default/files/vector_iD_icon.svg' class='orcid'></a> + </p> </li> <li> - <p><strong>Katrin Lindenberger</strong>. Contributor. + <p><strong>Katrin Lindenberger</strong>. Contributor. </p> </li> <li> - <p><strong>René Lehmann</strong>. Contributor. + <p><strong>René Lehmann</strong>. Contributor. </p> </li> <li> - <p><strong>Eurofins Regulatory AG</strong>. Copyright holder. + <p><strong>Eurofins Regulatory AG</strong>. Copyright holder. </p> </li> </ul> @@ -131,7 +135,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/index.html b/docs/index.html index 2f46d730..c20d124b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,8 +8,18 @@ <title>Kinetic Evaluation of Chemical Degradation Data • mkin</title> <!-- jquery --><script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script><!-- Bootstrap --><link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script><!-- Font Awesome icons --><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> -<!-- pkgdown --><link href="pkgdown.css" rel="stylesheet"> -<script src="jquery.sticky-kit.min.js"></script><script src="pkgdown.js"></script><!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><!--[if lt IE 9]> +<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet"> +<script src="jquery.sticky-kit.min.js"></script><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 and a choice of the optimisation methods made available by the 'FME' + package. If a C compiler (on windows: 'Rtools') is installed, differential + equation models are solved using compiled C functions. Please note that no + warranty is implied for correctness of results or fitness for a particular + purpose."> +<meta name="twitter:card" content="summary"> +<!-- mathjax --><script src="https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></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]--> @@ -159,8 +169,7 @@ <p>GPL</p> <h2>Developers</h2> <ul class="list-unstyled"> -<li>Johannes Ranke <br><small class="roles"> Author, maintainer, copyright holder </small> <br><small>(0000-0003-4371-6538)</small> -</li> +<li>Johannes Ranke <br><small class="roles"> Author, maintainer, copyright holder </small> <a href="https://orcid.org/0000-0003-4371-6538" target="orcid.widget"><img src="https://members.orcid.org/sites/default/files/vector_iD_icon.svg" class="orcid"></a> </li> <li><a href="authors.html">All authors...</a></li> </ul> <h2>Dev status</h2> @@ -176,7 +185,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/news/index.html b/docs/news/index.html index 64e4e9bc..dfb70875 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -18,12 +18,16 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <script src="../pkgdown.js"></script> - + + +<meta property="og:title" content="All news" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -629,7 +633,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/pkgdown.css b/docs/pkgdown.css index fd7b0ba4..181fe639 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -34,13 +34,14 @@ img.icon { float: right; } -/* Section anchors ---------------------------------*/ - -.hasAnchor { - margin-left: -30px; +img { + max-width: 100%; } +/* Section anchors ---------------------------------*/ + a.anchor { + margin-left: -30px; display:inline-block; width: 30px; height: 30px; @@ -56,6 +57,13 @@ 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 { @@ -63,6 +71,17 @@ a.anchor { margin-top: -60px; } +/* Static header placement on mobile devices */ +@media (max-width: 767px) { + .navbar-fixed-top { + position: absolute; + } + .navbar { + padding: 0; + } +} + + /* Sidebar --------------------------*/ #sidebar { @@ -81,33 +100,95 @@ a.anchor { margin-bottom: 0.5em; } +.orcid { + height: 16px; + vertical-align: middle; +} + +/* Reference index & topics ----------------------------------------------- */ + +.ref-index th {font-weight: normal;} +.ref-index h2 {font-size: 20px;} + +.ref-index td {vertical-align: top;} +.ref-index .alias {width: 40%;} +.ref-index .title {width: 60%;} + +.ref-index .alias {width: 40%;} +.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 ---------------------------------------------------- */ -code { - background-color: #f7f7f7; - color: #333; +pre { + word-wrap: normal; + word-break: normal; + border: 1px solid #eee; } -code a { - color: #375f84; + +pre, code { + background-color: #f8f8f8; + color: #333; } -.warning { color: red; } -.message { font-weight: bolder; } -.error { color: red; font-weight: bolder; } +pre code { + overflow: auto; + word-wrap: normal; + white-space: pre; +} -.fl,.number {color:rgb(21,20,181);} -.fu,.functioncall {color:#264D66 ;} -.ch,.st,.string {color:#375D81 ;} -.kw,.keyword {color:black;} -.argument {color:#264D66 ;} -.co,.comment {color: #777;} -.formalargs {color: #264D66;} -.eqformalargs {color:#264D66;} -.slot {font-style:italic;} -.symbol {color:black ;} -.prompt {color:black ;} +pre .img { + margin: 5px 0; +} -pre img { +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; } diff --git a/docs/pkgdown.js b/docs/pkgdown.js index c8b38c49..64b20df4 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -1,8 +1,94 @@ $(function() { - $("#sidebar").stick_in_parent({offset_top: 40}); + + $("#sidebar") + .stick_in_parent({offset_top: 40}) + .on('sticky_kit:bottom', function(e) { + $(this).parent().css('position', 'static'); + }) + .on('sticky_kit:unbottom', function(e) { + $(this).parent().css('position', 'relative'); + }); + $('body').scrollspy({ target: '#sidebar', offset: 60 }); + var cur_path = paths(location.pathname); + $("#navbar ul li a").each(function(index, value) { + if (value.text == "Home") + return; + if (value.getAttribute("href") === "#") + return; + + var path = paths(value.pathname); + if (is_prefix(cur_path, path)) { + // Add class to parent <li>, and enclosing <li> if in dropdown + var menu_anchor = $(value); + 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); +} + +function is_prefix(needle, haystack) { + if (needle.length > haystack.lengh) + return(false); + + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(false); + } + + return(true); +} + +/* 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(Clipboard.isSupported()) { + $(document).ready(function() { + var copyButton = "<button type='button' class='btn btn-primary btn-copy-ex' type = 'submit' title='Copy to clipboard' aria-hidden='true' data-toggle='tooltip' data-placement='left auto' data-trigger='hover' data-clipboard-copy><i class='fa fa-copy' aria-hidden='true'></i></button>"; + + $(".examples").addClass("hasCopyButton"); + + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); + + // Initialize tooltips: + $('.btn-copy-ex').tooltip({container: 'body'}); + + // Initialize clipboard: + var clipboardBtnCopies = new Clipboard('[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'); + }); + }); +} + diff --git a/docs/reference/DFOP.solution-1.png b/docs/reference/DFOP.solution-1.png Binary files differnew file mode 100644 index 00000000..1549a73b --- /dev/null +++ b/docs/reference/DFOP.solution-1.png diff --git a/docs/reference/DFOP.solution-2.png b/docs/reference/DFOP.solution-2.png Binary files differdeleted file mode 100644 index 0902b9df..00000000 --- a/docs/reference/DFOP.solution-2.png +++ /dev/null diff --git a/docs/reference/DFOP.solution.html b/docs/reference/DFOP.solution.html index 30b9d057..ff1ad823 100644 --- a/docs/reference/DFOP.solution.html +++ b/docs/reference/DFOP.solution.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +78,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +94,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -146,11 +152,11 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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'>plot</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'>c</span>(<span class='fl'>0</span>,<span class='fl'>100</span>))</div><img src='DFOP.solution-2.png' alt='' width='540' height='400' /></pre> + <pre class="examples"><div class='input'> <span class='fu'>plot</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'>c</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='432.632880098887' /></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -173,7 +179,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/Extract.mmkin.html b/docs/reference/Extract.mmkin.html index 5d4eca29..11738484 100644 --- a/docs/reference/Extract.mmkin.html +++ b/docs/reference/Extract.mmkin.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +77,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -147,16 +152,16 @@ <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'>#> dataset #> model B C -#> FOMC List,42 List,42 +#> FOMC List,45 List,45 #> attr(,"class") #> [1] "mmkin"</div><div class='input'> <span class='no'>fits</span>[, <span class='st'>"B"</span>]</div><div class='output co'>#> dataset #> model B -#> SFO List,42 -#> FOMC List,42 +#> SFO List,45 +#> FOMC List,45 #> attr(,"class") #> [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'>#> dataset #> model B -#> SFO List,42 +#> SFO List,45 #> attr(,"class") #> [1] "mmkin"</div><div class='input'> <span class='fu'>head</span>( @@ -164,7 +169,7 @@ <span class='no'>fits</span><span class='kw'>[[</span><span class='st'>"FOMC"</span>, <span class='st'>"B"</span>]] )</div><div class='output co'>#> $par #> parent_0 log_alpha log_beta -#> 99.666192 2.549849 5.050586 +#> 99.666193 2.549849 5.050586 #> #> $ssr #> [1] 28.58291 @@ -180,7 +185,7 @@ #> 25 78 #> #> $counts -#> [1] "both X-convergence and relative convergence (5)" +#> [1] "relative convergence (4)" #> </div><div class='input'> <span class='fu'>head</span>( <span class='co'># The same can be achieved by</span> @@ -258,7 +263,7 @@ #> #> $time #> user system elapsed -#> 0.064 0.000 0.063 +#> 0.058 0.000 0.057 #> #> $mkinmod #> <mkinmod> model generated with @@ -398,7 +403,7 @@ #> { #> assign("calls", calls + 1, inherits = TRUE) #> if (trace_parms) -#> cat(P, "\\n") +#> cat(P, "\n") #> if (length(state.ini.optim) > 0) { #> odeini <- c(P[1:length(state.ini.optim)], state.ini.fixed) #> names(odeini) <- c(state.ini.optim.boxnames, state.ini.fixed.boxnames) @@ -420,7 +425,7 @@ #> if (mC$model < cost.old) { #> if (!quiet) #> cat("Model cost at call ", calls, ": ", mC$model, -#> "\\n") +#> "\n") #> if (plot) { #> outtimes_plot = seq(min(observed$time), max(observed$time), #> length.out = 100) @@ -447,8 +452,8 @@ #> } #> return(mC) #> } -#> <bytecode: 0x560110508c60> -#> <environment: 0x56010f8d8c30> +#> <bytecode: 0x55555ad80908> +#> <environment: 0x55555b1b4b90> #> #> $cost_notrans #> function (P) @@ -470,8 +475,8 @@ #> scaleVar = scaleVar) #> return(mC) #> } -#> <bytecode: 0x56010fede550> -#> <environment: 0x56010f8d8c30> +#> <bytecode: 0x55555b174428> +#> <environment: 0x55555b1b4b90> #> #> $hessian_notrans #> parent_0 k_parent_sink @@ -512,6 +517,10 @@ #> $weight.ini #> [1] "none" #> +#> $tc.ini +#> sigma_low rsd_high +#> 0.50 0.07 +#> #> $reweight.tol #> [1] 1e-08 #> @@ -534,7 +543,13 @@ #> 99.17407 #> #> $date -#> [1] "Sat Jul 29 15:14:04 2017" +#> [1] "Thu Mar 1 14:26:09 2018" +#> +#> $version +#> [1] "0.9.47.1" +#> +#> $Rversion +#> [1] "3.4.3" #> #> attr(,"class") #> [1] "mkinfit" "modFit" @@ -563,7 +578,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html b/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html index d79aaff6..5fb3ccfe 100644 --- a/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html +++ b/docs/reference/FOCUS_2006_DFOP_ref_A_to_B.html @@ -18,12 +18,23 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +81,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +97,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -132,7 +141,7 @@ in this fit.</p> Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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> @@ -158,7 +167,7 @@ in this fit.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html b/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html index e0da5a8d..c1665dee 100644 --- a/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_FOMC_ref_A_to_F.html @@ -18,12 +18,23 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +81,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +97,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -131,7 +140,7 @@ in this fit.</p> Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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> @@ -157,7 +166,7 @@ in this fit.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/FOCUS_2006_HS_ref_A_to_F.html b/docs/reference/FOCUS_2006_HS_ref_A_to_F.html index 720073f2..db3d228d 100644 --- a/docs/reference/FOCUS_2006_HS_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_HS_ref_A_to_F.html @@ -18,12 +18,23 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +81,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +97,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -132,7 +141,7 @@ in this fit.</p> Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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> @@ -158,7 +167,7 @@ in this fit.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html b/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html index b12abf8c..cc4fcb1d 100644 --- a/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html +++ b/docs/reference/FOCUS_2006_SFO_ref_A_to_F.html @@ -18,12 +18,23 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +81,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +97,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -130,7 +139,7 @@ in this fit.</p> Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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> @@ -156,7 +165,7 @@ in this fit.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/FOCUS_2006_datasets.html b/docs/reference/FOCUS_2006_datasets.html index 65bc572a..4548c983 100644 --- a/docs/reference/FOCUS_2006_datasets.html +++ b/docs/reference/FOCUS_2006_datasets.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +77,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -123,7 +128,7 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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> @@ -158,7 +163,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/FOMC.solution-1.png b/docs/reference/FOMC.solution-1.png Binary files differnew file mode 100644 index 00000000..58178df5 --- /dev/null +++ b/docs/reference/FOMC.solution-1.png diff --git a/docs/reference/FOMC.solution-2.png b/docs/reference/FOMC.solution-2.png Binary files differdeleted file mode 100644 index a673bc0e..00000000 --- a/docs/reference/FOMC.solution-2.png +++ /dev/null diff --git a/docs/reference/FOMC.solution.html b/docs/reference/FOMC.solution.html index 9af30b7a..810b0eba 100644 --- a/docs/reference/FOMC.solution.html +++ b/docs/reference/FOMC.solution.html @@ -18,12 +18,23 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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. +The form given here differs slightly from the original reference by Gustafson + and Holden (1990). The parameter beta corresponds to 1/beta in the + original equation." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +81,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +97,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -152,14 +161,14 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'> <span class='fu'>plot</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'>c</span>(<span class='fl'>0</span>, <span class='fl'>100</span>))</div><img src='FOMC.solution-2.png' alt='' width='540' height='400' /></pre> + <pre class="examples"><div class='input'> <span class='fu'>plot</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'>c</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='432.632880098887' /></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -184,7 +193,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/HS.solution-1.png b/docs/reference/HS.solution-1.png Binary files differnew file mode 100644 index 00000000..e259134e --- /dev/null +++ b/docs/reference/HS.solution-1.png diff --git a/docs/reference/HS.solution-2.png b/docs/reference/HS.solution-2.png Binary files differdeleted file mode 100644 index 2e516447..00000000 --- a/docs/reference/HS.solution-2.png +++ /dev/null diff --git a/docs/reference/HS.solution.html b/docs/reference/HS.solution.html index 8f6bbbe2..79358efb 100644 --- a/docs/reference/HS.solution.html +++ b/docs/reference/HS.solution.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +78,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +94,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -147,11 +153,11 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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'>plot</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'>c</span>(<span class='fl'>0</span>,<span class='fl'>100</span>))</div><img src='HS.solution-2.png' alt='' width='540' height='400' /></pre> + <pre class="examples"><div class='input'> <span class='fu'>plot</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'>c</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='432.632880098887' /></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -174,7 +180,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/IORE.solution-1.png b/docs/reference/IORE.solution-1.png Binary files differnew file mode 100644 index 00000000..674c25d3 --- /dev/null +++ b/docs/reference/IORE.solution-1.png diff --git a/docs/reference/IORE.solution-2.png b/docs/reference/IORE.solution-2.png Binary files differdeleted file mode 100644 index a83d49c7..00000000 --- a/docs/reference/IORE.solution-2.png +++ /dev/null diff --git a/docs/reference/IORE.solution.html b/docs/reference/IORE.solution.html index 45e090c0..f705ab2f 100644 --- a/docs/reference/IORE.solution.html +++ b/docs/reference/IORE.solution.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +94,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -154,7 +157,7 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='fu'>plot</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'>c</span>(<span class='fl'>0</span>, <span class='fl'>100</span>))</div><img src='IORE.solution-2.png' alt='' width='540' height='400' /><div class='input'> <span class='no'>fit.fomc</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) + <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='fu'>c</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='432.632880098887' /></div><div class='input'> <span class='no'>fit.fomc</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='no'>fit.iore</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"IORE"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='no'>fit.iore.deS</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='st'>"IORE"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) @@ -191,7 +194,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/SFO.solution-2.png b/docs/reference/SFO.solution-2.png Binary files differdeleted file mode 100644 index 9626091f..00000000 --- a/docs/reference/SFO.solution-2.png +++ /dev/null diff --git a/docs/reference/SFO.solution.html b/docs/reference/SFO.solution.html index ef9b8eb7..a7934a35 100644 --- a/docs/reference/SFO.solution.html +++ b/docs/reference/SFO.solution.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +77,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -136,11 +141,13 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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'>plot</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><img src='SFO.solution-2.png' alt='' width='540' height='400' /></pre> + <pre class="examples"><div class='input'> </div><span class='co'># NOT RUN {</span> +<span class='fu'>plot</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>) +<span class='co'># }</span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -163,7 +170,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/SFORB.solution-2.png b/docs/reference/SFORB.solution-2.png Binary files differdeleted file mode 100644 index 63a50bf9..00000000 --- a/docs/reference/SFORB.solution-2.png +++ /dev/null diff --git a/docs/reference/SFORB.solution.html b/docs/reference/SFORB.solution.html index ebe67733..aaae7cdd 100644 --- a/docs/reference/SFORB.solution.html +++ b/docs/reference/SFORB.solution.html @@ -18,12 +18,23 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +81,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +97,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -149,11 +158,13 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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'>plot</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><img src='SFORB.solution-2.png' alt='' width='540' height='400' /></pre> + <pre class="examples"><div class='input'> </div><span class='co'># NOT RUN {</span> +<span class='fu'>plot</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>) +<span class='co'># }</span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -176,7 +187,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/add_err-1.png b/docs/reference/add_err-1.png Binary files differnew file mode 100644 index 00000000..4f9b1534 --- /dev/null +++ b/docs/reference/add_err-1.png diff --git a/docs/reference/add_err-2.png b/docs/reference/add_err-2.png Binary files differnew file mode 100644 index 00000000..8fcf4625 --- /dev/null +++ b/docs/reference/add_err-2.png diff --git a/docs/reference/add_err-3.png b/docs/reference/add_err-3.png Binary files differnew file mode 100644 index 00000000..e44839a6 --- /dev/null +++ b/docs/reference/add_err-3.png diff --git a/docs/reference/add_err-4.png b/docs/reference/add_err-4.png Binary files differdeleted file mode 100644 index 8bbd1758..00000000 --- a/docs/reference/add_err-4.png +++ /dev/null diff --git a/docs/reference/add_err-6.png b/docs/reference/add_err-6.png Binary files differdeleted file mode 100644 index 2a4fe33f..00000000 --- a/docs/reference/add_err-6.png +++ /dev/null diff --git a/docs/reference/add_err-8.png b/docs/reference/add_err-8.png Binary files differdeleted file mode 100644 index 49c4a5f0..00000000 --- a/docs/reference/add_err-8.png +++ /dev/null diff --git a/docs/reference/add_err.html b/docs/reference/add_err.html index d56a8728..42bec993 100644 --- a/docs/reference/add_err.html +++ b/docs/reference/add_err.html @@ -18,12 +18,21 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -195,14 +204,14 @@ <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='kw'>method.modFit</span> <span class='kw'>=</span> <span class='st'>"Marq"</span>) -<span class='fu'>plot</span>(<span class='no'>f_SFO_SFO</span>)</div><img src='add_err-4.png' alt='' width='540' height='400' /><div class='input'> +<span class='fu'>plot</span>(<span class='no'>f_SFO_SFO</span>)</div><div class='img'><img src='add_err-1.png' alt='' width='700' height='432.632880098887' /></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'>plot</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><img src='add_err-6.png' alt='' width='540' height='400' /><div class='input'> +<span class='fu'>plot</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='432.632880098887' /></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'>plot</span>(<span class='no'>f_SFO_SFO</span>[<span class='fl'>1</span>, <span class='fl'>3</span>])</div><img src='add_err-8.png' alt='' width='540' height='400' /><div class='input'> +<span class='fu'>plot</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='432.632880098887' /></div><div class='input'> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> @@ -230,7 +239,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/endpoints.html b/docs/reference/endpoints.html index ed235a47..c45a0b7c 100644 --- a/docs/reference/endpoints.html +++ b/docs/reference/endpoints.html @@ -18,12 +18,22 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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 constantes of the DFOP model, but +with the advantage that the SFORB model can also be used for metabolites." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +96,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -171,7 +176,7 @@ with the advantage that the SFORB model can also be used for metabolites.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/geometric_mean.html b/docs/reference/geometric_mean.html index 4af50f48..2d46b4de 100644 --- a/docs/reference/geometric_mean.html +++ b/docs/reference/geometric_mean.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <script src="../pkgdown.js"></script> + + +<meta property="og:title" content="Calculate the geometric mean — geometric_mean" /> +<meta property="og:description" content="Function calculating the geometric mean of numeric vectors" /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -152,7 +154,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/ilr.html b/docs/reference/ilr.html index 6c3979c5..2c51001f 100644 --- a/docs/reference/ilr.html +++ b/docs/reference/ilr.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -176,7 +178,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/index.html b/docs/reference/index.html index 4675748c..218194ad 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -18,12 +18,16 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <script src="../pkgdown.js"></script> - + + +<meta property="og:title" content="Function reference" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -442,7 +446,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/max_twa_parent.html b/docs/reference/max_twa_parent.html index 0e99e579..5d6baf6a 100644 --- a/docs/reference/max_twa_parent.html +++ b/docs/reference/max_twa_parent.html @@ -18,12 +18,23 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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 and DFOP models, +using the analytical formulas given in the PEC soil section of the FOCUS +guidance." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +97,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -139,7 +145,7 @@ guidance.</p> Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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> @@ -172,7 +178,7 @@ guidance.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mccall81_245T.html b/docs/reference/mccall81_245T.html index 0111deb3..ec7f8ccd 100644 --- a/docs/reference/mccall81_245T.html +++ b/docs/reference/mccall81_245T.html @@ -18,12 +18,21 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +79,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +95,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -127,108 +134,25 @@ <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 labeled 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> + <a href='http://dx.doi.org/10.1021/jf00103a026'>http://dx.doi.org/10.1021/jf00103a026</a></p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='no'>SFO_SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>T245</span> <span class='kw'>=</span> <span class='fu'>list</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'>list</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'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> </div><span class='co'># NOT RUN {</span> <span class='no'>fit.1</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'>subset</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>) - <span class='fu'>summary</span>(<span class='no'>fit.1</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version: 0.9.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:14 2017 -#> Date of summary: Sat Jul 29 15:14:14 2017 -#> -#> Equations: -#> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 -#> d_phenol/dt = + k_T245_phenol * T245 - k_phenol_sink * phenol - -#> k_phenol_anisole * phenol -#> d_anisole/dt = + k_phenol_anisole * phenol - k_anisole_sink * anisole -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 612 model solutions performed in 3.558 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> T245_0 100.9000 state -#> k_T245_sink 0.1000 deparm -#> k_T245_phenol 0.1001 deparm -#> k_phenol_sink 0.1002 deparm -#> k_phenol_anisole 0.1003 deparm -#> k_anisole_sink 0.1004 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> T245_0 100.900000 -Inf Inf -#> log_k_T245_sink -2.302585 -Inf Inf -#> log_k_T245_phenol -2.301586 -Inf Inf -#> log_k_phenol_sink -2.300587 -Inf Inf -#> log_k_phenol_anisole -2.299590 -Inf Inf -#> log_k_anisole_sink -2.298593 -Inf Inf -#> -#> Fixed parameter values: -#> value type -#> phenol_0 0 state -#> anisole_0 0 state -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> T245_0 103.9000 NA NA NA -#> log_k_T245_sink -4.1130 NA NA NA -#> log_k_T245_phenol -3.6120 NA NA NA -#> log_k_phenol_sink -26.8400 NA NA NA -#> log_k_phenol_anisole -0.9037 NA NA NA -#> log_k_anisole_sink -5.0090 NA NA NA -#> -#> Parameter correlation:</div><div class='output co'>#> <span class='warning'>Warning: Could not estimate covariance matrix; singular system:</span></div><div class='output co'>#> Could not estimate covariance matrix; singular system: -#> -#> Residual standard error: 2.78 on 18 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> T245_0 1.039e+02 4.282e+01 7.236e-20 NA NA -#> k_T245_sink 1.636e-02 8.901e-01 1.926e-01 NA NA -#> k_T245_phenol 2.701e-02 1.504e+00 7.499e-02 NA NA -#> k_phenol_sink 2.212e-12 7.870e-12 5.000e-01 NA NA -#> k_phenol_anisole 4.051e-01 2.518e+00 1.075e-02 NA NA -#> k_anisole_sink 6.679e-03 8.146e+00 9.469e-08 NA NA -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 10.070 6 16 -#> T245 7.908 3 5 -#> phenol 106.445 2 5 -#> anisole 5.379 1 6 -#> -#> Resulting formation fractions: -#> ff -#> T245_sink 3.772e-01 -#> T245_phenol 6.228e-01 -#> phenol_sink 5.462e-12 -#> phenol_anisole 1.000e+00 -#> anisole_sink 1.000e+00 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> T245 15.982 53.091 -#> phenol 1.711 5.685 -#> anisole 103.784 344.763</div><div class='input'> - <span class='co'># No convergence, no covariance matrix ...</span> + <span class='fu'>summary</span>(<span class='no'>fit.1</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) + +<span class='co'># }</span><div class='input'> <span class='co'># No convergence, no covariance matrix ...</span> <span class='co'># k_phenol_sink is really small, therefore fix it to zero</span> <span class='no'>fit.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO_SFO</span>, <span class='fu'>subset</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'>c</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>) - <span class='fu'>summary</span>(<span class='no'>fit.2</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version: 0.9.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:14:15 2017 -#> Date of summary: Sat Jul 29 15:14:15 2017 + <span class='fu'>summary</span>(<span class='no'>fit.2</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.47.1 +#> R version used for fitting: 3.4.3 +#> Date of fit: Thu Mar 1 14:26:15 2018 +#> Date of summary: Thu Mar 1 14:26:15 2018 #> #> Equations: #> d_T245/dt = - k_T245_sink * T245 - k_T245_phenol * T245 @@ -238,7 +162,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 246 model solutions performed in 1.431 s +#> Fitted with method Port using 246 model solutions performed in 1.359 s #> #> Weighting: none #> @@ -340,7 +264,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkin_long_to_wide.html b/docs/reference/mkin_long_to_wide.html index 042bdced..a5432dac 100644 --- a/docs/reference/mkin_long_to_wide.html +++ b/docs/reference/mkin_long_to_wide.html @@ -18,12 +18,21 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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 as required by modCost + and converts it into a dataframe with one independent variable and several + dependent variables as columns." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +95,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -186,7 +190,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkin_wide_to_long.html b/docs/reference/mkin_wide_to_long.html index ddf28dd9..6798efa6 100644 --- a/docs/reference/mkin_wide_to_long.html +++ b/docs/reference/mkin_wide_to_long.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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 modCost." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +94,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -165,7 +168,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinds.html b/docs/reference/mkinds.html index 2d8d64a5..ab06e903 100644 --- a/docs/reference/mkinds.html +++ b/docs/reference/mkinds.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <script src="../pkgdown.js"></script> + + +<meta property="og:title" content="A dataset class for mkin — mkinds" /> +<meta property="og:description" content="A dataset class for mkin" /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -154,7 +156,7 @@ in order to be compatible with mkinfit</p></dd> </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinerrmin.html b/docs/reference/mkinerrmin.html index 67b7a35e..496cce15 100644 --- a/docs/reference/mkinerrmin.html +++ b/docs/reference/mkinerrmin.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +78,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +94,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -146,7 +152,7 @@ chi-squared test as defined in the FOCUS kinetics report from 2006.</p> Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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> @@ -186,7 +192,7 @@ chi-squared test as defined in the FOCUS kinetics report from 2006.</p> </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinfit.html b/docs/reference/mkinfit.html index 0102aecb..4fb5ef9a 100644 --- a/docs/reference/mkinfit.html +++ b/docs/reference/mkinfit.html @@ -18,12 +18,29 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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 uses the Flexible Modelling Environment package + FME to create a function calculating the model cost, i.e. the + deviation between the kinetic model and the observed data. This model cost is + then minimised using the Port algorithm nlminb, + using the specified initial or fixed parameters and starting values. + Per default, parameters in the kinetic models are internally transformed in order + to better satisfy the assumption of a normal distribution of their estimators. + In each step of the optimsation, the kinetic model is solved using the + function mkinpredict. The variance of the residuals for each + observed variable can optionally be iteratively reweighted until convergence + using the argument reweight.method = "obs"." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -395,17 +412,17 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'><span class='co'># Use shorthand notation for parent only degradation</span> <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='st'>"FOMC"</span>, <span class='no'>FOCUS_2006_C</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version: 0.9.47.1 -#> R version: 3.4.3 -#> Date of fit: Tue Jan 30 10:05:48 2018 -#> Date of summary: Tue Jan 30 10:05:48 2018 +<span class='fu'>summary</span>(<span class='no'>fit</span>)</div><div class='output co'>#> mkin version used for fitting: 0.9.47.1 +#> R version used for fitting: 3.4.3 +#> Date of fit: Thu Mar 1 14:26:18 2018 +#> Date of summary: Thu Mar 1 14:26:18 2018 #> #> Equations: #> d_parent/dt = - (alpha/beta) * 1/((time/beta) + 1) * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 64 model solutions performed in 0.31 s +#> Fitted with method Port using 64 model solutions performed in 0.135 s #> #> Weighting: none #> @@ -474,7 +491,7 @@ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> <span class='fu'>print</span>(<span class='fu'>system.time</span>(<span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)))</div><div class='output co'>#> user system elapsed -#> 1.196 0.000 1.195 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink +#> 0.84 0.00 0.84 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 99.59848 -3.03822 -2.98030 -5.24750 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff #> parent_sink parent_m1 m1_sink #> 0.485524 0.514476 1.000000 @@ -486,92 +503,19 @@ #> DT50 DT90 #> parent 7.022929 23.32967 #> m1 131.760712 437.69961 -#> </div><div class='input'> +#> </div><span class='co'># NOT RUN {</span> <span class='co'># deSolve is slower when no C compiler (gcc) was available during model generation</span> <span class='fu'>print</span>(<span class='fu'>system.time</span>(<span class='no'>fit.deSolve</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, - <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)))</div><div class='output co'>#> Model cost at call 1 : 18915.53 -#> Model cost at call 2 : 18915.53 -#> Model cost at call 6 : 11424.02 -#> Model cost at call 10 : 11424 -#> Model cost at call 12 : 4094.396 -#> Model cost at call 16 : 4094.396 -#> Model cost at call 19 : 1340.595 -#> Model cost at call 20 : 1340.593 -#> Model cost at call 25 : 1072.239 -#> Model cost at call 28 : 1072.236 -#> Model cost at call 30 : 874.2614 -#> Model cost at call 33 : 874.2611 -#> Model cost at call 35 : 616.2379 -#> Model cost at call 37 : 616.2374 -#> Model cost at call 40 : 467.4387 -#> Model cost at call 42 : 467.4382 -#> Model cost at call 46 : 398.2913 -#> Model cost at call 48 : 398.2912 -#> Model cost at call 49 : 398.2911 -#> Model cost at call 51 : 395.0711 -#> Model cost at call 54 : 395.071 -#> Model cost at call 56 : 378.3298 -#> Model cost at call 59 : 378.3298 -#> Model cost at call 62 : 376.9812 -#> Model cost at call 64 : 376.9811 -#> Model cost at call 67 : 375.2085 -#> Model cost at call 69 : 375.2085 -#> Model cost at call 70 : 375.2085 -#> Model cost at call 71 : 375.2085 -#> Model cost at call 72 : 374.5723 -#> Model cost at call 74 : 374.5723 -#> Model cost at call 77 : 374.0075 -#> Model cost at call 79 : 374.0075 -#> Model cost at call 80 : 374.0075 -#> Model cost at call 82 : 373.1711 -#> Model cost at call 84 : 373.1711 -#> Model cost at call 87 : 372.6445 -#> Model cost at call 88 : 372.1614 -#> Model cost at call 90 : 372.1614 -#> Model cost at call 91 : 372.1614 -#> Model cost at call 94 : 371.6464 -#> Model cost at call 99 : 371.4299 -#> Model cost at call 101 : 371.4299 -#> Model cost at call 104 : 371.4071 -#> Model cost at call 106 : 371.4071 -#> Model cost at call 107 : 371.4071 -#> Model cost at call 109 : 371.2524 -#> Model cost at call 113 : 371.2524 -#> Model cost at call 114 : 371.2136 -#> Model cost at call 115 : 371.2136 -#> Model cost at call 116 : 371.2136 -#> Model cost at call 119 : 371.2134 -#> Model cost at call 120 : 371.2134 -#> Model cost at call 122 : 371.2134 -#> Model cost at call 123 : 371.2134 -#> Model cost at call 125 : 371.2134 -#> Model cost at call 126 : 371.2134 -#> Model cost at call 135 : 371.2134 -#> Model cost at call 147 : 371.2134 -#> Model cost at call 151 : 371.2134 -#> Model cost at call 152 : 371.2134 -#> Model cost at call 153 : 371.2134 -#> Optimisation by method Port successfully terminated. -#> user system elapsed -#> 1.008 0.000 1.006 </div><div class='input'><span class='fu'>coef</span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink -#> 99.59848 -3.03822 -2.98030 -5.24750 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>)</div><div class='output co'>#> $ff -#> parent_sink parent_m1 m1_sink -#> 0.485524 0.514476 1.000000 -#> -#> $SFORB -#> logical(0) -#> -#> $distimes -#> DT50 DT90 -#> parent 7.022929 23.32967 -#> m1 131.760712 437.69961 -#> </div><div class='input'> - -<span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, FOMC</span> - + <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>))) +<span class='fu'>coef</span>(<span class='no'>fit.deSolve</span>) +<span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit.deSolve</span>) +<span class='co'># }</span><div class='input'> +# Use stepwise fitting, using optimised parameters from parent only fit, FOMC +</div><span class='co'># NOT RUN {</span> <span class='no'>FOMC_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> + <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)) +<span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> <span class='no'>fit.FOMC_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>FOMC_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <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>) @@ -581,739 +525,40 @@ <span class='co'># Use stepwise fitting, using optimised parameters from parent only fit, SFORB</span> <span class='no'>SFORB_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</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'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> + <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>)) +<span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> <span class='no'>fit.SFORB_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='no'>fit.SFORB_SFO.deSolve</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='co'># Use starting parameters from parent only SFORB fit (not really needed in this case)</span> <span class='no'>fit.SFORB</span> <span class='kw'>=</span> <span class='fu'>mkinfit</span>(<span class='st'>"SFORB"</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='no'>fit.SFORB_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFORB_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>parms.ini</span> <span class='kw'>=</span> <span class='no'>fit.SFORB</span>$<span class='no'>bparms.ode</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - - - +<span class='co'># }</span><div class='input'> +</div><span class='co'># NOT RUN {</span> <span class='co'># Weighted fits, including IRLS</span> <span class='no'>SFO_SFO.ff</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>f.noweight</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.noweight</span>)</div><div class='output co'>#> mkin version: 0.9.47.1 -#> R version: 3.4.3 -#> Date of fit: Tue Jan 30 10:06:00 2018 -#> Date of summary: Tue Jan 30 10:06:00 2018 -#> -#> 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 deSolve -#> -#> Fitted with method Port using 185 model solutions performed in 0.739 s -#> -#> Weighting: none -#> -#> 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 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.60000 1.61400 96.3300 102.9000 -#> log_k_parent -2.31600 0.04187 -2.4010 -2.2310 -#> log_k_m1 -5.24800 0.13610 -5.5230 -4.9720 -#> f_parent_ilr_1 0.04096 0.06477 -0.0904 0.1723 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5178 -0.1701 -0.5489 -#> log_k_parent 0.5178 1.0000 -0.3285 -0.5451 -#> log_k_m1 -0.1701 -0.3285 1.0000 0.7466 -#> f_parent_ilr_1 -0.5489 -0.5451 0.7466 1.0000 -#> -#> Residual standard error: 3.211 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.600000 61.720 2.024e-38 96.330000 1.029e+02 -#> k_parent 0.098700 23.880 5.701e-24 0.090660 1.074e-01 -#> k_m1 0.005261 7.349 5.758e-09 0.003992 6.933e-03 -#> f_parent_to_m1 0.514500 22.490 4.374e-23 0.468100 5.606e-01 -#> -#> 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 -#> 0 m1 0.00 0.00000 0.000e+00 -#> 0 m1 0.00 0.00000 0.000e+00 -#> 1 m1 4.84 4.80296 3.704e-02 -#> 1 m1 5.64 4.80296 8.370e-01 -#> 3 m1 12.91 13.02400 -1.140e-01 -#> 3 m1 12.96 13.02400 -6.400e-02 -#> 7 m1 22.97 25.04476 -2.075e+00 -#> 7 m1 24.47 25.04476 -5.748e-01 -#> 14 m1 41.69 36.69002 5.000e+00 -#> 14 m1 33.21 36.69002 -3.480e+00 -#> 21 m1 44.37 41.65310 2.717e+00 -#> 21 m1 46.44 41.65310 4.787e+00 -#> 35 m1 41.22 43.31312 -2.093e+00 -#> 35 m1 37.95 43.31312 -5.363e+00 -#> 50 m1 41.19 41.21831 -2.831e-02 -#> 50 m1 40.01 41.21831 -1.208e+00 -#> 75 m1 40.09 36.44703 3.643e+00 -#> 75 m1 33.85 36.44703 -2.597e+00 -#> 100 m1 31.04 31.98163 -9.416e-01 -#> 100 m1 33.13 31.98163 1.148e+00 -#> 120 m1 25.15 28.78984 -3.640e+00 -#> 120 m1 33.31 28.78984 4.520e+00</div><div class='input'><span class='no'>f.irls</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.irls</span>)</div><div class='output co'>#> mkin version: 0.9.47.1 -#> R version: 3.4.3 -#> Date of fit: Tue Jan 30 10:06:02 2018 -#> Date of summary: Tue Jan 30 10:06:02 2018 -#> -#> 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 deSolve -#> -#> Fitted with method Port using 523 model solutions performed in 2.151 s -#> -#> Weighting: none -#> -#> Iterative reweighting with method obs -#> Final mean squared residuals of observed variables: -#> parent m1 -#> 11.573408 7.407845 -#> -#> 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 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.67000 1.79200 96.04000 103.300 -#> log_k_parent -2.31200 0.04560 -2.40400 -2.219 -#> log_k_m1 -5.25100 0.12510 -5.50500 -4.998 -#> f_parent_ilr_1 0.03785 0.06318 -0.09027 0.166 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5083 -0.1979 -0.6148 -#> log_k_parent 0.5083 1.0000 -0.3894 -0.6062 -#> log_k_m1 -0.1979 -0.3894 1.0000 0.7417 -#> f_parent_ilr_1 -0.6148 -0.6062 0.7417 1.0000 -#> -#> Residual standard error: 1.054 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.67000 55.630 8.184e-37 96.040000 1.033e+02 -#> k_parent 0.09906 21.930 1.016e-22 0.090310 1.087e-01 -#> k_m1 0.00524 7.996 8.486e-10 0.004066 6.753e-03 -#> f_parent_to_m1 0.51340 23.000 2.038e-23 0.468100 5.584e-01 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.399 4 15 -#> parent 6.466 2 7 -#> m1 4.679 2 8 -#> -#> Resulting formation fractions: -#> ff -#> parent_m1 0.5134 -#> parent_sink 0.4866 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 6.997 23.24 -#> m1 132.282 439.43 -#> -#> Data: -#> time variable observed predicted residual err -#> 0 parent 99.46 99.67218 -2.122e-01 3.402 -#> 0 parent 102.04 99.67218 2.368e+00 3.402 -#> 1 parent 93.50 90.27153 3.228e+00 3.402 -#> 1 parent 92.50 90.27153 2.228e+00 3.402 -#> 3 parent 63.23 74.04648 -1.082e+01 3.402 -#> 3 parent 68.99 74.04648 -5.056e+00 3.402 -#> 7 parent 52.32 49.82092 2.499e+00 3.402 -#> 7 parent 55.13 49.82092 5.309e+00 3.402 -#> 14 parent 27.27 24.90287 2.367e+00 3.402 -#> 14 parent 26.64 24.90287 1.737e+00 3.402 -#> 21 parent 11.50 12.44764 -9.476e-01 3.402 -#> 21 parent 11.64 12.44764 -8.076e-01 3.402 -#> 35 parent 2.85 3.11002 -2.600e-01 3.402 -#> 35 parent 2.91 3.11002 -2.000e-01 3.402 -#> 50 parent 0.69 0.70374 -1.374e-02 3.402 -#> 50 parent 0.63 0.70374 -7.374e-02 3.402 -#> 75 parent 0.05 0.05913 -9.134e-03 3.402 -#> 75 parent 0.06 0.05913 8.662e-04 3.402 -#> 0 m1 0.00 0.00000 0.000e+00 2.722 -#> 0 m1 0.00 0.00000 0.000e+00 2.722 -#> 1 m1 4.84 4.81328 2.672e-02 2.722 -#> 1 m1 5.64 4.81328 8.267e-01 2.722 -#> 3 m1 12.91 13.04779 -1.378e-01 2.722 -#> 3 m1 12.96 13.04779 -8.779e-02 2.722 -#> 7 m1 22.97 25.07615 -2.106e+00 2.722 -#> 7 m1 24.47 25.07615 -6.062e-01 2.722 -#> 14 m1 41.69 36.70729 4.983e+00 2.722 -#> 14 m1 33.21 36.70729 -3.497e+00 2.722 -#> 21 m1 44.37 41.65050 2.720e+00 2.722 -#> 21 m1 46.44 41.65050 4.790e+00 2.722 -#> 35 m1 41.22 43.28866 -2.069e+00 2.722 -#> 35 m1 37.95 43.28866 -5.339e+00 2.722 -#> 50 m1 41.19 41.19338 -3.383e-03 2.722 -#> 50 m1 40.01 41.19338 -1.183e+00 2.722 -#> 75 m1 40.09 36.43820 3.652e+00 2.722 -#> 75 m1 33.85 36.43820 -2.588e+00 2.722 -#> 100 m1 31.04 31.98971 -9.497e-01 2.722 -#> 100 m1 33.13 31.98971 1.140e+00 2.722 -#> 120 m1 25.15 28.80897 -3.659e+00 2.722 -#> 120 m1 33.31 28.80897 4.501e+00 2.722</div><div class='input'><span class='no'>f.w.mean</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>weight</span> <span class='kw'>=</span> <span class='st'>"mean"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.w.mean</span>)</div><div class='output co'>#> mkin version: 0.9.47.1 -#> R version: 3.4.3 -#> Date of fit: Tue Jan 30 10:06:03 2018 -#> Date of summary: Tue Jan 30 10:06:03 2018 -#> -#> 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 deSolve -#> -#> Fitted with method Port using 155 model solutions performed in 0.675 s -#> -#> Weighting: mean -#> -#> 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 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.7300 1.93200 95.81000 103.6000 -#> log_k_parent -2.3090 0.04837 -2.40700 -2.2110 -#> log_k_m1 -5.2550 0.12070 -5.49900 -5.0100 -#> f_parent_ilr_1 0.0354 0.06344 -0.09327 0.1641 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5004 -0.2143 -0.6514 -#> log_k_parent 0.5004 1.0000 -0.4282 -0.6383 -#> log_k_m1 -0.2143 -0.4282 1.0000 0.7390 -#> f_parent_ilr_1 -0.6514 -0.6383 0.7390 1.0000 -#> -#> Residual standard error: 0.09829 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.730000 51.630 1.166e-35 95.81000 1.036e+02 -#> k_parent 0.099360 20.670 7.303e-22 0.09007 1.096e-01 -#> k_m1 0.005224 8.287 3.649e-10 0.00409 6.672e-03 -#> f_parent_to_m1 0.512500 22.860 2.497e-23 0.46710 5.578e-01 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.401 4 15 -#> parent 6.473 2 7 -#> m1 4.671 2 8 -#> -#> Resulting formation fractions: -#> ff -#> parent_m1 0.5125 -#> parent_sink 0.4875 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 6.976 23.18 -#> m1 132.696 440.81 -#> -#> Data: -#> time variable observed predicted residual -#> 0 parent 99.46 99.73057 -0.270570 -#> 0 parent 102.04 99.73057 2.309430 -#> 1 parent 93.50 90.29805 3.201945 -#> 1 parent 92.50 90.29805 2.201945 -#> 3 parent 63.23 74.02503 -10.795028 -#> 3 parent 68.99 74.02503 -5.035028 -#> 7 parent 52.32 49.74838 2.571618 -#> 7 parent 55.13 49.74838 5.381618 -#> 14 parent 27.27 24.81588 2.454124 -#> 14 parent 26.64 24.81588 1.824124 -#> 21 parent 11.50 12.37885 -0.878849 -#> 21 parent 11.64 12.37885 -0.738849 -#> 35 parent 2.85 3.08022 -0.230219 -#> 35 parent 2.91 3.08022 -0.170219 -#> 50 parent 0.69 0.69396 -0.003958 -#> 50 parent 0.63 0.69396 -0.063958 -#> 75 parent 0.05 0.05789 -0.007888 -#> 75 parent 0.06 0.05789 0.002112 -#> 0 m1 0.00 0.00000 0.000000 -#> 0 m1 0.00 0.00000 0.000000 -#> 1 m1 4.84 4.82149 0.018512 -#> 1 m1 5.64 4.82149 0.818512 -#> 3 m1 12.91 13.06669 -0.156692 -#> 3 m1 12.96 13.06669 -0.106692 -#> 7 m1 22.97 25.10106 -2.131058 -#> 7 m1 24.47 25.10106 -0.631058 -#> 14 m1 41.69 36.72092 4.969077 -#> 14 m1 33.21 36.72092 -3.510923 -#> 21 m1 44.37 41.64835 2.721647 -#> 21 m1 46.44 41.64835 4.791647 -#> 35 m1 41.22 43.26923 -2.049225 -#> 35 m1 37.95 43.26923 -5.319225 -#> 50 m1 41.19 41.17364 0.016361 -#> 50 m1 40.01 41.17364 -1.163639 -#> 75 m1 40.09 36.43122 3.658776 -#> 75 m1 33.85 36.43122 -2.581224 -#> 100 m1 31.04 31.99612 -0.956124 -#> 100 m1 33.13 31.99612 1.133876 -#> 120 m1 25.15 28.82413 -3.674128 -#> 120 m1 33.31 28.82413 4.485872</div><div class='input'><span class='no'>f.w.value</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='fu'>subset</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'>err</span> <span class='kw'>=</span> <span class='st'>"value"</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='no'>f.noweight</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>summary</span>(<span class='no'>f.noweight</span>) +<span class='no'>f.irls</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='st'>"obs"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>summary</span>(<span class='no'>f.irls</span>) +<span class='no'>f.w.mean</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>weight</span> <span class='kw'>=</span> <span class='st'>"mean"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='fu'>summary</span>(<span class='no'>f.w.mean</span>) +<span class='no'>f.w.value</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='fu'>subset</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'>err</span> <span class='kw'>=</span> <span class='st'>"value"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.w.value</span>)</div><div class='output co'>#> mkin version: 0.9.47.1 -#> R version: 3.4.3 -#> Date of fit: Tue Jan 30 10:06:04 2018 -#> Date of summary: Tue Jan 30 10:06:04 2018 -#> -#> 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 deSolve -#> -#> Fitted with method Port using 174 model solutions performed in 0.68 s -#> -#> Weighting: manual -#> -#> 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 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.6600 2.712000 94.14000 105.2000 -#> log_k_parent -2.2980 0.008118 -2.31500 -2.2820 -#> log_k_m1 -5.2410 0.096690 -5.43800 -5.0450 -#> f_parent_ilr_1 0.0231 0.057990 -0.09474 0.1409 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.00000 0.6844 -0.08687 -0.7564 -#> log_k_parent 0.68435 1.0000 -0.12694 -0.5812 -#> log_k_m1 -0.08687 -0.1269 1.00000 0.5195 -#> f_parent_ilr_1 -0.75644 -0.5812 0.51951 1.0000 -#> -#> Residual standard error: 0.08396 on 34 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.660000 36.75 2.957e-29 94.14000 1.052e+02 -#> k_parent 0.100400 123.20 5.927e-47 0.09878 1.021e-01 -#> k_m1 0.005295 10.34 2.447e-12 0.00435 6.444e-03 -#> f_parent_to_m1 0.508200 24.79 1.184e-23 0.46660 5.497e-01 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.461 4 15 -#> parent 6.520 2 7 -#> m1 4.744 2 8 -#> -#> Resulting formation fractions: -#> ff -#> parent_m1 0.5082 -#> parent_sink 0.4918 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 6.902 22.93 -#> m1 130.916 434.89 -#> -#> Data: -#> time variable observed predicted residual err -#> 0 parent 99.46 99.65571 -0.195714 99.46 -#> 0 parent 102.04 99.65571 2.384286 102.04 -#> 1 parent 93.50 90.13383 3.366170 93.50 -#> 1 parent 92.50 90.13383 2.366170 92.50 -#> 3 parent 63.23 73.73252 -10.502518 63.23 -#> 3 parent 68.99 73.73252 -4.742518 68.99 -#> 7 parent 52.32 49.34027 2.979728 52.32 -#> 7 parent 55.13 49.34027 5.789728 55.13 -#> 14 parent 27.27 24.42873 2.841271 27.27 -#> 14 parent 26.64 24.42873 2.211271 26.64 -#> 21 parent 11.50 12.09484 -0.594842 11.50 -#> 21 parent 11.64 12.09484 -0.454842 11.64 -#> 35 parent 2.85 2.96482 -0.114824 2.85 -#> 35 parent 2.91 2.96482 -0.054824 2.91 -#> 50 parent 0.69 0.65733 0.032670 0.69 -#> 50 parent 0.63 0.65733 -0.027330 0.63 -#> 75 parent 0.05 0.05339 -0.003386 0.05 -#> 75 parent 0.06 0.05339 0.006614 0.06 -#> 1 m1 4.84 4.82570 0.014301 4.84 -#> 1 m1 5.64 4.82570 0.814301 5.64 -#> 3 m1 12.91 13.06402 -0.154020 12.91 -#> 3 m1 12.96 13.06402 -0.104020 12.96 -#> 7 m1 22.97 25.04656 -2.076564 22.97 -#> 7 m1 24.47 25.04656 -0.576564 24.47 -#> 14 m1 41.69 36.53601 5.153988 41.69 -#> 14 m1 33.21 36.53601 -3.326012 33.21 -#> 21 m1 44.37 41.34639 3.023609 44.37 -#> 21 m1 46.44 41.34639 5.093609 46.44 -#> 35 m1 41.22 42.82669 -1.606690 41.22 -#> 35 m1 37.95 42.82669 -4.876690 37.95 -#> 50 m1 41.19 40.67342 0.516578 41.19 -#> 50 m1 40.01 40.67342 -0.663422 40.01 -#> 75 m1 40.09 35.91105 4.178947 40.09 -#> 75 m1 33.85 35.91105 -2.061053 33.85 -#> 100 m1 31.04 31.48161 -0.441612 31.04 -#> 100 m1 33.13 31.48161 1.648388 33.13 -#> 120 m1 25.15 28.32018 -3.170181 25.15 -#> 120 m1 33.31 28.32018 4.989819 33.31</div><div class='input'> - - +<span class='fu'>summary</span>(<span class='no'>f.w.value</span>) +<span class='co'># }</span><div class='input'> +</div><span class='co'># NOT RUN {</span> <span class='co'># Manual weighting</span> <span class='no'>dw</span> <span class='kw'><-</span> <span class='no'>FOCUS_2006_D</span> <span class='no'>errors</span> <span class='kw'><-</span> <span class='fu'>c</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>2</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>1</span>) <span class='no'>dw</span>$<span class='no'>err.man</span> <span class='kw'><-</span> <span class='no'>errors</span>[<span class='no'>FOCUS_2006_D</span>$<span class='no'>name</span>] <span class='no'>f.w.man</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>dw</span>, <span class='kw'>err</span> <span class='kw'>=</span> <span class='st'>"err.man"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>f.w.man</span>)</div><div class='output co'>#> mkin version: 0.9.47.1 -#> R version: 3.4.3 -#> Date of fit: Tue Jan 30 10:06:05 2018 -#> Date of summary: Tue Jan 30 10:06:05 2018 -#> -#> 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 deSolve -#> -#> Fitted with method Port using 297 model solutions performed in 1.178 s -#> -#> Weighting: manual -#> -#> 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 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.49000 1.33200 96.7800 102.2000 -#> log_k_parent -2.32100 0.03550 -2.3930 -2.2490 -#> log_k_m1 -5.24100 0.21280 -5.6730 -4.8100 -#> f_parent_ilr_1 0.04571 0.08966 -0.1361 0.2275 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.00000 0.5312 -0.09456 -0.3351 -#> log_k_parent 0.53123 1.0000 -0.17800 -0.3360 -#> log_k_m1 -0.09456 -0.1780 1.00000 0.7616 -#> f_parent_ilr_1 -0.33514 -0.3360 0.76156 1.0000 -#> -#> Residual standard error: 2.628 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.490000 74.69 2.221e-41 96.780000 1.022e+02 -#> k_parent 0.098140 28.17 2.012e-26 0.091320 1.055e-01 -#> k_m1 0.005292 4.70 1.873e-05 0.003437 8.148e-03 -#> f_parent_to_m1 0.516200 16.30 1.686e-18 0.452000 5.798e-01 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.400 4 15 -#> parent 6.454 2 7 -#> m1 4.708 2 8 -#> -#> Resulting formation fractions: -#> ff -#> parent_m1 0.5162 -#> parent_sink 0.4838 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 7.063 23.46 -#> m1 130.971 435.08 -#> -#> Data: -#> time variable observed predicted residual err -#> 0 parent 99.46 99.48598 -0.025976 1 -#> 0 parent 102.04 99.48598 2.554024 1 -#> 1 parent 93.50 90.18612 3.313883 1 -#> 1 parent 92.50 90.18612 2.313883 1 -#> 3 parent 63.23 74.11316 -10.883162 1 -#> 3 parent 68.99 74.11316 -5.123162 1 -#> 7 parent 52.32 50.05029 2.269705 1 -#> 7 parent 55.13 50.05029 5.079705 1 -#> 14 parent 27.27 25.17975 2.090250 1 -#> 14 parent 26.64 25.17975 1.460250 1 -#> 21 parent 11.50 12.66765 -1.167654 1 -#> 21 parent 11.64 12.66765 -1.027654 1 -#> 35 parent 2.85 3.20616 -0.356164 1 -#> 35 parent 2.91 3.20616 -0.296164 1 -#> 50 parent 0.69 0.73562 -0.045619 1 -#> 50 parent 0.63 0.73562 -0.105619 1 -#> 75 parent 0.05 0.06326 -0.013256 1 -#> 75 parent 0.06 0.06326 -0.003256 1 -#> 0 m1 0.00 0.00000 0.000000 2 -#> 0 m1 0.00 0.00000 0.000000 2 -#> 1 m1 4.84 4.78729 0.052713 2 -#> 1 m1 5.64 4.78729 0.852713 2 -#> 3 m1 12.91 12.98785 -0.077848 2 -#> 3 m1 12.96 12.98785 -0.027848 2 -#> 7 m1 22.97 24.99695 -2.026945 2 -#> 7 m1 24.47 24.99695 -0.526945 2 -#> 14 m1 41.69 36.66353 5.026473 2 -#> 14 m1 33.21 36.66353 -3.453527 2 -#> 21 m1 44.37 41.65681 2.713187 2 -#> 21 m1 46.44 41.65681 4.783187 2 -#> 35 m1 41.22 43.35031 -2.130312 2 -#> 35 m1 37.95 43.35031 -5.400312 2 -#> 50 m1 41.19 41.25637 -0.066365 2 -#> 50 m1 40.01 41.25637 -1.246365 2 -#> 75 m1 40.09 36.46057 3.629433 2 -#> 75 m1 33.85 36.46057 -2.610567 2 -#> 100 m1 31.04 31.96929 -0.929288 2 -#> 100 m1 33.13 31.96929 1.160712 2 -#> 120 m1 25.15 28.76062 -3.610616 2 -#> 120 m1 33.31 28.76062 4.549384 2</div><div class='input'><span class='no'>f.w.man.irls</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>dw</span>, <span class='kw'>err</span> <span class='kw'>=</span> <span class='st'>"err.man"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, +<span class='fu'>summary</span>(<span class='no'>f.w.man</span>) +<span class='no'>f.w.man.irls</span> <span class='kw'><-</span> <span class='fu'>mkinfit</span>(<span class='no'>SFO_SFO.ff</span>, <span class='no'>dw</span>, <span class='kw'>err</span> <span class='kw'>=</span> <span class='st'>"err.man"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>reweight.method</span> <span class='kw'>=</span> <span class='st'>"obs"</span>) -<span class='fu'>summary</span>(<span class='no'>f.w.man.irls</span>)</div><div class='output co'>#> mkin version: 0.9.47.1 -#> R version: 3.4.3 -#> Date of fit: Tue Jan 30 10:06:08 2018 -#> Date of summary: Tue Jan 30 10:06:08 2018 -#> -#> 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 deSolve -#> -#> Fitted with method Port using 692 model solutions performed in 2.733 s -#> -#> Weighting: manual -#> -#> Iterative reweighting with method obs -#> Final mean squared residuals of observed variables: -#> parent m1 -#> 11.573407 7.407845 -#> -#> 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 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.67000 1.79200 96.04000 103.300 -#> log_k_parent -2.31200 0.04560 -2.40400 -2.220 -#> log_k_m1 -5.25100 0.12510 -5.50500 -4.998 -#> f_parent_ilr_1 0.03785 0.06318 -0.09027 0.166 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5083 -0.1979 -0.6148 -#> log_k_parent 0.5083 1.0000 -0.3894 -0.6062 -#> log_k_m1 -0.1979 -0.3894 1.0000 0.7417 -#> f_parent_ilr_1 -0.6148 -0.6062 0.7417 1.0000 -#> -#> Residual standard error: 1.054 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.67000 55.630 8.184e-37 96.040000 1.033e+02 -#> k_parent 0.09906 21.930 1.016e-22 0.090310 1.087e-01 -#> k_m1 0.00524 7.996 8.486e-10 0.004066 6.753e-03 -#> f_parent_to_m1 0.51340 23.000 2.038e-23 0.468100 5.584e-01 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.399 4 15 -#> parent 6.466 2 7 -#> m1 4.679 2 8 -#> -#> Resulting formation fractions: -#> ff -#> parent_m1 0.5134 -#> parent_sink 0.4866 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 6.997 23.24 -#> m1 132.282 439.43 -#> -#> Data: -#> time variable observed predicted residual err.ini err -#> 0 parent 99.46 99.67218 -2.122e-01 1 3.402 -#> 0 parent 102.04 99.67218 2.368e+00 1 3.402 -#> 1 parent 93.50 90.27153 3.228e+00 1 3.402 -#> 1 parent 92.50 90.27153 2.228e+00 1 3.402 -#> 3 parent 63.23 74.04648 -1.082e+01 1 3.402 -#> 3 parent 68.99 74.04648 -5.056e+00 1 3.402 -#> 7 parent 52.32 49.82092 2.499e+00 1 3.402 -#> 7 parent 55.13 49.82092 5.309e+00 1 3.402 -#> 14 parent 27.27 24.90288 2.367e+00 1 3.402 -#> 14 parent 26.64 24.90288 1.737e+00 1 3.402 -#> 21 parent 11.50 12.44765 -9.476e-01 1 3.402 -#> 21 parent 11.64 12.44765 -8.076e-01 1 3.402 -#> 35 parent 2.85 3.11002 -2.600e-01 1 3.402 -#> 35 parent 2.91 3.11002 -2.000e-01 1 3.402 -#> 50 parent 0.69 0.70375 -1.375e-02 1 3.402 -#> 50 parent 0.63 0.70375 -7.375e-02 1 3.402 -#> 75 parent 0.05 0.05913 -9.134e-03 1 3.402 -#> 75 parent 0.06 0.05913 8.662e-04 1 3.402 -#> 0 m1 0.00 0.00000 0.000e+00 2 2.722 -#> 0 m1 0.00 0.00000 0.000e+00 2 2.722 -#> 1 m1 4.84 4.81328 2.672e-02 2 2.722 -#> 1 m1 5.64 4.81328 8.267e-01 2 2.722 -#> 3 m1 12.91 13.04779 -1.378e-01 2 2.722 -#> 3 m1 12.96 13.04779 -8.779e-02 2 2.722 -#> 7 m1 22.97 25.07615 -2.106e+00 2 2.722 -#> 7 m1 24.47 25.07615 -6.062e-01 2 2.722 -#> 14 m1 41.69 36.70729 4.983e+00 2 2.722 -#> 14 m1 33.21 36.70729 -3.497e+00 2 2.722 -#> 21 m1 44.37 41.65050 2.720e+00 2 2.722 -#> 21 m1 46.44 41.65050 4.790e+00 2 2.722 -#> 35 m1 41.22 43.28866 -2.069e+00 2 2.722 -#> 35 m1 37.95 43.28866 -5.339e+00 2 2.722 -#> 50 m1 41.19 41.19339 -3.386e-03 2 2.722 -#> 50 m1 40.01 41.19339 -1.183e+00 2 2.722 -#> 75 m1 40.09 36.43820 3.652e+00 2 2.722 -#> 75 m1 33.85 36.43820 -2.588e+00 2 2.722 -#> 100 m1 31.04 31.98971 -9.497e-01 2 2.722 -#> 100 m1 33.13 31.98971 1.140e+00 2 2.722 -#> 120 m1 25.15 28.80897 -3.659e+00 2 2.722 -#> 120 m1 33.31 28.80897 4.501e+00 2 2.722</div><div class='input'> -</div></pre> +<span class='fu'>summary</span>(<span class='no'>f.w.man.irls</span>) +<span class='co'># }</span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -1346,7 +591,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinmod.html b/docs/reference/mkinmod.html index 5703b188..c1287905 100644 --- a/docs/reference/mkinmod.html +++ b/docs/reference/mkinmod.html @@ -18,12 +18,24 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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. +For the definition of model types and their parameters, the equations given + in the FOCUS and NAFTA guidance documents are used." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +82,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +98,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -182,7 +192,7 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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> @@ -196,36 +206,17 @@ <span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> - +</div><span class='co'># NOT RUN {</span> <span class='co'># The above model used to be specified like this, before the advent of mkinsub()</span> <span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</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'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>)) + <span class='co'># Show details of creating the C function</span> <span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>( <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), - <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> Compilation argument: -#> /usr/lib/R/bin/R CMD SHLIB file519167a14b3a.c 2> file519167a14b3a.c.err.txt -#> Program source: -#> 1: #include <R.h> -#> 2: -#> 3: -#> 4: static double parms [3]; -#> 5: #define k_parent_sink parms[0] -#> 6: #define k_parent_m1 parms[1] -#> 7: #define k_m1_sink parms[2] -#> 8: -#> 9: void initpar(void (* odeparms)(int *, double *)) { -#> 10: int N = 3; -#> 11: odeparms(&N, parms); -#> 12: } -#> 13: -#> 14: -#> 15: void func ( int * n, double * t, double * y, double * f, double * rpar, int * ipar ) { -#> 16: -#> 17: f[0] = - k_parent_sink * y[0] - k_parent_m1 * y[0]; -#> 18: f[1] = + k_parent_m1 * y[0] - k_m1_sink * y[1]; -#> 19: }</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='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>) + <span class='co'># If we have several parallel metabolites </span> <span class='co'># (compare tests/testthat/test_synthetic_data_for_UBA_2014.R)</span> <span class='no'>m_synth_DFOP_par</span> <span class='kw'><-</span> <span class='fu'>mkinmod</span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='fu'>c</span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)), @@ -235,7 +226,8 @@ <span class='no'>fit_DFOP_par_c</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>m_synth_DFOP_par</span>, <span class='no'>synthetic_data_for_UBA_2014</span><span class='kw'>[[</span><span class='fl'>12</span>]]$<span class='no'>data</span>, - <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div></pre> + <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) +<span class='co'># }</span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -264,7 +256,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinparplot-1.png b/docs/reference/mkinparplot-1.png Binary files differnew file mode 100644 index 00000000..42811535 --- /dev/null +++ b/docs/reference/mkinparplot-1.png diff --git a/docs/reference/mkinparplot-4.png b/docs/reference/mkinparplot-4.png Binary files differdeleted file mode 100644 index c9f4aadb..00000000 --- a/docs/reference/mkinparplot-4.png +++ /dev/null diff --git a/docs/reference/mkinparplot.html b/docs/reference/mkinparplot.html index 67ba6052..30954168 100644 --- a/docs/reference/mkinparplot.html +++ b/docs/reference/mkinparplot.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +94,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -132,7 +135,7 @@ <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'>c</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'>c</span>(<span class='st'>"anisole"</span>)), <span class='kw'>anisole</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='fu'>subset</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>) -<span class='fu'>mkinparplot</span>(<span class='no'>fit</span>)</div><img src='mkinparplot-4.png' alt='' width='540' height='400' /></pre> +<span class='fu'>mkinparplot</span>(<span class='no'>fit</span>)</div><div class='img'><img src='mkinparplot-1.png' alt='' width='700' height='432.632880098887' /></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -157,7 +160,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinplot.html b/docs/reference/mkinplot.html index 7c875ebe..5df3f872 100644 --- a/docs/reference/mkinplot.html +++ b/docs/reference/mkinplot.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -152,7 +154,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html index b3453e6c..df6316e1 100644 --- a/docs/reference/mkinpredict.html +++ b/docs/reference/mkinpredict.html @@ -18,12 +18,21 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +79,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +95,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -299,17 +306,17 @@ <span class='fu'>c</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'>seq</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>,]))</div><div class='output co'>#> time parent m1 #> 201 20 4.978707 27.46227</div><div class='output co'>#> user system elapsed -#> 0.004 0.000 0.003 </div><div class='input'> <span class='fu'>system.time</span>( +#> 0.003 0.000 0.003 </div><div class='input'> <span class='fu'>system.time</span>( <span class='fu'>print</span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_parent_m1</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>k_m1_sink</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), <span class='fu'>c</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'>seq</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>,]))</div><div class='output co'>#> time parent m1 #> 201 20 4.978707 27.46227</div><div class='output co'>#> user system elapsed -#> 0.000 0.000 0.001 </div><div class='input'> <span class='fu'>system.time</span>( +#> 0.002 0.000 0.001 </div><div class='input'> <span class='fu'>system.time</span>( <span class='fu'>print</span>(<span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'>c</span>(<span class='kw'>k_parent_m1</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>, <span class='kw'>k_m1_sink</span> <span class='kw'>=</span> <span class='fl'>0.01</span>), <span class='fu'>c</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'>seq</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>,]))</div><div class='output co'>#> time parent m1 #> 201 20 4.978707 27.46227</div><div class='output co'>#> user system elapsed -#> 0.032 0.000 0.032 </div></pre> +#> 0.031 0.000 0.031 </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -334,7 +341,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinresplot-1.png b/docs/reference/mkinresplot-1.png Binary files differnew file mode 100644 index 00000000..8636baf2 --- /dev/null +++ b/docs/reference/mkinresplot-1.png diff --git a/docs/reference/mkinresplot-4.png b/docs/reference/mkinresplot-4.png Binary files differdeleted file mode 100644 index 5f3a65e3..00000000 --- a/docs/reference/mkinresplot-4.png +++ /dev/null diff --git a/docs/reference/mkinresplot.html b/docs/reference/mkinresplot.html index 5cb9fa96..036917f1 100644 --- a/docs/reference/mkinresplot.html +++ b/docs/reference/mkinresplot.html @@ -18,12 +18,22 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +96,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -175,7 +180,7 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'><span class='no'>model</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>mkinresplot</span>(<span class='no'>fit</span>, <span class='st'>"m1"</span>)</div><img src='mkinresplot-4.png' alt='' width='540' height='400' /></pre> +<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='432.632880098887' /></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -202,7 +207,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mkinsub.html b/docs/reference/mkinsub.html index 257d3f89..7724220f 100644 --- a/docs/reference/mkinsub.html +++ b/docs/reference/mkinsub.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +94,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -182,7 +185,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/mmkin-12.png b/docs/reference/mmkin-12.png Binary files differdeleted file mode 100644 index 9e40d451..00000000 --- a/docs/reference/mmkin-12.png +++ /dev/null diff --git a/docs/reference/mmkin-14.png b/docs/reference/mmkin-14.png Binary files differdeleted file mode 100644 index 72cfc5e7..00000000 --- a/docs/reference/mmkin-14.png +++ /dev/null diff --git a/docs/reference/mmkin-15.png b/docs/reference/mmkin-15.png Binary files differdeleted file mode 100644 index e8a23a55..00000000 --- a/docs/reference/mmkin-15.png +++ /dev/null diff --git a/docs/reference/mmkin-16.png b/docs/reference/mmkin-16.png Binary files differdeleted file mode 100644 index 0b315b1a..00000000 --- a/docs/reference/mmkin-16.png +++ /dev/null diff --git a/docs/reference/mmkin-17.png b/docs/reference/mmkin-17.png Binary files differdeleted file mode 100644 index 01bb3ae3..00000000 --- a/docs/reference/mmkin-17.png +++ /dev/null diff --git a/docs/reference/mmkin-18.png b/docs/reference/mmkin-18.png Binary files differdeleted file mode 100644 index b98940ff..00000000 --- a/docs/reference/mmkin-18.png +++ /dev/null diff --git a/docs/reference/mmkin-19.png b/docs/reference/mmkin-19.png Binary files differdeleted file mode 100644 index b5ac70f7..00000000 --- a/docs/reference/mmkin-19.png +++ /dev/null diff --git a/docs/reference/mmkin-20.png b/docs/reference/mmkin-20.png Binary files differdeleted file mode 100644 index c2e9e5ae..00000000 --- a/docs/reference/mmkin-20.png +++ /dev/null diff --git a/docs/reference/mmkin-21.png b/docs/reference/mmkin-21.png Binary files differdeleted file mode 100644 index 7e15e1b3..00000000 --- a/docs/reference/mmkin-21.png +++ /dev/null diff --git a/docs/reference/mmkin-23.png b/docs/reference/mmkin-23.png Binary files differdeleted file mode 100644 index 45e8efc1..00000000 --- a/docs/reference/mmkin-23.png +++ /dev/null diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html index d649563f..e97e3f81 100644 --- a/docs/reference/mmkin.html +++ b/docs/reference/mmkin.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +78,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +94,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -152,45 +158,39 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'> + <pre class="examples"><span class='co'># NOT RUN {</span> <span class='no'>m_synth_SFO_lin</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M1"</span>), <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M2"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='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='no'>m_synth_FOMC_lin</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"M1"</span>), <span class='kw'>M1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"M2"</span>), - <span class='kw'>M2</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='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='no'>models</span> <span class='kw'><-</span> <span class='fu'>list</span>(<span class='kw'>SFO_lin</span> <span class='kw'>=</span> <span class='no'>m_synth_SFO_lin</span>, <span class='kw'>FOMC_lin</span> <span class='kw'>=</span> <span class='no'>m_synth_FOMC_lin</span>) <span class='no'>datasets</span> <span class='kw'><-</span> <span class='fu'>lapply</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'>names</span>(<span class='no'>datasets</span>) <span class='kw'><-</span> <span class='fu'>paste</span>(<span class='st'>"Dataset"</span>, <span class='fl'>1</span>:<span class='fl'>3</span>) <span class='no'>time_default</span> <span class='kw'><-</span> <span class='fu'>system.time</span>(<span class='no'>fits.0</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) -<span class='no'>time_1</span> <span class='kw'><-</span> <span class='fu'>system.time</span>(<span class='no'>fits.4</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> <span class='warning'>Warning: Optimisation by method Port did not converge.</span> -#> <span class='warning'>Convergence code is 1</span></div><div class='output co'>#> <span class='warning'>Warning: Optimisation by method Port did not converge.</span> -#> <span class='warning'>Convergence code is 1</span></div><div class='input'> -<span class='no'>time_default</span></div><div class='output co'>#> user system elapsed -#> 15.992 0.188 11.440 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#> user system elapsed -#> 24.576 0.000 24.578 </div><div class='input'> -<span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span>]])</div><div class='output co'>#> $ff -#> parent_M1 parent_sink M1_M2 M1_sink -#> 0.7340479 0.2659521 0.7505687 0.2494313 -#> -#> $SFORB -#> logical(0) -#> -#> $distimes -#> DT50 DT90 -#> parent 0.8777689 2.915885 -#> M1 2.3257456 7.725960 -#> M2 33.7200862 112.015702 -#> </div><div class='input'> +<span class='no'>time_1</span> <span class='kw'><-</span> <span class='fu'>system.time</span>(<span class='no'>fits.4</span> <span class='kw'><-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) + +<span class='no'>time_default</span> +<span class='no'>time_1</span> + +<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>]]) + <span class='co'># plot.mkinfit handles rows or columns of mmkin result objects</span> -<span class='fu'>plot</span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, ])</div><img src='mmkin-15.png' alt='' width='540' height='400' /><div class='input'><span class='fu'>plot</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'>c</span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>))</div><img src='mmkin-17.png' alt='' width='540' height='400' /><div class='input'><span class='fu'>plot</span>(<span class='no'>fits.0</span>[, <span class='fl'>1</span>])</div><img src='mmkin-19.png' alt='' width='540' height='400' /><div class='input'><span class='co'># Use double brackets to extract a single mkinfit object, which will be plotted</span> +<span class='fu'>plot</span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, ]) +<span class='fu'>plot</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'>c</span>(<span class='st'>"M1"</span>, <span class='st'>"M2"</span>)) +<span class='fu'>plot</span>(<span class='no'>fits.0</span>[, <span class='fl'>1</span>]) +<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'>plot</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><img src='mmkin-21.png' alt='' width='540' height='400' /><div class='input'><span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='fl'>1</span>, <span class='fl'>1</span>]]) +<span class='fu'>plot</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>) +<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'>plot</span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, <span class='fl'>1</span>])</div><img src='mmkin-23.png' alt='' width='540' height='400' /><div class='input'> -</div></pre> +<span class='fu'>plot</span>(<span class='no'>fits.0</span>[<span class='fl'>1</span>, <span class='fl'>1</span>]) +<span class='co'># }</span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -217,7 +217,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/plot.mkinfit-1.png b/docs/reference/plot.mkinfit-1.png Binary files differnew file mode 100644 index 00000000..2bb8f5dd --- /dev/null +++ b/docs/reference/plot.mkinfit-1.png diff --git a/docs/reference/plot.mkinfit-10.png b/docs/reference/plot.mkinfit-10.png Binary files differdeleted file mode 100644 index 48ab5271..00000000 --- a/docs/reference/plot.mkinfit-10.png +++ /dev/null diff --git a/docs/reference/plot.mkinfit-2.png b/docs/reference/plot.mkinfit-2.png Binary files differnew file mode 100644 index 00000000..22a3f8b0 --- /dev/null +++ b/docs/reference/plot.mkinfit-2.png diff --git a/docs/reference/plot.mkinfit-3.png b/docs/reference/plot.mkinfit-3.png Binary files differnew file mode 100644 index 00000000..93e859c7 --- /dev/null +++ b/docs/reference/plot.mkinfit-3.png diff --git a/docs/reference/plot.mkinfit-4.png b/docs/reference/plot.mkinfit-4.png Binary files differindex cb52d4ac..27edd6f3 100644 --- a/docs/reference/plot.mkinfit-4.png +++ b/docs/reference/plot.mkinfit-4.png diff --git a/docs/reference/plot.mkinfit-6.png b/docs/reference/plot.mkinfit-6.png Binary files differdeleted file mode 100644 index 8e0faa21..00000000 --- a/docs/reference/plot.mkinfit-6.png +++ /dev/null diff --git a/docs/reference/plot.mkinfit-8.png b/docs/reference/plot.mkinfit-8.png Binary files differdeleted file mode 100644 index 129f1445..00000000 --- a/docs/reference/plot.mkinfit-8.png +++ /dev/null diff --git a/docs/reference/plot.mkinfit.html b/docs/reference/plot.mkinfit.html index 0af2bbf6..4bdad93f 100644 --- a/docs/reference/plot.mkinfit.html +++ b/docs/reference/plot.mkinfit.html @@ -18,12 +18,24 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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. +If the current plot device is a tikz device, + then latex is being used for the formatting of the chi2 error level, + if show_errmin = TRUE." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +98,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -237,12 +244,12 @@ plot_sep(fit, sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE, … <span class='co'># parent to sink included, use Levenberg-Marquardt for speed</span> <span class='no'>SFO_SFO</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"m1"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Parent"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='kw'>full</span> <span class='kw'>=</span> <span class='st'>"Metabolite M1"</span> ))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>method.modFit</span> <span class='kw'>=</span> <span class='st'>"Marq"</span>) -<span class='fu'>plot</span>(<span class='no'>fit</span>)</div><img src='plot.mkinfit-4.png' alt='' width='540' height='400' /><div class='input'><span class='fu'>plot</span>(<span class='no'>fit</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><img src='plot.mkinfit-6.png' alt='' width='540' height='400' /><div class='input'> +<span class='fu'>plot</span>(<span class='no'>fit</span>)</div><div class='img'><img src='plot.mkinfit-1.png' alt='' width='700' height='432.632880098887' /></div><div class='input'><span class='fu'>plot</span>(<span class='no'>fit</span>, <span class='kw'>show_residuals</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-2.png' alt='' width='700' height='432.632880098887' /></div><div class='input'> <span class='co'># Show the observed variables separately</span> -<span class='fu'>plot</span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><img src='plot.mkinfit-8.png' alt='' width='540' height='400' /><div class='input'> +<span class='fu'>plot</span>(<span class='no'>fit</span>, <span class='kw'>sep_obs</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>lpos</span> <span class='kw'>=</span> <span class='fu'>c</span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><div class='img'><img src='plot.mkinfit-3.png' alt='' width='700' height='432.632880098887' /></div><div class='input'> <span class='co'># Show the observed variables separately, with residuals</span> <span class='fu'>plot</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'>c</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><img src='plot.mkinfit-10.png' alt='' width='540' height='400' /><div class='input'> + <span class='kw'>show_errmin</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='img'><img src='plot.mkinfit-4.png' alt='' width='700' height='432.632880098887' /></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'>c</span>(<span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div></pre> </div> @@ -269,7 +276,7 @@ plot_sep(fit, sep_obs = TRUE, show_residuals = TRUE, show_errmin = TRUE, … </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/plot.mmkin-1.png b/docs/reference/plot.mmkin-1.png Binary files differnew file mode 100644 index 00000000..2554b68b --- /dev/null +++ b/docs/reference/plot.mmkin-1.png diff --git a/docs/reference/plot.mmkin-2.png b/docs/reference/plot.mmkin-2.png Binary files differindex 21af1e7b..9a66294f 100644 --- a/docs/reference/plot.mmkin-2.png +++ b/docs/reference/plot.mmkin-2.png diff --git a/docs/reference/plot.mmkin-3.png b/docs/reference/plot.mmkin-3.png Binary files differnew file mode 100644 index 00000000..b0f7fa21 --- /dev/null +++ b/docs/reference/plot.mmkin-3.png diff --git a/docs/reference/plot.mmkin-4.png b/docs/reference/plot.mmkin-4.png Binary files differdeleted file mode 100644 index 3004f48f..00000000 --- a/docs/reference/plot.mmkin-4.png +++ /dev/null diff --git a/docs/reference/plot.mmkin-6.png b/docs/reference/plot.mmkin-6.png Binary files differdeleted file mode 100644 index 02ed2ab1..00000000 --- a/docs/reference/plot.mmkin-6.png +++ /dev/null diff --git a/docs/reference/plot.mmkin.html b/docs/reference/plot.mmkin.html index aa3df77a..11da6685 100644 --- a/docs/reference/plot.mmkin.html +++ b/docs/reference/plot.mmkin.html @@ -18,12 +18,23 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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. +If the current plot device is a tikz device, + then latex is being used for the formatting of the chi2 error level." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +97,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -165,11 +171,11 @@ <span class='no'>fits</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'>c</span>(<span class='st'>"FOMC"</span>, <span class='st'>"HS"</span>), <span class='fu'>list</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'>method.modFit</span> <span class='kw'>=</span> <span class='st'>"Marq"</span>) - <span class='fu'>plot</span>(<span class='no'>fits</span>[, <span class='st'>"FOCUS C"</span>])</div><img src='plot.mmkin-2.png' alt='' width='540' height='400' /><div class='input'> <span class='fu'>plot</span>(<span class='no'>fits</span>[<span class='st'>"FOMC"</span>, ])</div><img src='plot.mmkin-4.png' alt='' width='540' height='400' /><div class='input'> + <span class='fu'>plot</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='432.632880098887' /></div><div class='input'> <span class='fu'>plot</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='432.632880098887' /></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'>plot</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><img src='plot.mmkin-6.png' alt='' width='540' height='400' /></pre> + <span class='fu'>plot</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-3.png' alt='' width='700' height='432.632880098887' /></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -194,7 +200,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/print.mkinds.html b/docs/reference/print.mkinds.html index 14342f21..8e0d18b2 100644 --- a/docs/reference/print.mkinds.html +++ b/docs/reference/print.mkinds.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -143,7 +145,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/print.mkinmod.html b/docs/reference/print.mkinmod.html index 33782b7d..db15cc60 100644 --- a/docs/reference/print.mkinmod.html +++ b/docs/reference/print.mkinmod.html @@ -18,12 +18,19 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +93,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -164,7 +166,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/schaefer07_complex_case-4.png b/docs/reference/schaefer07_complex_case-4.png Binary files differdeleted file mode 100644 index b90185a1..00000000 --- a/docs/reference/schaefer07_complex_case-4.png +++ /dev/null diff --git a/docs/reference/schaefer07_complex_case.html b/docs/reference/schaefer07_complex_case.html index 605f572e..6c53f805 100644 --- a/docs/reference/schaefer07_complex_case.html +++ b/docs/reference/schaefer07_complex_case.html @@ -18,12 +18,21 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -86,12 +95,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -140,24 +144,12 @@ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'>list</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'>list</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'>list</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'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='kw'>A2</span> <span class='kw'>=</span> <span class='fu'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> </div><span class='co'># NOT RUN {</span> <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>model</span>, <span class='no'>data</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) - <span class='fu'>plot</span>(<span class='no'>fit</span>)</div><img src='schaefer07_complex_case-4.png' alt='' width='540' height='400' /><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>)</div><div class='output co'>#> $ff -#> parent_A1 parent_B1 parent_C1 parent_sink A1_A2 A1_sink -#> 0.3809618 0.1954667 0.4235715 0.0000000 0.4479596 0.5520404 -#> -#> $SFORB -#> logical(0) -#> -#> $distimes -#> DT50 DT90 -#> parent 13.95078 46.34349 -#> A1 49.75345 165.27739 -#> B1 37.26908 123.80521 -#> C1 11.23130 37.30957 -#> A2 28.50652 94.69662 -#> </div><div class='input'> - <span class='co'># Compare with the results obtained in the original publication</span> + <span class='fu'>plot</span>(<span class='no'>fit</span>) + <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fit</span>) + +<span class='co'># }</span><div class='input'> <span class='co'># Compare with the results obtained in the original publication</span> <span class='fu'>print</span>(<span class='no'>schaefer07_complex_results</span>)</div><div class='output co'>#> compound parameter KinGUI ModelMaker deviation #> 1 parent degradation rate 0.0496 0.0506 2.0 #> 2 parent DT50 13.9900 13.6900 2.2 @@ -194,7 +186,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/sigma_rl.html b/docs/reference/sigma_rl.html index b7c93961..868c0d4f 100644 --- a/docs/reference/sigma_rl.html +++ b/docs/reference/sigma_rl.html @@ -18,12 +18,21 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <script src="../pkgdown.js"></script> - + + +<meta property="og:title" content="Two component error model of Rocke and Lorenzato — sigma_rl" /> + +<meta property="og:description" content="Function describing the standard deviation of the measurement error + in dependence of the measured value \(y\): +$$\sigma = \sqrt{ \sigma_{low}^2 + y^2 * {rsd}_{high}^2}$$" /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -157,7 +166,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/summary.mkinfit.html b/docs/reference/summary.mkinfit.html index f20e3948..977ff8d8 100644 --- a/docs/reference/summary.mkinfit.html +++ b/docs/reference/summary.mkinfit.html @@ -18,12 +18,22 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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, the summary as returned by summary.modFit, + the chi2 error levels calculated according to FOCUS guidance (2006) as far + as defined therein, and optionally the data, consisting of observed, predicted + and residual values." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +80,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +96,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -177,21 +185,21 @@ Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics</a></p> + <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'>summary</span>(<span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)), <span class='no'>FOCUS_2006_A</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> mkin version: 0.9.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:15:30 2017 -#> Date of summary: Sat Jul 29 15:15:30 2017 + <pre class="examples"><div class='input'> <span class='fu'>summary</span>(<span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>)), <span class='no'>FOCUS_2006_A</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#> mkin version used for fitting: 0.9.47.1 +#> R version used for fitting: 3.4.3 +#> Date of fit: Thu Mar 1 14:26:27 2018 +#> Date of summary: Thu Mar 1 14:26:27 2018 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent #> #> Model predictions using solution type analytical #> -#> Fitted with method Port using 35 model solutions performed in 0.084 s +#> Fitted with method Port using 35 model solutions performed in 0.076 s #> #> Weighting: none #> @@ -277,7 +285,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/synthetic_data_for_UBA.html b/docs/reference/synthetic_data_for_UBA.html index f9603f34..192e8dc2 100644 --- a/docs/reference/synthetic_data_for_UBA.html +++ b/docs/reference/synthetic_data_for_UBA.html @@ -18,12 +18,31 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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. +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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -136,7 +155,7 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'> + <pre class="examples"># NOT RUN { # The data have been generated using the following kinetic models m_synth_SFO_lin <- mkinmod(parent = list(type = "SFO", to = "M1"), M1 = list(type = "SFO", to = "M2"), @@ -235,11 +254,8 @@ fit <- mkinfit(m_synth_SFO_lin, synthetic_data_for_UBA_2014[[1]]$data, quiet = TRUE) plot_sep(fit) summary(fit) - -</div><div class='output co'>#> <span class='error'>Error: <text>:68:43: Unerwartete(s) SPECIAL</span> -#> <span class='error'>67: </span> -#> <span class='error'>68: d_rep[d_rep$time == 0 & d_rep$name <!-- %in%</span> -#> <span class='error'> ^</span></div></pre> +# } +</pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -261,7 +277,7 @@ summary(fit) </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/synthetic_data_for_UBA_2014-10.png b/docs/reference/synthetic_data_for_UBA_2014-10.png Binary files differdeleted file mode 100644 index 7e15e1b3..00000000 --- a/docs/reference/synthetic_data_for_UBA_2014-10.png +++ /dev/null diff --git a/docs/reference/test_data_from_UBA_2014-12.png b/docs/reference/test_data_from_UBA_2014-12.png Binary files differdeleted file mode 100644 index 6738f3a0..00000000 --- a/docs/reference/test_data_from_UBA_2014-12.png +++ /dev/null diff --git a/docs/reference/test_data_from_UBA_2014-16.png b/docs/reference/test_data_from_UBA_2014-16.png Binary files differdeleted file mode 100644 index 6738f3a0..00000000 --- a/docs/reference/test_data_from_UBA_2014-16.png +++ /dev/null diff --git a/docs/reference/test_data_from_UBA_2014-4.png b/docs/reference/test_data_from_UBA_2014-4.png Binary files differdeleted file mode 100644 index 8c65e604..00000000 --- a/docs/reference/test_data_from_UBA_2014-4.png +++ /dev/null diff --git a/docs/reference/test_data_from_UBA_2014-6.png b/docs/reference/test_data_from_UBA_2014-6.png Binary files differdeleted file mode 100644 index 8c65e604..00000000 --- a/docs/reference/test_data_from_UBA_2014-6.png +++ /dev/null diff --git a/docs/reference/test_data_from_UBA_2014.html b/docs/reference/test_data_from_UBA_2014.html index ed2ccd9c..c4292d9c 100644 --- a/docs/reference/test_data_from_UBA_2014.html +++ b/docs/reference/test_data_from_UBA_2014.html @@ -18,12 +18,20 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -123,7 +131,7 @@ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'> + <pre class="examples"><div class='input'> </div><span class='co'># NOT RUN {</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> @@ -131,57 +139,27 @@ <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'><-</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'>#> <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'><-</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>) - <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>f_river</span>)</div><img src='test_data_from_UBA_2014-4.png' alt='' width='540' height='400' /><div class='input'> - <span class='fu'>summary</span>(<span class='no'>f_river</span>)$<span class='no'>bpar</span></div><div class='output co'>#> Estimate se_notrans t value Pr(>t) Lower -#> parent_w_0 9.598567e+01 2.33959810 4.102657e+01 9.568973e-19 NA -#> k_parent_w_sink 3.603743e-01 0.03497716 1.030313e+01 4.988281e-09 NA -#> k_parent_w_parent_s 6.031370e-02 0.01746026 3.454342e+00 1.514738e-03 NA -#> k_parent_s_sink 5.099834e-11 0.10381939 4.912217e-10 5.000000e-01 NA -#> k_parent_s_parent_w 7.419672e-02 0.11338174 6.543974e-01 2.608057e-01 NA -#> Upper -#> parent_w_0 NA -#> k_parent_w_sink NA -#> k_parent_w_parent_s NA -#> k_parent_s_sink NA -#> k_parent_s_parent_w 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'>#> err.min n.optim df -#> All data 0.09246946 5 6 -#> parent_w 0.06377096 3 3 -#> parent_s 0.20882324 2 3</div><div class='input'> + <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>)) + <span class='no'>f_river</span> <span class='kw'><-</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>) + <span class='fu'><a href='plot.mkinfit.html'>plot_sep</a></span>(<span class='no'>f_river</span>) + + <span class='fu'>summary</span>(<span class='no'>f_river</span>)$<span class='no'>bpar</span> + <span class='fu'><a href='mkinerrmin.html'>mkinerrmin</a></span>(<span class='no'>f_river</span>) + <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'><-</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'>c</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'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>) + <span class='no'>f_soil</span> <span class='kw'><-</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>) - <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'>c</span>(<span class='st'>"topright"</span>, <span class='st'>"topright"</span>, <span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>))</div><img src='test_data_from_UBA_2014-12.png' alt='' width='540' height='400' /><div class='input'> <span class='fu'>summary</span>(<span class='no'>f_soil</span>)$<span class='no'>bpar</span></div><div class='output co'>#> Estimate se_notrans t value Pr(>t) Lower -#> parent_0 76.55425583 0.943443834 81.1434164 4.422340e-30 74.602593306 -#> k_parent 0.12081956 0.004815515 25.0896457 1.639665e-18 0.111257526 -#> k_M1 0.84258650 0.930121206 0.9058889 1.871937e-01 0.085876305 -#> k_M2 0.04210878 0.013729902 3.0669396 2.729137e-03 0.021450631 -#> k_M3 0.01122919 0.008044866 1.3958205 8.804914e-02 0.002550985 -#> f_parent_to_M1 0.32240199 0.278620411 1.1571370 1.295466e-01 NA -#> f_parent_to_M2 0.16099854 0.030548889 5.2701930 1.196191e-05 NA -#> f_M1_to_M3 0.27921500 0.314732717 0.8871496 1.920907e-01 0.015016888 -#> f_M2_to_M3 0.55641332 0.650247079 0.8556952 2.004966e-01 0.005360551 -#> Upper -#> parent_0 78.50591836 -#> k_parent 0.13120340 -#> k_M1 8.26714671 -#> k_M2 0.08266187 -#> k_M3 0.04942980 -#> f_parent_to_M1 NA -#> f_parent_to_M2 NA -#> f_M1_to_M3 0.90777217 -#> f_M2_to_M3 0.99658634</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'>#> err.min n.optim df -#> All data 0.09649963 9 20 -#> parent 0.04721283 2 6 -#> M1 0.26551209 2 5 -#> M2 0.20327575 2 5 -#> M3 0.05196549 3 4</div><div class='input'> -</div></pre> + <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'>c</span>(<span class='st'>"topright"</span>, <span class='st'>"topright"</span>, <span class='st'>"topright"</span>, <span class='st'>"bottomright"</span>)) + <span class='fu'>summary</span>(<span class='no'>f_soil</span>)$<span class='no'>bpar</span> + <span class='fu'><a href='mkinerrmin.html'>mkinerrmin</a></span>(<span class='no'>f_soil</span>) + +<span class='co'># }</span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -203,7 +181,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/transform_odeparms.html b/docs/reference/transform_odeparms.html index bbf15a41..630a5103 100644 --- a/docs/reference/transform_odeparms.html +++ b/docs/reference/transform_odeparms.html @@ -18,12 +18,27 @@ <!-- Font Awesome icons --> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> +<!-- clipboard.js --> +<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha384-cV+rhyOuRHc9Ub/91rihWcGmMmCXDeksTtCihMupQHSsi8GIIRDG0ThDc3HGQFJ3" crossorigin="anonymous"></script> <!-- pkgdown --> <link href="../pkgdown.css" rel="stylesheet"> <script src="../jquery.sticky-kit.min.js"></script> <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 paramters 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. +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 mkinfit." /> +<meta name="twitter:card" content="summary" /> <!-- mathjax --> <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> @@ -70,6 +85,9 @@ <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a> </li> <li> + <a href="../articles/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + </li> + <li> <a href="../articles/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a> </li> <li> @@ -83,12 +101,7 @@ </ul> <ul class="nav navbar-nav navbar-right"> - <li> - <a href="http://github.com/jranke/mkin"> - <span class="fa fa-github fa-lg"></span> - - </a> -</li> + </ul> </div><!--/.nav-collapse --> </div><!--/.container --> @@ -170,10 +183,10 @@ <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</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'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='co'># Fit the model to the FOCUS example dataset D using defaults</span> <span class='no'>fit</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_2006_D</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='fu'>summary</span>(<span class='no'>fit</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>) <span class='co'># See transformed and backtransformed parameters</span></div><div class='output co'>#> mkin version: 0.9.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:15:35 2017 -#> Date of summary: Sat Jul 29 15:15:35 2017 +<span class='fu'>summary</span>(<span class='no'>fit</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>) <span class='co'># See transformed and backtransformed parameters</span></div><div class='output co'>#> mkin version used for fitting: 0.9.47.1 +#> R version used for fitting: 3.4.3 +#> Date of fit: Thu Mar 1 14:26:28 2018 +#> Date of summary: Thu Mar 1 14:26:28 2018 #> #> Equations: #> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent @@ -181,7 +194,7 @@ #> #> Model predictions using solution type deSolve #> -#> Fitted with method Port using 153 model solutions performed in 0.608 s +#> Fitted with method Port using 153 model solutions performed in 0.571 s #> #> Weighting: none #> @@ -245,84 +258,10 @@ #> DT50 DT90 #> parent 7.023 23.33 #> m1 131.761 437.70</div><div class='input'> - +</div><span class='co'># NOT RUN {</span> <span class='no'>fit.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='no'>FOCUS_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>) -<span class='fu'>summary</span>(<span class='no'>fit.2</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version: 0.9.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:15:36 2017 -#> Date of summary: Sat Jul 29 15:15:36 2017 -#> -#> Equations: -#> d_parent/dt = - k_parent_sink * parent - k_parent_m1 * parent -#> d_m1/dt = + k_parent_m1 * parent - k_m1_sink * m1 -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 352 model solutions performed in 1.401 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent_sink 0.1000 deparm -#> k_parent_m1 0.1001 deparm -#> k_m1_sink 0.1002 deparm -#> -#> Starting values for the transformed parameters actually optimised: -#> value lower upper -#> parent_0 100.7500 -Inf Inf -#> k_parent_sink 0.1000 0 Inf -#> k_parent_m1 0.1001 0 Inf -#> k_m1_sink 0.1002 0 Inf -#> -#> Fixed parameter values: -#> value type -#> m1_0 0 state -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.600000 1.6140000 96.330000 1.029e+02 -#> k_parent_sink 0.047920 0.0037500 0.040310 5.553e-02 -#> k_parent_m1 0.050780 0.0020940 0.046530 5.502e-02 -#> k_m1_sink 0.005261 0.0007159 0.003809 6.713e-03 -#> -#> Parameter correlation: -#> parent_0 k_parent_sink k_parent_m1 k_m1_sink -#> parent_0 1.00000 0.6075 -0.06625 -0.1701 -#> k_parent_sink 0.60752 1.0000 -0.08740 -0.6253 -#> k_parent_m1 -0.06625 -0.0874 1.00000 0.4716 -#> k_m1_sink -0.17006 -0.6253 0.47164 1.0000 -#> -#> Residual standard error: 3.211 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.600000 61.720 2.024e-38 96.330000 1.029e+02 -#> k_parent_sink 0.047920 12.780 3.050e-15 0.040310 5.553e-02 -#> k_parent_m1 0.050780 24.250 3.407e-24 0.046530 5.502e-02 -#> k_m1_sink 0.005261 7.349 5.758e-09 0.003809 6.713e-03 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 6.398 4 15 -#> parent 6.827 3 6 -#> m1 4.490 1 9 -#> -#> Resulting formation fractions: -#> ff -#> parent_sink 0.4855 -#> parent_m1 0.5145 -#> m1_sink 1.0000 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 7.023 23.33 -#> m1 131.761 437.70</div><div class='input'> - +<span class='fu'>summary</span>(<span class='no'>fit.2</span>, <span class='kw'>data</span><span class='kw'>=</span><span class='fl'>FALSE</span>) +<span class='co'># }</span><div class='input'> <span class='no'>initials</span> <span class='kw'><-</span> <span class='no'>fit</span>$<span class='no'>start</span>$<span class='no'>value</span> <span class='fu'>names</span>(<span class='no'>initials</span>) <span class='kw'><-</span> <span class='fu'>rownames</span>(<span class='no'>fit</span>$<span class='no'>start</span>) <span class='no'>transformed</span> <span class='kw'><-</span> <span class='no'>fit</span>$<span class='no'>start_transformed</span>$<span class='no'>value</span> @@ -330,162 +269,29 @@ <span class='fu'>transform_odeparms</span>(<span class='no'>initials</span>, <span class='no'>SFO_SFO</span>)</div><div class='output co'>#> parent_0 log_k_parent_sink log_k_parent_m1 log_k_m1_sink #> 100.750000 -2.302585 -2.301586 -2.300587 </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'>#> parent_0 k_parent_sink k_parent_m1 k_m1_sink #> 100.7500 0.1000 0.1001 0.1002 </div><div class='input'> - +</div><span class='co'># NOT RUN {</span> <span class='co'># The case of formation fractions</span> <span class='no'>SFO_SFO.ff</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</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'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), - <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>) + <span class='no'>fit.ff</span> <span class='kw'><-</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>) -<span class='fu'>summary</span>(<span class='no'>fit.ff</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version: 0.9.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:15:37 2017 -#> Date of summary: Sat Jul 29 15:15:37 2017 -#> -#> 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 deSolve -#> -#> Fitted with method Port using 185 model solutions performed in 0.772 s -#> -#> Weighting: none -#> -#> 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 -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 99.60000 1.61400 96.3300 102.9000 -#> log_k_parent -2.31600 0.04187 -2.4010 -2.2310 -#> log_k_m1 -5.24800 0.13610 -5.5230 -4.9720 -#> f_parent_ilr_1 0.04096 0.06477 -0.0904 0.1723 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 f_parent_ilr_1 -#> parent_0 1.0000 0.5178 -0.1701 -0.5489 -#> log_k_parent 0.5178 1.0000 -0.3285 -0.5451 -#> log_k_m1 -0.1701 -0.3285 1.0000 0.7466 -#> f_parent_ilr_1 -0.5489 -0.5451 0.7466 1.0000 -#> -#> Residual standard error: 3.211 on 36 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 99.600000 61.720 2.024e-38 96.330000 1.029e+02 -#> k_parent 0.098700 23.880 5.701e-24 0.090660 1.074e-01 -#> k_m1 0.005261 7.349 5.758e-09 0.003992 6.933e-03 -#> f_parent_to_m1 0.514500 22.490 4.374e-23 0.468100 5.606e-01 -#> -#> 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</div><div class='input'><span class='no'>initials</span> <span class='kw'><-</span> <span class='fu'>c</span>(<span class='st'>"f_parent_to_m1"</span> <span class='kw'>=</span> <span class='fl'>0.5</span>) +<span class='fu'>summary</span>(<span class='no'>fit.ff</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) +<span class='no'>initials</span> <span class='kw'><-</span> <span class='fu'>c</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'><-</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'>#> f_parent_to_m1 -#> 0.5 </div><div class='input'> +<span class='fu'>backtransform_odeparms</span>(<span class='no'>transformed</span>, <span class='no'>SFO_SFO.ff</span>) + <span class='co'># And without sink</span> <span class='no'>SFO_SFO.ff.2</span> <span class='kw'><-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>( <span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'>list</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'>list</span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), - <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>)</div><div class='output co'>#> <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'> + <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>) + <span class='no'>fit.ff.2</span> <span class='kw'><-</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>) -<span class='fu'>summary</span>(<span class='no'>fit.ff.2</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#> mkin version: 0.9.46 -#> R version: 3.4.1 -#> Date of fit: Sat Jul 29 15:15:38 2017 -#> Date of summary: Sat Jul 29 15:15:38 2017 -#> -#> Equations: -#> d_parent/dt = - k_parent * parent -#> d_m1/dt = + k_parent * parent - k_m1 * m1 -#> -#> Model predictions using solution type deSolve -#> -#> Fitted with method Port using 104 model solutions performed in 0.416 s -#> -#> Weighting: none -#> -#> Starting values for parameters to be optimised: -#> value type -#> parent_0 100.7500 state -#> k_parent 0.1000 deparm -#> k_m1 0.1001 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 -#> -#> Fixed parameter values: -#> value type -#> m1_0 0 state -#> -#> Optimised, transformed parameters with symmetric confidence intervals: -#> Estimate Std. Error Lower Upper -#> parent_0 84.790 2.96500 78.78 90.800 -#> log_k_parent -2.756 0.08088 -2.92 -2.593 -#> log_k_m1 -4.214 0.11150 -4.44 -3.988 -#> -#> Parameter correlation: -#> parent_0 log_k_parent log_k_m1 -#> parent_0 1.0000 0.11059 0.46156 -#> log_k_parent 0.1106 1.00000 0.06274 -#> log_k_m1 0.4616 0.06274 1.00000 -#> -#> Residual standard error: 8.333 on 37 degrees of freedom -#> -#> Backtransformed parameters: -#> Confidence intervals for internally transformed parameters are asymmetric. -#> t-test (unrealistically) based on the assumption of normal distribution -#> for estimators of untransformed parameters. -#> Estimate t value Pr(>t) Lower Upper -#> parent_0 84.79000 28.600 3.938e-27 78.78000 90.80000 -#> k_parent 0.06352 12.360 5.237e-15 0.05392 0.07483 -#> k_m1 0.01478 8.966 4.114e-11 0.01179 0.01853 -#> -#> Chi2 error levels in percent: -#> err.min n.optim df -#> All data 19.66 3 16 -#> parent 17.56 2 7 -#> m1 18.71 1 9 -#> -#> Estimated disappearance times: -#> DT50 DT90 -#> parent 10.91 36.25 -#> m1 46.89 155.75</div><div class='input'> -</div></pre> +<span class='fu'>summary</span>(<span class='no'>fit.ff.2</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) +<span class='co'># }</span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> @@ -510,7 +316,7 @@ </div> <div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> + <p>Site built with <a href="http://pkgdown.r-lib.org/">pkgdown</a>.</p> </div> </footer> diff --git a/docs/reference/twa.html b/docs/reference/twa.html deleted file mode 100644 index be76b439..00000000 --- a/docs/reference/twa.html +++ /dev/null @@ -1,179 +0,0 @@ -<!-- Generated by pkgdown: do not edit by hand --> -<!DOCTYPE html> -<html> - <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 — twa • mkin</title> - -<!-- jquery --> -<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> -<!-- Bootstrap --> - -<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> - -<!-- Font Awesome icons --> -<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> - - -<!-- pkgdown --> -<link href="../pkgdown.css" rel="stylesheet"> -<script src="../jquery.sticky-kit.min.js"></script> -<script src="../pkgdown.js"></script> - -<!-- mathjax --> -<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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> - <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"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="navbar-brand" href="../index.html">mkin</a> - </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/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> - </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="fa 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> - </div> - - - <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 and DFOP models, -using the analytical formulas given in the PEC soil section of the FOCUS -guidance.</p> - - - <pre class="usage"><span class='fu'>twa</span>(<span class='no'>fit</span>, <span class='no'>windows</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> - </table> - - <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> - - <p>A numeric vector, named using the <code>windows</code> argument.</p> - - <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> - - <p>FOCUS (2006) “Guidance Document on Estimating Persistence and - Degradation Kinetics from Environmental Fate Studies on Pesticides in EU - Registration” Report of the FOCUS Work Group on Degradation Kinetics, - EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, - <a href = 'http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics'>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'><-</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'>twa</span>(<span class='no'>fit</span>, <span class='fu'>c</span>(<span class='fl'>7</span>, <span class='fl'>21</span>))</div><div class='output co'>#> 7 21 -#> 34.71343 18.22124 </div></pre> - </div> - <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> - <h2>Contents</h2> - <ul class="nav nav-pills nav-stacked"> - <li><a href="#arguments">Arguments</a></li> - - <li><a href="#value">Value</a></li> - - <li><a href="#references">References</a></li> - - <li><a href="#examples">Examples</a></li> - </ul> - - <h2>Author</h2> - - Johannes Ranke - - </div> -</div> - - <footer> - <div class="copyright"> - <p>Developed by Johannes Ranke.</p> -</div> - -<div class="pkgdown"> - <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> -</div> - - </footer> - </div> - - </body> -</html> |