aboutsummaryrefslogtreecommitdiff
path: root/docs/reference/mkinpredict.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference/mkinpredict.html')
-rw-r--r--docs/reference/mkinpredict.html140
1 files changed, 72 insertions, 68 deletions
diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html
index 2348d40e..327a7d8d 100644
--- a/docs/reference/mkinpredict.html
+++ b/docs/reference/mkinpredict.html
@@ -6,8 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>
- — mkinpredict • mkin</title>
+<title>Produce predictions from a kinetic model using specific parameters — mkinpredict • mkin</title>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
@@ -26,12 +25,14 @@
<script src="../pkgdown.js"></script>
<!-- mathjax -->
-<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<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>
@@ -71,6 +72,9 @@
<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>
@@ -96,8 +100,7 @@
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
- <h1>
-</h1>
+ <h1>Produce predictions from a kinetic model using specific parameters</h1>
</div>
@@ -106,71 +109,72 @@
kinetic parameters and initial values for the state variables.</p>
- <pre><span class='fu'>mkinpredict</span>(<span class='no'>mkinmod</span>, <span class='no'>odeparms</span>, <span class='no'>odeini</span>, <span class='no'>outtimes</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>,
+ <pre class="usage"><span class='fu'>mkinpredict</span>(<span class='no'>mkinmod</span>, <span class='no'>odeparms</span>, <span class='no'>odeini</span>, <span class='no'>outtimes</span>, <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>,
<span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='st'>"auto"</span>, <span class='kw'>method.ode</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>, <span class='kw'>atol</span> <span class='kw'>=</span> <span class='fl'>1e-08</span>, <span class='kw'>rtol</span> <span class='kw'>=</span> <span class='fl'>1e-10</span>,
<span class='kw'>map_output</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
- <dl class="dl-horizontal">
- <dt>mkinmod</dt>
- <dd>
- A kinetic model as produced by <code><a href='mkinmod.html'>mkinmod</a></code>.
- </dd>
- <dt>odeparms</dt>
- <dd>
- A numeric vector specifying the parameters used in the kinetic model, which
- is generally defined as a set of ordinary differential equations.
- </dd>
- <dt>odeini</dt>
- <dd>
- A numeric vectory containing the initial values of the state variables of
+ <table class="ref-arguments">
+ <colgroup><col class="name" /><col class="desc" /></colgroup>
+ <tr>
+ <th>mkinmod</th>
+ <td><p>A kinetic model as produced by <code><a href='mkinmod.html'>mkinmod</a></code>.</p></td>
+ </tr>
+ <tr>
+ <th>odeparms</th>
+ <td><p>A numeric vector specifying the parameters used in the kinetic model, which
+ is generally defined as a set of ordinary differential equations.</p></td>
+ </tr>
+ <tr>
+ <th>odeini</th>
+ <td><p>A numeric vectory containing the initial values of the state variables of
the model. Note that the state variables can differ from the observed
- variables, for example in the case of the SFORB model.
- </dd>
- <dt>outtimes</dt>
- <dd>
- A numeric vector specifying the time points for which model predictions
- should be generated.
- </dd>
- <dt>solution_type</dt>
- <dd>
- The method that should be used for producing the predictions. This should
- generally be &quot;analytical&quot; if there is only one observed variable, and
- usually &quot;deSolve&quot; in the case of several observed variables. The third
- possibility &quot;eigen&quot; is faster but not applicable to some models e.g.
- using FOMC for the parent compound.
- </dd>
- <dt>method.ode</dt>
- <dd>
- The solution method passed via <code>mkinpredict</code> to
- <code>ode</code> in case the solution type is &quot;deSolve&quot;. The default
- &quot;lsoda&quot; is performant, but sometimes fails to converge.
- </dd>
- <dt>use_compiled</dt>
- <dd>
- If set to <code>FALSE</code>, no compiled version of the <code><a href='mkinmod.html'>mkinmod</a></code>
- model is used, even if is present.
- </dd>
- <dt>atol</dt>
- <dd>
- Absolute error tolerance, passed to <code>ode</code>. Default is 1e-8,
- lower than in <code>lsoda</code>.
- </dd>
- <dt>rtol</dt>
- <dd>
- Absolute error tolerance, passed to <code>ode</code>. Default is 1e-10,
- much lower than in <code>lsoda</code>.
- </dd>
- <dt>map_output</dt>
- <dd>
- Boolean to specify if the output should list values for the observed
- variables (default) or for all state variables (if set to FALSE).
- </dd>
- <dt>&#8230;</dt>
- <dd>
- Further arguments passed to the ode solver in case such a solver is used.
- </dd>
- </dl>
+ variables, for example in the case of the SFORB model.</p></td>
+ </tr>
+ <tr>
+ <th>outtimes</th>
+ <td><p>A numeric vector specifying the time points for which model predictions
+ should be generated.</p></td>
+ </tr>
+ <tr>
+ <th>solution_type</th>
+ <td><p>The method that should be used for producing the predictions. This should
+ generally be "analytical" if there is only one observed variable, and
+ usually "deSolve" in the case of several observed variables. The third
+ possibility "eigen" is faster but not applicable to some models e.g.
+ using FOMC for the parent compound.</p></td>
+ </tr>
+ <tr>
+ <th>method.ode</th>
+ <td><p>The solution method passed via <code>mkinpredict</code> to
+ <code>ode</code> in case the solution type is "deSolve". The default
+ "lsoda" is performant, but sometimes fails to converge.</p></td>
+ </tr>
+ <tr>
+ <th>use_compiled</th>
+ <td><p>If set to <code>FALSE</code>, no compiled version of the <code><a href='mkinmod.html'>mkinmod</a></code>
+ model is used, even if is present.</p></td>
+ </tr>
+ <tr>
+ <th>atol</th>
+ <td><p>Absolute error tolerance, passed to <code>ode</code>. Default is 1e-8,
+ lower than in <code>lsoda</code>.</p></td>
+ </tr>
+ <tr>
+ <th>rtol</th>
+ <td><p>Absolute error tolerance, passed to <code>ode</code>. Default is 1e-10,
+ much lower than in <code>lsoda</code>.</p></td>
+ </tr>
+ <tr>
+ <th>map_output</th>
+ <td><p>Boolean to specify if the output should list values for the observed
+ variables (default) or for all state variables (if set to FALSE).</p></td>
+ </tr>
+ <tr>
+ <th>&#8230;</th>
+ <td><p>Further arguments passed to the ode solver in case such a solver is used.</p></td>
+ </tr>
+ </table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
@@ -295,17 +299,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'>#&gt; time parent m1
#&gt; 201 20 4.978707 27.46227</div><div class='output co'>#&gt; user system elapsed
-#&gt; 0.016 0.016 0.004 </div><div class='input'> <span class='fu'>system.time</span>(
+#&gt; 0.004 0.000 0.004 </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'>#&gt; time parent m1
#&gt; 201 20 4.978707 27.46227</div><div class='output co'>#&gt; user system elapsed
-#&gt; 0.016 0.004 0.002 </div><div class='input'> <span class='fu'>system.time</span>(
+#&gt; 0.004 0.000 0.002 </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'>#&gt; time parent m1
#&gt; 201 20 4.978707 27.46227</div><div class='output co'>#&gt; user system elapsed
-#&gt; 0.032 0.000 0.034 </div></pre>
+#&gt; 0.032 0.000 0.033 </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>

Contact - Imprint