aboutsummaryrefslogtreecommitdiff
path: root/docs/articles/mkin.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/articles/mkin.html')
-rw-r--r--docs/articles/mkin.html58
1 files changed, 29 insertions, 29 deletions
diff --git a/docs/articles/mkin.html b/docs/articles/mkin.html
index 14a2f9b9..234c6885 100644
--- a/docs/articles/mkin.html
+++ b/docs/articles/mkin.html
@@ -84,7 +84,7 @@
<h1>Introduction to mkin</h1>
<h4 class="author">Johannes Ranke</h4>
- <h4 class="date">2018-07-18</h4>
+ <h4 class="date">2018-09-06</h4>
<div class="hidden name"><code>mkin.Rmd</code></div>
@@ -98,34 +98,34 @@
<h1 class="hasAnchor">
<a href="#abstract" class="anchor"></a>Abstract</h1>
<p>In the regulatory evaluation of chemical substances like plant protection products (pesticides), biocides and other chemicals, degradation data play an important role. For the evaluation of pesticide degradation experiments, detailed guidance has been developed, based on nonlinear optimisation. The <code>R</code> add-on package <code>mkin</code> <span class="citation">(Ranke 2016)</span> implements fitting some of the models recommended in this guidance from within R and calculates some statistical measures for data series within one or more compartments, for parent and metabolites.</p>
-<div class="sourceCode"><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="co"># Define the kinetic model</span>
-m_SFO_SFO_SFO &lt;-<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>, <span class="st">"M2"</span>),
- <span class="dt">M2 =</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>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-
-
-<span class="co"># Produce model predictions using some arbitrary parameters</span>
-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 &lt;-<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="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 &lt;-<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> <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>
-f_SFO_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[<span class="dv">1</span>]], <span class="dt">quiet =</span> <span class="ot">TRUE</span>)
-
-<span class="co"># Plot the results separately for parent and metabolites</span>
-<span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(f_SFO_SFO_SFO, <span class="dt">lpos =</span> <span class="kw">c</span>(<span class="st">"topright"</span>, <span class="st">"bottomright"</span>, <span class="st">"bottomright"</span>))</code></pre></div>
+<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">library</span>(<span class="st">"mkin"</span>, <span class="dt">quietly =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co"># Define the kinetic model</span></a>
+<a class="sourceLine" id="cb1-3" data-line-number="3">m_SFO_SFO_SFO &lt;-<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>),</a>
+<a class="sourceLine" id="cb1-4" data-line-number="4"> <span class="dt">M1 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>, <span class="st">"M2"</span>),</a>
+<a class="sourceLine" id="cb1-5" data-line-number="5"> <span class="dt">M2 =</span> <span class="kw"><a href="../reference/mkinsub.html">mkinsub</a></span>(<span class="st">"SFO"</span>),</a>
+<a class="sourceLine" id="cb1-6" data-line-number="6"> <span class="dt">use_of_ff =</span> <span class="st">"max"</span>, <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb1-7" data-line-number="7"></a>
+<a class="sourceLine" id="cb1-8" data-line-number="8"></a>
+<a class="sourceLine" id="cb1-9" data-line-number="9"><span class="co"># Produce model predictions using some arbitrary parameters</span></a>
+<a class="sourceLine" id="cb1-10" data-line-number="10">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>)</a>
+<a class="sourceLine" id="cb1-11" data-line-number="11">d_SFO_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinpredict.html">mkinpredict</a></span>(m_SFO_SFO_SFO,</a>
+<a class="sourceLine" id="cb1-12" data-line-number="12"> <span class="kw">c</span>(<span class="dt">k_parent =</span> <span class="fl">0.03</span>,</a>
+<a class="sourceLine" id="cb1-13" data-line-number="13"> <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>,</a>
+<a class="sourceLine" id="cb1-14" data-line-number="14"> <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>),</a>
+<a class="sourceLine" id="cb1-15" data-line-number="15"> <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>),</a>
+<a class="sourceLine" id="cb1-16" data-line-number="16"> sampling_times)</a>
+<a class="sourceLine" id="cb1-17" data-line-number="17"></a>
+<a class="sourceLine" id="cb1-18" data-line-number="18"><span class="co"># Generate a dataset by adding normally distributed errors with</span></a>
+<a class="sourceLine" id="cb1-19" data-line-number="19"><span class="co"># standard deviation 3, for two replicates at each sampling time</span></a>
+<a class="sourceLine" id="cb1-20" data-line-number="20">d_SFO_SFO_SFO_err &lt;-<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>,</a>
+<a class="sourceLine" id="cb1-21" data-line-number="21"> <span class="dt">sdfunc =</span> <span class="cf">function</span>(x) <span class="dv">3</span>,</a>
+<a class="sourceLine" id="cb1-22" data-line-number="22"> <span class="dt">n =</span> <span class="dv">1</span>, <span class="dt">seed =</span> <span class="dv">123456789</span> )</a>
+<a class="sourceLine" id="cb1-23" data-line-number="23"></a>
+<a class="sourceLine" id="cb1-24" data-line-number="24"><span class="co"># Fit the model to the dataset</span></a>
+<a class="sourceLine" id="cb1-25" data-line-number="25">f_SFO_SFO_SFO &lt;-<span class="st"> </span><span class="kw"><a href="../reference/mkinfit.html">mkinfit</a></span>(m_SFO_SFO_SFO, d_SFO_SFO_SFO_err[[<span class="dv">1</span>]], <span class="dt">quiet =</span> <span class="ot">TRUE</span>)</a>
+<a class="sourceLine" id="cb1-26" data-line-number="26"></a>
+<a class="sourceLine" id="cb1-27" data-line-number="27"><span class="co"># Plot the results separately for parent and metabolites</span></a>
+<a class="sourceLine" id="cb1-28" data-line-number="28"><span class="kw"><a href="../reference/plot.mkinfit.html">plot_sep</a></span>(f_SFO_SFO_SFO, <span class="dt">lpos =</span> <span class="kw">c</span>(<span class="st">"topright"</span>, <span class="st">"bottomright"</span>, <span class="st">"bottomright"</span>))</a></code></pre></div>
<p><img src="mkin_files/figure-html/unnamed-chunk-2-1.png" width="768"></p>
</div>
<div id="background" class="section level1">

Contact - Imprint