aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-11-07 13:31:57 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-11-07 13:31:57 +0100
commit37cb2b4b793fa699d033632158e3604c37678c20 (patch)
tree4774c0f113ea2fb71285f4eb96e093aa1bfe406c /docs
parent2e37905a7bf0d72751ee7326ef05a268989e49b2 (diff)
Update static docs for dev version
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/pkgdown.yml2
-rw-r--r--docs/dev/reference/Rplot002.pngbin17289 -> 57363 bytes
-rw-r--r--docs/dev/reference/index.html12
-rw-r--r--docs/dev/reference/mkinpredict.html203
-rw-r--r--docs/dev/reference/plot.nlme.mmkin-1.pngbin86071 -> 86076 bytes
-rw-r--r--docs/dev/reference/plot.nlme.mmkin-2.pngbin164499 -> 164488 bytes
-rw-r--r--docs/dev/reference/saem.html316
-rw-r--r--docs/dev/reference/summary.mkinfit.html26
-rw-r--r--docs/dev/reference/summary.nlme.mmkin.html12
9 files changed, 450 insertions, 121 deletions
diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml
index e5410fd5..aebac46b 100644
--- a/docs/dev/pkgdown.yml
+++ b/docs/dev/pkgdown.yml
@@ -10,7 +10,7 @@ articles:
web_only/NAFTA_examples: NAFTA_examples.html
web_only/benchmarks: benchmarks.html
web_only/compiled_models: compiled_models.html
-last_built: 2020-11-07T11:42Z
+last_built: 2020-11-07T12:14Z
urls:
reference: https://pkgdown.jrwb.de/mkin/reference
article: https://pkgdown.jrwb.de/mkin/articles
diff --git a/docs/dev/reference/Rplot002.png b/docs/dev/reference/Rplot002.png
index a33ecd71..8ada7133 100644
--- a/docs/dev/reference/Rplot002.png
+++ b/docs/dev/reference/Rplot002.png
Binary files differ
diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html
index fa3ec868..f1884d2b 100644
--- a/docs/dev/reference/index.html
+++ b/docs/dev/reference/index.html
@@ -337,21 +337,21 @@ of an mmkin object</p></td>
</tr><tr>
<td>
- <p><code><a href="nlme.html">nlme_function()</a></code> <code><a href="nlme.html">mean_degparms()</a></code> <code><a href="nlme.html">nlme_data()</a></code> </p>
+ <p><code><a href="saem.html">saem()</a></code> <code><a href="saem.html">saemix_model()</a></code> <code><a href="saem.html">saemix_data()</a></code> </p>
</td>
- <td><p>Helper functions to create nlme models from mmkin row objects</p></td>
+ <td><p>Fit nonlinear mixed models with SAEM</p></td>
</tr><tr>
<td>
- <p><code><a href="get_deg_func.html">get_deg_func()</a></code> </p>
+ <p><code><a href="nlme.html">nlme_function()</a></code> <code><a href="nlme.html">mean_degparms()</a></code> <code><a href="nlme.html">nlme_data()</a></code> </p>
</td>
- <td><p>Retrieve a degradation function from the mmkin namespace</p></td>
+ <td><p>Helper functions to create nlme models from mmkin row objects</p></td>
</tr><tr>
<td>
- <p><code><a href="saemix.html">saemix_model()</a></code> <code><a href="saemix.html">saemix_data()</a></code> </p>
+ <p><code><a href="get_deg_func.html">get_deg_func()</a></code> </p>
</td>
- <td><p>Create saemix models from mmkin row objects</p></td>
+ <td><p>Retrieve a degradation function from the mmkin namespace</p></td>
</tr>
</tbody><tbody>
<tr>
diff --git a/docs/dev/reference/mkinpredict.html b/docs/dev/reference/mkinpredict.html
index 15699c02..7d522eb1 100644
--- a/docs/dev/reference/mkinpredict.html
+++ b/docs/dev/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-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.4</span>
</span>
</div>
@@ -122,7 +122,7 @@ kinetic parameters and initial values for the state variables." />
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
- <a href="http://github.com/jranke/mkin/">
+ <a href="https://github.com/jranke/mkin/">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
@@ -141,7 +141,7 @@ kinetic parameters and initial values for the state variables." />
<div class="col-md-9 contents">
<div class="page-header">
<h1>Produce predictions from a kinetic model using specific parameters</h1>
- <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/mkinpredict.R'><code>R/mkinpredict.R</code></a></small>
+ <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/mkinpredict.R'><code>R/mkinpredict.R</code></a></small>
<div class="hidden name"><code>mkinpredict.Rd</code></div>
</div>
@@ -151,49 +151,38 @@ 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='no'>x</span>,
- <span class='no'>odeparms</span>,
- <span class='no'>odeini</span>,
- <span class='kw'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</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='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 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='no'>x</span>,
- <span class='kw'>odeparms</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>),
- <span class='kw'>odeini</span> <span class='kw'>=</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'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</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='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>
-)
+<span class='fu'>mkinpredict</span><span class='op'>(</span>
+ <span class='va'>x</span>,
+ odeparms <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>k_parent_sink <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span>,
+ odeini <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</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>,
+ na_stop <span class='op'>=</span> <span class='cn'>TRUE</span>,
+ <span class='va'>...</span>
+<span class='op'>)</span>
<span class='co'># S3 method for mkinfit</span>
-<span class='fu'>mkinpredict</span>(
- <span class='no'>x</span>,
- <span class='kw'>odeparms</span> <span class='kw'>=</span> <span class='no'>x</span>$<span class='no'>bparms.ode</span>,
- <span class='kw'>odeini</span> <span class='kw'>=</span> <span class='no'>x</span>$<span class='no'>bparms.state</span>,
- <span class='kw'>outtimes</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/seq.html'>seq</a></span>(<span class='fl'>0</span>, <span class='fl'>120</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='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>
+<span class='fu'>mkinpredict</span><span class='op'>(</span>
+ <span class='va'>x</span>,
+ odeparms <span class='op'>=</span> <span class='va'>x</span><span class='op'>$</span><span class='va'>bparms.ode</span>,
+ odeini <span class='op'>=</span> <span class='va'>x</span><span class='op'>$</span><span class='va'>bparms.state</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>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@@ -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,22 +252,25 @@ 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>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A matrix with the numeric solution in wide format</p>
+ <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2>
+
+ <p>Johannes Ranke</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<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='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='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</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
+<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>
+</div><div class='output co'>#&gt; time degradinol
#&gt; 0 0 100.0000000
#&gt; 1 1 74.0818221
#&gt; 2 2 54.8811636
@@ -294,8 +291,9 @@ solver is used.</p></td>
#&gt; 17 17 0.6096747
#&gt; 18 18 0.4516581
#&gt; 19 19 0.3345965
-#&gt; 20 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; 20 20 0.2478752</div><div class='input'><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'>"deSolve"</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; time degradinol
#&gt; 0 0 100.0000000
#&gt; 1 1 74.0818221
#&gt; 2 2 54.8811636
@@ -316,8 +314,9 @@ solver is used.</p></td>
#&gt; 17 17 0.6096747
#&gt; 18 18 0.4516581
#&gt; 19 19 0.3345965
-#&gt; 20 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; 20 20 0.2478752</div><div class='input'><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'>"deSolve"</span>, use_compiled <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; time degradinol
#&gt; 0 0 100.0000000
#&gt; 1 1 74.0818221
#&gt; 2 2 54.8811636
@@ -338,8 +337,9 @@ solver is used.</p></td>
#&gt; 17 17 0.6096747
#&gt; 18 18 0.4516581
#&gt; 19 19 0.3345965
-#&gt; 20 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; 20 20 0.2478752</div><div class='input'><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'>"eigen"</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; time degradinol
#&gt; 0 0 100.0000000
#&gt; 1 1 74.0818221
#&gt; 2 2 54.8811636
@@ -362,59 +362,68 @@ solver is used.</p></td>
#&gt; 19 19 0.3345965
#&gt; 20 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</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; 20.0000000 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; 20.0000000 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; 20.0000000 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
+<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><span class='op'>[</span><span class='fl'>21</span>,<span class='op'>]</span>
+</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'><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>,
+ method <span class='op'>=</span> <span class='st'>"lsoda"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>21</span>,<span class='op'>]</span>
+</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'><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>,
+ method <span class='op'>=</span> <span class='st'>"ode45"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>21</span>,<span class='op'>]</span>
+</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'><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>,
+ method <span class='op'>=</span> <span class='st'>"rk4"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>21</span>,<span class='op'>]</span>
+</div><div class='output co'>#&gt; time degradinol
#&gt; 20.0000000 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</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; 20.0000000 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
+<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='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'>20</span>, by <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span>
+</div><div class='output co'>#&gt; time degradinol
+#&gt; 20.0000000 0.2478752 </div><div class='input'><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='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'>20</span>, by <span class='op'>=</span> <span class='fl'>0.01</span><span class='op'>)</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>2001</span>,<span class='op'>]</span>
+</div><div class='output co'>#&gt; time degradinol
#&gt; 20.0000000 0.2478752 </div><div class='input'>
<span class='co'># Comparison of the performance of solution types</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>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</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'>replications</span> <span class='kw'>=</span> <span class='fl'>10</span>, <span class='kw'>order</span> <span class='kw'>=</span> <span class='st'>"relative"</span>, <span class='kw'>columns</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"test"</span>, <span class='st'>"relative"</span>, <span class='st'>"elapsed"</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</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</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>),
- <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"eigen"</span>)[<span class='fl'>201</span>,],
- <span class='kw'>deSolve_compiled</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</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</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>),
- <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)[<span class='fl'>201</span>,],
- <span class='kw'>deSolve</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</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</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>),
- <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>,],
- <span class='kw'>analytical</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</span> <span class='kw'>=</span> <span class='fl'>0.15</span>, <span class='kw'>f_parent_to_m1</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>k_m1</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>),
- <span class='kw'>solution_type</span> <span class='kw'>=</span> <span class='st'>"analytical"</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; test relative elapsed
+<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>
+ <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>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, m1 <span class='op'>=</span> <span class='fl'>0</span><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'>20</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'>"eigen"</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span>,
+ deSolve_compiled <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>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, m1 <span class='op'>=</span> <span class='fl'>0</span><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'>20</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><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span>,
+ deSolve <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>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, m1 <span class='op'>=</span> <span class='fl'>0</span><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'>20</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='cn'>FALSE</span><span class='op'>)</span><span class='op'>[</span><span class='fl'>201</span>,<span class='op'>]</span>,
+ analytical <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>,
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span>, m1 <span class='op'>=</span> <span class='fl'>0</span><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'>20</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'>"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; <span class='message'>Loading required package: rbenchmark</span></div><div class='output co'>#&gt; test relative elapsed
#&gt; 2 deSolve_compiled 1.0 0.005
-#&gt; 4 analytical 1.8 0.009
#&gt; 1 eigen 4.0 0.020
-#&gt; 3 deSolve 44.6 0.223</div><div class='input'>
+#&gt; 4 analytical 4.0 0.020
+#&gt; 3 deSolve 45.6 0.228</div><div class='input'>
<span class='co'># \dontrun{</span>
<span class='co'># Predict from a fitted model</span>
- <span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</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'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</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'>solution_type</span> <span class='kw'>=</span> <span class='st'>"deSolve"</span>)
- <span class='fu'><a href='https://rdrr.io/r/utils/head.html'>head</a></span>(<span class='fu'>mkinpredict</span>(<span class='no'>f</span>))</div><div class='output co'>#&gt; time parent m1
+ <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>
+ <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>, solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span><span class='op'>)</span>
+ <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'># }
+#&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>
@@ -432,7 +441,7 @@ solver is used.</p></td>
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
</div>
</footer>
diff --git a/docs/dev/reference/plot.nlme.mmkin-1.png b/docs/dev/reference/plot.nlme.mmkin-1.png
index 91e3ca52..5cb33214 100644
--- a/docs/dev/reference/plot.nlme.mmkin-1.png
+++ b/docs/dev/reference/plot.nlme.mmkin-1.png
Binary files differ
diff --git a/docs/dev/reference/plot.nlme.mmkin-2.png b/docs/dev/reference/plot.nlme.mmkin-2.png
index 7b59b947..c0d67204 100644
--- a/docs/dev/reference/plot.nlme.mmkin-2.png
+++ b/docs/dev/reference/plot.nlme.mmkin-2.png
Binary files differ
diff --git a/docs/dev/reference/saem.html b/docs/dev/reference/saem.html
new file mode 100644
index 00000000..f883eb11
--- /dev/null
+++ b/docs/dev/reference/saem.html
@@ -0,0 +1,316 @@
+<!-- Generated by pkgdown: do not edit by hand -->
+<!DOCTYPE html>
+<html lang="en">
+ <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>Fit nonlinear mixed models with SAEM — saem • mkin</title>
+
+
+<!-- jquery -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
+<!-- Bootstrap -->
+
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />
+
+<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
+
+<!-- bootstrap-toc -->
+<link rel="stylesheet" href="../bootstrap-toc.css">
+<script src="../bootstrap-toc.js"></script>
+
+<!-- Font Awesome icons -->
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
+<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
+
+<!-- clipboard.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
+
+<!-- headroom.js -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
+
+<!-- pkgdown -->
+<link href="../pkgdown.css" rel="stylesheet">
+<script src="../pkgdown.js"></script>
+
+
+
+
+<meta property="og:title" content="Fit nonlinear mixed models with SAEM — saem" />
+<meta property="og:description" content="This function uses saemix::saemix() as a backend for fitting nonlinear mixed
+effects models created from mmkin row objects using the stochastic approximation
+to the expectation maximisation algorithm (SAEM)." />
+
+
+<meta name="robots" content="noindex">
+
+<!-- mathjax -->
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
+<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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 data-spy="scroll" data-target="#toc">
+ <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" aria-expanded="false">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <span class="navbar-brand">
+ <a class="navbar-link" href="../index.html">mkin</a>
+ <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.4</span>
+ </span>
+ </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/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/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>
+ <li>
+ <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
+ </li>
+ <li>
+ <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
+ </li>
+ </ul>
+</li>
+<li>
+ <a href="../news/index.html">News</a>
+</li>
+ </ul>
+ <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>
+
+ </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>Fit nonlinear mixed models with SAEM</h1>
+ <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/saemix.R'><code>R/saemix.R</code></a></small>
+ <div class="hidden name"><code>saem.Rd</code></div>
+ </div>
+
+ <div class="ref-description">
+ <p>This function uses <code><a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix::saemix()</a></code> as a backend for fitting nonlinear mixed
+effects models created from <a href='mmkin.html'>mmkin</a> row objects using the stochastic approximation
+to the expectation maximisation algorithm (SAEM).</p>
+ </div>
+
+ <pre class="usage"><span class='fu'>saem</span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>control</span>, <span class='va'>...</span><span class='op'>)</span>
+
+<span class='co'># S3 method for mmkin</span>
+<span class='fu'>saem</span><span class='op'>(</span>
+ <span class='va'>object</span>,
+ control <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>displayProgress <span class='op'>=</span> <span class='cn'>FALSE</span>, print <span class='op'>=</span> <span class='cn'>FALSE</span>, save <span class='op'>=</span> <span class='cn'>FALSE</span>, save.graphs <span class='op'>=</span>
+ <span class='cn'>FALSE</span><span class='op'>)</span>,
+ cores <span class='op'>=</span> <span class='fl'>1</span>,
+ verbose <span class='op'>=</span> <span class='cn'>FALSE</span>,
+ suppressPlot <span class='op'>=</span> <span class='cn'>TRUE</span>,
+ <span class='va'>...</span>
+<span class='op'>)</span>
+
+<span class='fu'>saemix_model</span><span class='op'>(</span><span class='va'>object</span>, cores <span class='op'>=</span> <span class='fl'>1</span>, verbose <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span>
+
+<span class='fu'>saemix_data</span><span class='op'>(</span><span class='va'>object</span>, verbose <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</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>object</th>
+ <td><p>An <a href='mmkin.html'>mmkin</a> row object containing several fits of the same
+<a href='mkinmod.html'>mkinmod</a> model to different datasets</p></td>
+ </tr>
+ <tr>
+ <th>control</th>
+ <td><p>Passed to <a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix::saemix</a></p></td>
+ </tr>
+ <tr>
+ <th>...</th>
+ <td><p>Further parameters passed to <a href='https://rdrr.io/pkg/saemix/man/saemixData.html'>saemix::saemixData</a>
+and <a href='https://rdrr.io/pkg/saemix/man/saemixModel.html'>saemix::saemixModel</a>.</p></td>
+ </tr>
+ <tr>
+ <th>cores</th>
+ <td><p>The number of cores to be used for multicore processing using
+<code><a href='https://rdrr.io/r/parallel/mclapply.html'>parallel::mclapply()</a></code>. Using more than 1 core is experimental and may
+lead to uncontrolled forking, apparently depending on the BLAS version
+used.</p></td>
+ </tr>
+ <tr>
+ <th>verbose</th>
+ <td><p>Should we print information about created objects?</p></td>
+ </tr>
+ <tr>
+ <th>suppressPlot</th>
+ <td><p>Should we suppress any plotting that is done
+by the saemix function?</p></td>
+ </tr>
+ </table>
+
+ <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
+
+ <p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixObject-class.html'>saemix::SaemixObject</a>.</p>
+<p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixModel-class.html'>saemix::SaemixModel</a> object.</p>
+<p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixData-class.html'>saemix::SaemixData</a> object.</p>
+ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
+
+ <p>An mmkin row object is essentially a list of mkinfit objects that have been
+obtained by fitting the same model to a list of datasets using <a href='mkinfit.html'>mkinfit</a>.</p>
+<p>Starting values for the fixed effects (population mean parameters, argument
+psi0 of <code><a href='https://rdrr.io/pkg/saemix/man/saemixModel.html'>saemix::saemixModel()</a></code> are the mean values of the parameters found
+using <a href='mmkin.html'>mmkin</a>.</p>
+
+ <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
+ <pre class="examples"><div class='input'><span class='co'># \dontrun{</span>
+<span class='va'>ds</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>experimental_data_for_UBA_2019</span><span class='op'>[</span><span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>]</span>,
+ <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>$</span><span class='va'>data</span><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'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span><span class='op'>)</span><span class='op'>]</span><span class='op'>)</span><span class='op'>)</span>
+<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>ds</span><span class='op'>)</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span><span class='op'>(</span><span class='st'>"Dataset"</span>, <span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>)</span>
+<span class='va'>f_mmkin_parent_p0_fixed</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='va'>ds</span>, cores <span class='op'>=</span> <span class='fl'>1</span>,
+ state.ini <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, fixed_initials <span class='op'>=</span> <span class='st'>"parent"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+<span class='va'>f_saem_p0_fixed</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent_p0_fixed</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Sat Nov 7 13:14:50 2020"
+#&gt; ....
+#&gt; Minimisation finished
+#&gt; [1] "Sat Nov 7 13:14:52 2020"</div><div class='input'>
+<span class='va'>f_mmkin_parent</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><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'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span><span class='op'>)</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+<span class='va'>f_saem_sfo</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"SFO"</span>, <span class='op'>]</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Sat Nov 7 13:14:53 2020"
+#&gt; ....
+#&gt; Minimisation finished
+#&gt; [1] "Sat Nov 7 13:14:55 2020"</div><div class='input'><span class='va'>f_saem_fomc</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Sat Nov 7 13:14:55 2020"
+#&gt; ....
+#&gt; Minimisation finished
+#&gt; [1] "Sat Nov 7 13:14:57 2020"</div><div class='input'><span class='va'>f_saem_dfop</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"DFOP"</span>, <span class='op'>]</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Sat Nov 7 13:14:57 2020"
+#&gt; ....
+#&gt; Minimisation finished
+#&gt; [1] "Sat Nov 7 13:15:00 2020"</div><div class='input'>
+<span class='co'># The returned saem.mmkin object contains an SaemixObject, we can use</span>
+<span class='co'># functions from saemix</span>
+<span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'>saemix</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; <span class='message'>Package saemix, version 3.1.9000</span>
+#&gt; <span class='message'> please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='va'>f_saem_sfo</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_dfop</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Likelihoods computed by importance sampling </div><div class='output co'>#&gt; AIC BIC
+#&gt; 1 624.2428 622.2900
+#&gt; 2 467.7644 465.0305
+#&gt; 3 491.3541 487.8391</div><div class='input'>
+<span class='va'>f_mmkin_parent_tc</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span><span class='op'>(</span><span class='va'>f_mmkin_parent</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span>
+<span class='va'>f_saem_fomc_tc</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent_tc</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Sat Nov 7 13:15:02 2020"
+#&gt; ....
+#&gt; Minimisation finished
+#&gt; [1] "Sat Nov 7 13:15:07 2020"</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_fomc_tc</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Likelihoods computed by importance sampling </div><div class='output co'>#&gt; AIC BIC
+#&gt; 1 467.7644 465.0305
+#&gt; 2 469.4862 466.3617</div><div class='input'>
+<span class='va'>dfop_sfo</span> <span class='op'>&lt;-</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='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"DFOP"</span>, <span class='st'>"A1"</span><span class='op'>)</span>,
+ A1 <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>
+</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='va'>f_mmkin</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"DFOP-SFO"</span> <span class='op'>=</span> <span class='va'>dfop_sfo</span><span class='op'>)</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, solution_type <span class='op'>=</span> <span class='st'>"analytical"</span><span class='op'>)</span>
+<span class='co'># This takes about 4 minutes on my system</span>
+<span class='va'>f_saem</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Sat Nov 7 13:15:08 2020"
+#&gt; ....
+#&gt; Minimisation finished
+#&gt; [1] "Sat Nov 7 13:19:07 2020"</div><div class='input'>
+<span class='va'>f_mmkin_des</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"DFOP-SFO"</span> <span class='op'>=</span> <span class='va'>dfop_sfo</span><span class='op'>)</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, solution_type <span class='op'>=</span> <span class='st'>"deSolve"</span><span class='op'>)</span>
+<span class='co'># Using a single core, the following takes about 6 minutes, using 10 cores</span>
+<span class='co'># it is slower instead of faster</span>
+<span class='va'>f_saem_des</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_des</span>, cores <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Sat Nov 7 13:19:26 2020"
+#&gt; ....
+#&gt; Minimisation finished
+#&gt; [1] "Sat Nov 7 13:27:33 2020"</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='va'>f_saemix</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saemix_des</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; <span class='error'>Error in compare.saemix(list(f_saemix$so, f_saemix_des$so)): object 'f_saemix' not found</span></div><div class='input'><span class='co'># }</span>
+</div></pre>
+ </div>
+ <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
+ <nav id="toc" data-toggle="toc" class="sticky-top">
+ <h2 data-toc-skip>Contents</h2>
+ </nav>
+ </div>
+</div>
+
+
+ <footer>
+ <div class="copyright">
+ <p>Developed by Johannes Ranke.</p>
+</div>
+
+<div class="pkgdown">
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
+</div>
+
+ </footer>
+ </div>
+
+
+
+
+ </body>
+</html>
+
+
diff --git a/docs/dev/reference/summary.mkinfit.html b/docs/dev/reference/summary.mkinfit.html
index f971fdf4..2113a001 100644
--- a/docs/dev/reference/summary.mkinfit.html
+++ b/docs/dev/reference/summary.mkinfit.html
@@ -76,7 +76,7 @@ values." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.3</span>
+ <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.4</span>
</span>
</div>
@@ -124,7 +124,7 @@ values." />
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
- <a href="http://github.com/jranke/mkin/">
+ <a href="https://github.com/jranke/mkin/">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
@@ -143,7 +143,7 @@ values." />
<div class="col-md-9 contents">
<div class="page-header">
<h1>Summary method for class "mkinfit"</h1>
- <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/summary.mkinfit.R'><code>R/summary.mkinfit.R</code></a></small>
+ <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/summary.mkinfit.R'><code>R/summary.mkinfit.R</code></a></small>
<div class="hidden name"><code>summary.mkinfit.Rd</code></div>
</div>
@@ -156,10 +156,10 @@ values.</p>
</div>
<pre class="usage"><span class='co'># S3 method for mkinfit</span>
-<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span>(<span class='no'>object</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>distimes</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>alpha</span> <span class='kw'>=</span> <span class='fl'>0.05</span>, <span class='no'>...</span>)
+<span class='fu'><a href='https://rdrr.io/pkg/saemix/man/summary-methods.html'>summary</a></span><span class='op'>(</span><span class='va'>object</span>, data <span class='op'>=</span> <span class='cn'>TRUE</span>, distimes <span class='op'>=</span> <span class='cn'>TRUE</span>, alpha <span class='op'>=</span> <span class='fl'>0.05</span>, <span class='va'>...</span><span class='op'>)</span>
<span class='co'># S3 method for summary.mkinfit</span>
-<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='kw'>digits</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span>(<span class='fl'>3</span>, <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span>(<span class='st'>"digits"</span>) - <span class='fl'>3</span>), <span class='no'>...</span>)</pre>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>x</span>, digits <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Extremes.html'>max</a></span><span class='op'>(</span><span class='fl'>3</span>, <span class='fu'><a href='https://rdrr.io/r/base/options.html'>getOption</a></span><span class='op'>(</span><span class='st'>"digits"</span><span class='op'>)</span> <span class='op'>-</span> <span class='fl'>3</span><span class='op'>)</span>, <span class='va'>...</span><span class='op'>)</span></pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
@@ -229,20 +229,24 @@ and Degradation Kinetics from Environmental Fate Studies on Pesticides in
EU Registration&#8221; 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="author"><a class="anchor" href="#author"></a>Author</h2>
+
+ <p>Johannes Ranke</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'>
- <span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></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'>#&gt; mkin version used for fitting: 0.9.50.3
-#&gt; R version used for fitting: 4.0.2
-#&gt; Date of fit: Thu Oct 8 09:13:59 2020
-#&gt; Date of summary: Thu Oct 8 09:13:59 2020
+ <span class='fu'><a href='https://rdrr.io/pkg/saemix/man/summary-methods.html'>summary</a></span><span class='op'>(</span><span class='fu'><a href='mkinfit.html'>mkinfit</a></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='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'>FOCUS_2006_A</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; mkin version used for fitting: 0.9.50.4
+#&gt; R version used for fitting: 4.0.3
+#&gt; Date of fit: Sat Nov 7 13:28:04 2020
+#&gt; Date of summary: Sat Nov 7 13:28:04 2020
#&gt;
#&gt; Equations:
#&gt; d_parent/dt = - k_parent * parent
#&gt;
#&gt; Model predictions using solution type analytical
#&gt;
-#&gt; Fitted using 131 model solutions performed in 0.027 s
+#&gt; Fitted using 131 model solutions performed in 0.028 s
#&gt;
#&gt; Error model: Constant variance
#&gt;
@@ -322,7 +326,7 @@ EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
</div>
</footer>
diff --git a/docs/dev/reference/summary.nlme.mmkin.html b/docs/dev/reference/summary.nlme.mmkin.html
index 38f53122..d35e8713 100644
--- a/docs/dev/reference/summary.nlme.mmkin.html
+++ b/docs/dev/reference/summary.nlme.mmkin.html
@@ -156,7 +156,7 @@ endpoints such as formation fractions and DT50 values. Optionally
</div>
<pre class="usage"><span class='co'># S3 method for nlme.mmkin</span>
-<span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span>
+<span class='fu'><a href='https://rdrr.io/pkg/saemix/man/summary-methods.html'>summary</a></span><span class='op'>(</span>
<span class='va'>object</span>,
data <span class='op'>=</span> <span class='cn'>FALSE</span>,
verbose <span class='op'>=</span> <span class='cn'>FALSE</span>,
@@ -260,13 +260,13 @@ José Pinheiro and Douglas Bates for the components inherited from nlme</p>
<span class='co'># Evaluate using mmkin and nlme</span>
<span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://svn.r-project.org/R-packages/trunk/nlme/'>nlme</a></span><span class='op'>)</span>
<span class='va'>f_mmkin</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='va'>ds_sfo_syn</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span>, cores <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span>
-</div><div class='output co'>#&gt; <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.00371</span></div><div class='input'><span class='va'>f_nlme</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>)</span>
-</div><div class='output co'>#&gt; <span class='warning'>Warning: Iteration 3, LME step: nlminb() did not converge (code = 1). PORT message: false convergence (8)</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/r/base/summary.html'>summary</a></span><span class='op'>(</span><span class='va'>f_nlme</span>, data <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+<span class='va'>f_nlme</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; <span class='warning'>Warning: Iteration 3, LME step: nlminb() did not converge (code = 1). PORT message: false convergence (8)</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/summary-methods.html'>summary</a></span><span class='op'>(</span><span class='va'>f_nlme</span>, data <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
</div><div class='output co'>#&gt; nlme version used for fitting: 3.1.150.1
#&gt; mkin version used for pre-fitting: 0.9.50.4
#&gt; R version used for fitting: 4.0.3
-#&gt; Date of fit: Tue Oct 27 15:25:23 2020
-#&gt; Date of summary: Tue Oct 27 15:25:23 2020
+#&gt; Date of fit: Sat Nov 7 13:28:06 2020
+#&gt; Date of summary: Sat Nov 7 13:28:06 2020
#&gt;
#&gt; Equations:
#&gt; d_parent/dt = - k_parent * parent
@@ -276,7 +276,7 @@ José Pinheiro and Douglas Bates for the components inherited from nlme</p>
#&gt;
#&gt; Model predictions using solution type analytical
#&gt;
-#&gt; Fitted in 0.581 s using 5 iterations
+#&gt; Fitted in 0.588 s using 5 iterations
#&gt;
#&gt; Variance model: Two-component variance function
#&gt;

Contact - Imprint