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.html47
1 files changed, 20 insertions, 27 deletions
diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html
index 17f38938..035a21f9 100644
--- a/docs/reference/mkinpredict.html
+++ b/docs/reference/mkinpredict.html
@@ -74,7 +74,7 @@ kinetic parameters and initial values for the state variables." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.0.0</span>
</span>
</div>
@@ -123,7 +123,7 @@ kinetic parameters and initial values for the state variables." />
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/jranke/mkin/">
- <span class="fab fa fab fa-github fa-lg"></span>
+ <span class="fab fa-github fa-lg"></span>
</a>
</li>
@@ -151,19 +151,7 @@ kinetic model as specified by <code><a href='mkinmod.html'>mkinmod</a></code>, u
kinetic parameters and initial values for the state variables.</p>
</div>
- <pre class="usage"><span class='fu'>mkinpredict</span><span class='op'>(</span>
- <span class='va'>x</span>,
- <span class='va'>odeparms</span>,
- <span class='va'>odeini</span>,
- outtimes <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span><span class='op'>(</span><span class='fl'>0</span>, <span class='fl'>120</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>,
- solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span>,
- use_compiled <span class='op'>=</span> <span class='st'>"auto"</span>,
- method.ode <span class='op'>=</span> <span class='st'>"lsoda"</span>,
- atol <span class='op'>=</span> <span class='fl'>1e-08</span>,
- rtol <span class='op'>=</span> <span class='fl'>1e-10</span>,
- map_output <span class='op'>=</span> <span class='cn'>TRUE</span>,
- <span class='va'>...</span>
-<span class='op'>)</span>
+ <pre class="usage"><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>x</span>, <span class='va'>odeparms</span>, <span class='va'>odeini</span>, <span class='va'>outtimes</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='co'># S3 method for mkinmod</span>
<span class='fu'>mkinpredict</span><span class='op'>(</span>
@@ -177,6 +165,7 @@ kinetic parameters and initial values for the state variables.</p>
atol <span class='op'>=</span> <span class='fl'>1e-08</span>,
rtol <span class='op'>=</span> <span class='fl'>1e-10</span>,
map_output <span class='op'>=</span> <span class='cn'>TRUE</span>,
+ na_stop <span class='op'>=</span> <span class='cn'>TRUE</span>,
<span class='va'>...</span>
<span class='op'>)</span>
@@ -222,6 +211,11 @@ observed variables, for example in the case of the SFORB model.</p></td>
predictions should be generated.</p></td>
</tr>
<tr>
+ <th>...</th>
+ <td><p>Further arguments passed to the ode solver in case such a
+solver is used.</p></td>
+ </tr>
+ <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
@@ -258,9 +252,8 @@ FALSE). Setting this to FALSE has no effect for analytical solutions,
as these always return mapped output.</p></td>
</tr>
<tr>
- <th>...</th>
- <td><p>Further arguments passed to the ode solver in case such a
-solver is used.</p></td>
+ <th>na_stop</th>
+ <td><p>Should it be an error if deSolve::ode returns NaN values</p></td>
</tr>
</table>
@@ -273,7 +266,7 @@ solver is used.</p></td>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'>
-<span class='va'>SFO</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span>
+<span class='va'>SFO</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span>
<span class='co'># Compare solution types</span>
<span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_degradinol <span class='op'>=</span> <span class='fl'>0.3</span><span class='op'>)</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>degradinol <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, <span class='fl'>0</span><span class='op'>:</span><span class='fl'>20</span>,
solution_type <span class='op'>=</span> <span class='st'>"analytical"</span><span class='op'>)</span>
@@ -395,7 +388,7 @@ solver is used.</p></td>
<span class='co'># Comparison of the performance of solution types</span>
<span class='va'>SFO_SFO</span> <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span>, to <span class='op'>=</span> <span class='st'>"m1"</span><span class='op'>)</span>,
m1 <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>type <span class='op'>=</span> <span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span><span class='op'>)</span>
-</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='kw'>if</span><span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='va'><a href='http://rbenchmark.googlecode.com'>rbenchmark</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
+</div><div class='output co'>#&gt; <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'><span class='kw'>if</span><span class='op'>(</span><span class='kw'><a href='https://rdrr.io/r/base/library.html'>require</a></span><span class='op'>(</span><span class='va'><a href='http://rbenchmark.googlecode.com'>rbenchmark</a></span><span class='op'>)</span><span class='op'>)</span> <span class='op'>{</span>
<span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span><span class='op'>(</span>replications <span class='op'>=</span> <span class='fl'>10</span>, order <span class='op'>=</span> <span class='st'>"relative"</span>, columns <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"test"</span>, <span class='st'>"relative"</span>, <span class='st'>"elapsed"</span><span class='op'>)</span>,
eigen <span class='op'>=</span> <span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>SFO_SFO</span>,
<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent <span class='op'>=</span> <span class='fl'>0.15</span>, f_parent_to_m1 <span class='op'>=</span> <span class='fl'>0.5</span>, k_m1 <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span>,
@@ -415,10 +408,10 @@ solver is used.</p></td>
solution_type <span class='op'>=</span> <span class='st'>"analytical"</span>, use_compiled <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span><span class='op'>)</span>
<span class='op'>}</span>
</div><div class='output co'>#&gt; test relative elapsed
+#&gt; 2 deSolve_compiled 1.0 0.005
#&gt; 4 analytical 1.0 0.005
-#&gt; 2 deSolve_compiled 1.2 0.006
#&gt; 1 eigen 4.0 0.020
-#&gt; 3 deSolve 45.6 0.228</div><div class='input'>
+#&gt; 3 deSolve 44.6 0.223</div><div class='input'>
<span class='co'># \dontrun{</span>
<span class='co'># Predict from a fitted model</span>
<span class='va'>f</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span><span class='op'>(</span><span class='va'>SFO_SFO</span>, <span class='va'>FOCUS_2006_C</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
@@ -426,11 +419,11 @@ solver is used.</p></td>
<span class='fu'><a href='https://rdrr.io/r/utils/head.html'>head</a></span><span class='op'>(</span><span class='fu'>mkinpredict</span><span class='op'>(</span><span class='va'>f</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; time parent m1
#&gt; 0 0.0 82.49216 0.000000
-#&gt; 0.1 0.1 80.00562 1.236198
-#&gt; 0.2 0.2 77.59404 2.422818
-#&gt; 0.3 0.3 75.25514 3.561476
-#&gt; 0.4 0.4 72.98675 4.653740
-#&gt; 0.5 0.5 70.78673 5.701130</div><div class='input'><span class='co'># }</span>
+#&gt; 0.1 0.1 80.00562 1.236394
+#&gt; 0.2 0.2 77.59404 2.423201
+#&gt; 0.3 0.3 75.25514 3.562040
+#&gt; 0.4 0.4 72.98675 4.654478
+#&gt; 0.5 0.5 70.78673 5.702033</div><div class='input'><span class='co'># }</span>
</div></pre>
</div>

Contact - Imprint