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.html48
1 files changed, 35 insertions, 13 deletions
diff --git a/docs/reference/mkinpredict.html b/docs/reference/mkinpredict.html
index 689fb7c7..21c13156 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.49.11</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50</span>
</span>
</div>
@@ -268,8 +268,29 @@ solver is used.</p></td>
<pre class="examples"><div class='input'>
<span class='no'>SFO</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>))
<span class='co'># Compare solution types</span>
-<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
- <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)</div><div class='output co'>#&gt; <span class='error'>Error in (function (t, parent_0, k) { parent = parent_0 * exp(-k * t)})(t = 0:20, parent.0 = c(degradinol = 100), k = 0.3): unbenutztes Argument (parent.0 = 100)</span></div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)</div><div class='output co'>#&gt; time degradinol
+#&gt; 1 0 100.0000000
+#&gt; 2 1 74.0818221
+#&gt; 3 2 54.8811636
+#&gt; 4 3 40.6569660
+#&gt; 5 4 30.1194212
+#&gt; 6 5 22.3130160
+#&gt; 7 6 16.5298888
+#&gt; 8 7 12.2456428
+#&gt; 9 8 9.0717953
+#&gt; 10 9 6.7205513
+#&gt; 11 10 4.9787068
+#&gt; 12 11 3.6883167
+#&gt; 13 12 2.7323722
+#&gt; 14 13 2.0241911
+#&gt; 15 14 1.4995577
+#&gt; 16 15 1.1108997
+#&gt; 17 16 0.8229747
+#&gt; 18 17 0.6096747
+#&gt; 19 18 0.4516581
+#&gt; 20 19 0.3345965
+#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
<span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)</div><div class='output co'>#&gt; time degradinol
#&gt; 1 0 100.0000000
#&gt; 2 1 74.0818221
@@ -291,7 +312,7 @@ solver is used.</p></td>
#&gt; 18 17 0.6096747
#&gt; 19 18 0.4516581
#&gt; 20 19 0.3345965
-#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
<span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>, <span class='kw'>use_compiled</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</div><div class='output co'>#&gt; time degradinol
#&gt; 1 0 100.0000000
#&gt; 2 1 74.0818221
@@ -313,7 +334,7 @@ solver is used.</p></td>
#&gt; 18 17 0.6096747
#&gt; 19 18 0.4516581
#&gt; 20 19 0.3345965
-#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
<span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)</div><div class='output co'>#&gt; time degradinol
#&gt; 1 0 100.0000000
#&gt; 2 1 74.0818221
@@ -337,25 +358,26 @@ solver is used.</p></td>
#&gt; 20 19 0.3345965
#&gt; 21 20 0.2478752</div><div class='input'>
<span class='co'># Compare integration methods to analytical solution</span>
-<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
- <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; <span class='error'>Error in (function (t, parent_0, k) { parent = parent_0 * exp(-k * t)})(t = 0:20, parent.0 = c(degradinol = 100), k = 0.3): unbenutztes Argument (parent.0 = 100)</span></div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+ <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; time degradinol
+#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
<span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"lsoda"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; time degradinol
-#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
<span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"ode45"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; time degradinol
-#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
+#&gt; 21 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>), <span class='fl'>0</span>:<span class='fl'>20</span>,
<span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"rk4"</span>)[<span class='fl'>21</span>,]</div><div class='output co'>#&gt; time degradinol
#&gt; 21 20 0.2480043</div><div class='input'><span class='co'># rk4 is not as precise here</span>
<span class='co'># The number of output times used to make a lot of difference until the</span>
<span class='co'># default for atol was adjusted</span>
-<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>),
+<span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>),
<span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>))[<span class='fl'>201</span>,]</div><div class='output co'>#&gt; time degradinol
-#&gt; 201 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol_sink</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>),
+#&gt; 201 20 0.2478752</div><div class='input'><span class='fu'>mkinpredict</span>(<span class='no'>SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_degradinol</span> <span class='kw'>=</span> <span class='fl'>0.3</span>), <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>degradinol</span> <span class='kw'>=</span> <span class='fl'>100</span>),
<span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.01</span>))[<span class='fl'>2001</span>,]</div><div class='output co'>#&gt; time degradinol
#&gt; 2001 20 0.2478752</div><div class='input'>
<span class='co'># Check compiled model versions - they are faster than the eigenvalue based solutions!</span>
<span class='no'>SFO_SFO</span> <span class='kw'>=</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>, <span class='kw'>to</span> <span class='kw'>=</span> <span class='st'>"m1"</span>),
- <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>))</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='kw'>if</span>(<span class='fu'><a href='https://rdrr.io/r/base/library.html'>require</a></span>(<span class='no'>rbenchmark</span>)) {
+ <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>type</span> <span class='kw'>=</span> <span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"min"</span>)</div><div class='output co'>#&gt; <span class='message'>Successfully compiled differential equation model from auto-generated C code.</span></div><div class='input'><span class='kw'>if</span>(<span class='fu'><a href='https://rdrr.io/r/base/library.html'>require</a></span>(<span class='no'>rbenchmark</span>)) {
<span class='fu'><a href='https://rdrr.io/pkg/rbenchmark/man/benchmark.html'>benchmark</a></span>(
<span class='kw'>eigen</span> <span class='kw'>=</span> <span class='fu'>mkinpredict</span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent_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'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fl'>0</span>), <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>20</span>, <span class='kw'>by</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
@@ -371,7 +393,7 @@ solver is used.</p></td>
}</div><div class='output co'>#&gt; <span class='message'>Lade nötiges Paket: rbenchmark</span></div><div class='output co'>#&gt; test replications elapsed relative user.self sys.self user.child
#&gt; 3 deSolve 10 0.229 28.625 0.229 0 0
#&gt; 2 deSolve_compiled 10 0.008 1.000 0.008 0 0
-#&gt; 1 eigen 10 0.025 3.125 0.026 0 0
+#&gt; 1 eigen 10 0.026 3.250 0.025 0 0
#&gt; sys.child
#&gt; 3 0
#&gt; 2 0

Contact - Imprint