aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-26 18:38:51 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-26 18:52:01 +0200
commit675a733fa2acc08daabb9b8b571c7d658f281f73 (patch)
treeef29cec38aa6d446f7956c0e423cca6bed2e21c0 /docs
parent5e85d8856e7c9db3c52bb6ac5a0a81e2f0c6181c (diff)
Use all cores per default, confint tolerance
Also, use more intelligent starting values for the variance of the random effects for saemix. While this does not appear to speed up the convergence, it shows where this variance is greatly reduced by using mixed-effects models as opposed to the separate independent fits.
Diffstat (limited to 'docs')
-rw-r--r--docs/news/index.html2
-rw-r--r--docs/pkgdown.yml2
-rw-r--r--docs/reference/confint.mkinfit.html20
-rw-r--r--docs/reference/mmkin.html16
-rw-r--r--docs/reference/nlme.html4
-rw-r--r--docs/reference/parms.html6
-rw-r--r--docs/reference/saemix-1.pngbin37443 -> 31551 bytes
-rw-r--r--docs/reference/saemix-2.pngbin38557 -> 58815 bytes
-rw-r--r--docs/reference/saemix.html135
9 files changed, 80 insertions, 105 deletions
diff --git a/docs/news/index.html b/docs/news/index.html
index 149fc98e..c26652e9 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -148,6 +148,8 @@
<ul>
<li><p>‘parms’: Add a method for mmkin objects</p></li>
<li><p>‘saemix_model’, ‘saemix_data’: Helper functions to fit nonlinear mixed-effects models for mmkin row objects using the saemix package</p></li>
+<li><p>‘mmkin’ and ‘confint(method = ’profile’): Use all cores detected by parallel::detectCores() per default</p></li>
+<li><p>‘confint(method = ’profile’): Choose accuracy based on ‘rel_tol’ argument, relative to the bounds obtained by the quadratic approximation</p></li>
</ul>
</div>
<div id="mkin-0-9-50-2-2020-05-12" class="section level1">
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 0bb01ef4..a8b168ce 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -10,7 +10,7 @@ articles:
NAFTA_examples: web_only/NAFTA_examples.html
benchmarks: web_only/benchmarks.html
compiled_models: web_only/compiled_models.html
-last_built: 2020-05-25T10:48Z
+last_built: 2020-05-26T16:38Z
urls:
reference: https://pkgdown.jrwb.de/mkin/reference
article: https://pkgdown.jrwb.de/mkin/articles
diff --git a/docs/reference/confint.mkinfit.html b/docs/reference/confint.mkinfit.html
index 190494bc..0686c7bb 100644
--- a/docs/reference/confint.mkinfit.html
+++ b/docs/reference/confint.mkinfit.html
@@ -79,7 +79,7 @@ method of Venzon and Moolgavkar (1988)." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
@@ -116,6 +116,9 @@ method of Venzon and Moolgavkar (1988)." />
<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>
@@ -168,7 +171,8 @@ method of Venzon and Moolgavkar (1988).</p>
<span class='kw'>method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"quadratic"</span>, <span class='st'>"profile"</span>),
<span class='kw'>transformed</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>backtransform</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
- <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>detectCores</span>()/<span class='fl'>2</span>),
+ <span class='kw'>cores</span> <span class='kw'>=</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>(),
+ <span class='kw'>rel_tol</span> <span class='kw'>=</span> <span class='fl'>0.01</span>,
<span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='no'>...</span>
)</pre>
@@ -224,6 +228,12 @@ their confidence intervals?</p></td>
On Windows machines, cores &gt; 1 is currently not supported.</p></td>
</tr>
<tr>
+ <th>rel_tol</th>
+ <td><p>If the method is 'profile', what should be the accuracy
+of the lower and upper bounds, relative to the estimate obtained from
+the quadratic method?</p></td>
+ </tr>
+ <tr>
<th>quiet</th>
<td><p>Should we suppress the message "Profiling the likelihood"</p></td>
</tr>
@@ -270,13 +280,13 @@ Profile-Likelihood Based Confidence Intervals, Applied Statistics, 37,
<span class='no'>SFO_SFO.ff</span> <span class='kw'>&lt;-</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='st'>"m1"</span>), <span class='kw'>m1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>),
<span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
<span class='no'>f_d_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinfit.html'>mkinfit</a></span>(<span class='no'>SFO_SFO</span>, <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>FOCUS_2006_D</span>, <span class='no'>value</span> <span class='kw'>!=</span> <span class='fl'>0</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
-<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#&gt; User System verstrichen
-#&gt; 3.410 0.000 3.412 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span>
+<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#&gt; user system elapsed
+#&gt; 3.689 0.991 3.361 </div><div class='input'><span class='co'># Using more cores does not save much time here, as parent_0 takes up most of the time</span>
<span class='co'># If we additionally exclude parent_0 (the confidence of which is often of</span>
<span class='co'># minor interest), we get a nice performance improvement from about 50</span>
<span class='co'># seconds to about 12 seconds if we use at least four cores</span>
<span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>ci_profile_no_parent_0</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/confint.html'>confint</a></span>(<span class='no'>f_d_1</span>, <span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"profile"</span>,
- <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"k_parent_sink"</span>, <span class='st'>"k_parent_m1"</span>, <span class='st'>"k_m1_sink"</span>, <span class='st'>"sigma"</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>))</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='output co'>#&gt; <span class='warning'>Warning: scheduled cores 1, 2, 3 encountered errors in user code, all values of the jobs will be affected</span></div><div class='output co'>#&gt; <span class='error'>Error in dimnames(x) &lt;- dn: Länge von 'dimnames' [2] ungleich der Arrayausdehnung</span></div><div class='output co'>#&gt; <span class='message'>Timing stopped at: 0.008 0.044 0.201</span></div><div class='input'><span class='no'>ci_profile</span></div><div class='output co'>#&gt; 2.5% 97.5%
+ <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"k_parent_sink"</span>, <span class='st'>"k_parent_m1"</span>, <span class='st'>"k_m1_sink"</span>, <span class='st'>"sigma"</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='no'>n_cores</span>))</div><div class='output co'>#&gt; <span class='message'>Profiling the likelihood</span></div><div class='output co'>#&gt; <span class='warning'>Warning: scheduled cores 2, 1, 3 encountered errors in user code, all values of the jobs will be affected</span></div><div class='output co'>#&gt; <span class='error'>Error in dimnames(x) &lt;- dn: length of 'dimnames' [2] not equal to array extent</span></div><div class='output co'>#&gt; <span class='message'>Timing stopped at: 0.007 0.042 0.193</span></div><div class='input'><span class='no'>ci_profile</span></div><div class='output co'>#&gt; 2.5% 97.5%
#&gt; parent_0 96.456003640 1.027703e+02
#&gt; k_parent 0.090911032 1.071578e-01
#&gt; k_m1 0.003892605 6.702778e-03
diff --git a/docs/reference/mmkin.html b/docs/reference/mmkin.html
index 3be3b4b9..9628c017 100644
--- a/docs/reference/mmkin.html
+++ b/docs/reference/mmkin.html
@@ -75,7 +75,7 @@ datasets specified in its first two arguments." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
@@ -112,6 +112,9 @@ datasets specified in its first two arguments." />
<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>
@@ -152,7 +155,7 @@ datasets specified in its first two arguments.</p>
<pre class="usage"><span class='fu'>mmkin</span>(
<span class='kw'>models</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>),
<span class='no'>datasets</span>,
- <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/Round.html'>round</a></span>(<span class='fu'>detectCores</span>()/<span class='fl'>2</span>),
+ <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fu'>detectCores</span>(),
<span class='kw'>cluster</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='no'>...</span>
)</pre>
@@ -176,7 +179,8 @@ data for <code><a href='mkinfit.html'>mkinfit</a></code>.</p></td>
<td><p>The number of cores to be used for multicore processing. This
is only used when the <code>cluster</code> argument is <code>NULL</code>. On Windows
machines, cores &gt; 1 is not supported, you need to use the <code>cluster</code>
-argument to use multiple logical processors.</p></td>
+argument to use multiple logical processors. Per default, all cores
+detected by <code><a href='https://rdrr.io/r/parallel/detectCores.html'>parallel::detectCores()</a></code> are used.</p></td>
</tr>
<tr>
<th>cluster</th>
@@ -215,9 +219,9 @@ plotting.</p></div>
<span class='no'>time_default</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fits.0</span> <span class='kw'>&lt;-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))
<span class='no'>time_1</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/system.time.html'>system.time</a></span>(<span class='no'>fits.4</span> <span class='kw'>&lt;-</span> <span class='fu'>mmkin</span>(<span class='no'>models</span>, <span class='no'>datasets</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>))</div><div class='output co'>#&gt; <span class='warning'>Warning: Optimisation did not converge:</span>
#&gt; <span class='warning'>false convergence (8)</span></div><div class='input'>
-<span class='no'>time_default</span></div><div class='output co'>#&gt; User System verstrichen
-#&gt; 4.520 0.374 1.284 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#&gt; User System verstrichen
-#&gt; 5.076 0.004 5.083 </div><div class='input'>
+<span class='no'>time_default</span></div><div class='output co'>#&gt; user system elapsed
+#&gt; 4.457 0.561 1.328 </div><div class='input'><span class='no'>time_1</span></div><div class='output co'>#&gt; user system elapsed
+#&gt; 5.031 0.004 5.038 </div><div class='input'>
<span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>fits.0</span><span class='kw'>[[</span><span class='st'>"SFO_lin"</span>, <span class='fl'>2</span>]])</div><div class='output co'>#&gt; $ff
#&gt; parent_M1 parent_sink M1_M2 M1_sink
#&gt; 0.7340478 0.2659522 0.7505691 0.2494309
diff --git a/docs/reference/nlme.html b/docs/reference/nlme.html
index b2d415dc..3462e52e 100644
--- a/docs/reference/nlme.html
+++ b/docs/reference/nlme.html
@@ -75,7 +75,7 @@ datasets. They are used internally by the nlme.mmkin() method." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
@@ -178,7 +178,7 @@ datasets. They are used internally by the <code><a href='nlme.mmkin.html'>nlme.m
<p>If random is FALSE (default), a named vector containing mean values
of the fitted degradation model parameters. If random is TRUE, a list with
fixed and random effects, in the format required by the start argument of
-nlme for the case of a single grouping variable ds?</p>
+nlme for the case of a single grouping variable ds.</p>
<p>A <code><a href='https://rdrr.io/pkg/nlme/man/groupedData.html'>groupedData</a></code> object</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
diff --git a/docs/reference/parms.html b/docs/reference/parms.html
index 432bbc88..2fe91c26 100644
--- a/docs/reference/parms.html
+++ b/docs/reference/parms.html
@@ -195,7 +195,8 @@ such matrices is returned.</p>
<span class='no'>ds</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)]))
<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>ds</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>6</span>:<span class='fl'>10</span>)
-<span class='no'>fits</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='co'># \dontrun{</span>
+<span class='no'>fits</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)
<span class='fu'>parms</span>(<span class='no'>fits</span>[<span class='st'>"SFO"</span>, ])</div><div class='output co'>#&gt; Dataset 6 Dataset 7 Dataset 8 Dataset 9 Dataset 10
#&gt; parent_0 88.52275400 82.666781678 86.8547308 91.7779306 82.14809450
#&gt; k_parent_sink 0.05794659 0.009647805 0.2102974 0.1232258 0.00720421
@@ -259,7 +260,8 @@ such matrices is returned.</p>
#&gt; log_k2 -3.5206791 -5.85402317 -2.5794240 -3.4233253 -5.676532
#&gt; g_ilr -0.1463234 0.07627854 0.4719196 0.4477805 -0.460676
#&gt; sigma 1.3569047 2.22130220 1.3416908 2.8715985 1.942068
-#&gt; </div></pre>
+#&gt; </div><div class='input'># }
+</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
diff --git a/docs/reference/saemix-1.png b/docs/reference/saemix-1.png
index 529588ce..0d79300d 100644
--- a/docs/reference/saemix-1.png
+++ b/docs/reference/saemix-1.png
Binary files differ
diff --git a/docs/reference/saemix-2.png b/docs/reference/saemix-2.png
index b85f878f..04de70b5 100644
--- a/docs/reference/saemix-2.png
+++ b/docs/reference/saemix-2.png
Binary files differ
diff --git a/docs/reference/saemix.html b/docs/reference/saemix.html
index 1737a21c..d3eb216c 100644
--- a/docs/reference/saemix.html
+++ b/docs/reference/saemix.html
@@ -153,7 +153,7 @@ list of mkinfit objects that have been obtained by fitting the same model to
a list of datasets.</p>
</div>
- <pre class="usage"><span class='fu'>saemix_model</span>(<span class='no'>object</span>)
+ <pre class="usage"><span class='fu'>saemix_model</span>(<span class='no'>object</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='kw pkg'>parallel</span><span class='kw ns'>::</span><span class='fu'><a href='https://rdrr.io/r/parallel/detectCores.html'>detectCores</a></span>())
<span class='fu'>saemix_data</span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre>
@@ -165,6 +165,11 @@ a list of datasets.</p>
<td><p>An mmkin row object containing several fits of the same model to different datasets</p></td>
</tr>
<tr>
+ <th>cores</th>
+ <td><p>The number of cores to be used for multicore processing.
+On Windows machines, cores &gt; 1 is currently not supported.</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></p></td>
</tr>
@@ -174,21 +179,22 @@ a list of datasets.</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>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
+mmkin. Starting variances of the random effects (argument omega.init) are the
+variances of the deviations of the parameters from these mean values.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>ds</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
<span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)]))
<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span>(<span class='no'>ds</span>) <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span>(<span class='st'>"Dataset"</span>, <span class='fl'>6</span>:<span class='fl'>10</span>)
<span class='no'>sfo_sfo</span> <span class='kw'>&lt;-</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='st'>"A1"</span>),
- <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></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='no'>f_mmkin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>sfo_sfo</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>5</span>)
-<span class='co'># \dontrun{</span>
-<span class='kw'>if</span> (<span class='fu'><a href='https://rdrr.io/r/base/library.html'>require</a></span>(<span class='no'>saemix</span>)) {
- <span class='no'>m_saemix</span> <span class='kw'>&lt;-</span> <span class='fu'>saemix_model</span>(<span class='no'>f_mmkin</span>)
- <span class='no'>d_saemix</span> <span class='kw'>&lt;-</span> <span class='fu'>saemix_data</span>(<span class='no'>f_mmkin</span>)
- <span class='no'>saemix_options</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456</span>, <span class='kw'>save</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>save.graphs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)
- <span class='fu'><a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix</a></span>(<span class='no'>m_saemix</span>, <span class='no'>d_saemix</span>, <span class='no'>saemix_options</span>)
-}</div><div class='output co'>#&gt; <span class='message'>Loading required package: saemix</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='output co'>#&gt;
+ <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></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='co'># \dontrun{</span>
+<span class='no'>f_mmkin</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>sfo_sfo</span>), <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
+<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>saemix</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='no'>m_saemix</span> <span class='kw'>&lt;-</span> <span class='fu'>saemix_model</span>(<span class='no'>f_mmkin</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; The following SaemixModel object was successfully created:
#&gt;
@@ -224,12 +230,12 @@ a list of datasets.</p>
#&gt; out_values &lt;- out_wide[out_index]
#&gt; }
#&gt; return(out_values)
-#&gt; }, mc.cores = 15)
+#&gt; }, mc.cores = cores)
#&gt; res &lt;- unlist(res_list)
#&gt; return(res)
#&gt; }
-#&gt; &lt;bytecode: 0x555559875398&gt;
-#&gt; &lt;environment: 0x55555973a248&gt;
+#&gt; &lt;bytecode: 0x555559668108&gt;
+#&gt; &lt;environment: 0x555559677c08&gt;
#&gt; Nb of parameters: 4
#&gt; parameter names: parent_0 log_k_parent log_k_A1 f_parent_ilr_1
#&gt; distribution:
@@ -248,8 +254,7 @@ a list of datasets.</p>
#&gt; No covariate in the model.
#&gt; Initial values
#&gt; parent_0 log_k_parent log_k_A1 f_parent_ilr_1
-#&gt; Pop.CondInit 86.53449 -3.207005 -3.060308 -1.920449
-#&gt;
+#&gt; Pop.CondInit 86.53449 -3.207005 -3.060308 -1.920449</div><div class='input'><span class='no'>d_saemix</span> <span class='kw'>&lt;-</span> <span class='fu'>saemix_data</span>(<span class='no'>f_mmkin</span>)</div><div class='output co'>#&gt;
#&gt;
#&gt; The following SaemixData object was successfully created:
#&gt;
@@ -257,12 +262,14 @@ a list of datasets.</p>
#&gt; longitudinal data for use with the SAEM algorithm
#&gt; Dataset ds_saemix
#&gt; Structured data: value ~ time + name | ds
-#&gt; X variable for graphs: time ()
-#&gt; Running main SAEM algorithm
-#&gt; [1] "Mon May 25 12:48:51 2020"
-#&gt; .</div><div class='img'><img src='saemix-1.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt; .</div><div class='img'><img src='saemix-2.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt; .</div><div class='img'><img src='saemix-3.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt; .</div><div class='img'><img src='saemix-4.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt;
+#&gt; X variable for graphs: time () </div><div class='input'><span class='no'>saemix_options</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>seed</span> <span class='kw'>=</span> <span class='fl'>123456</span>,
+ <span class='kw'>save</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>save.graphs</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>displayProgress</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
+ <span class='kw'>nbiter.saemix</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>200</span>, <span class='fl'>80</span>))
+<span class='no'>f_saemix</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix</a></span>(<span class='no'>m_saemix</span>, <span class='no'>d_saemix</span>, <span class='no'>saemix_options</span>)</div><div class='output co'>#&gt; Running main SAEM algorithm
+#&gt; [1] "Tue May 26 18:25:16 2020"
+#&gt; ..
#&gt; Minimisation finished
-#&gt; [1] "Mon May 25 12:56:39 2020"</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by the SAEM algorithm
+#&gt; [1] "Tue May 26 18:31:09 2020"</div><div class='img'><img src='saemix-1.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by the SAEM algorithm
#&gt; -----------------------------------
#&gt; ---- Data ----
#&gt; -----------------------------------
@@ -322,12 +329,12 @@ a list of datasets.</p>
#&gt; out_values &lt;- out_wide[out_index]
#&gt; }
#&gt; return(out_values)
-#&gt; }, mc.cores = 15)
+#&gt; }, mc.cores = cores)
#&gt; res &lt;- unlist(res_list)
#&gt; return(res)
#&gt; }
-#&gt; &lt;bytecode: 0x555559875398&gt;
-#&gt; &lt;environment: 0x55555973a248&gt;
+#&gt; &lt;bytecode: 0x555559668108&gt;
+#&gt; &lt;environment: 0x555559677c08&gt;
#&gt; Nb of parameters: 4
#&gt; parameter names: parent_0 log_k_parent log_k_A1 f_parent_ilr_1
#&gt; distribution:
@@ -353,7 +360,7 @@ a list of datasets.</p>
#&gt; Estimation of individual parameters (MAP)
#&gt; Estimation of standard errors and linearised log-likelihood
#&gt; Estimation of log-likelihood by importance sampling
-#&gt; Number of iterations: K1=300, K2=100
+#&gt; Number of iterations: K1=200, K2=80
#&gt; Number of chains: 10
#&gt; Seed: 123456
#&gt; Number of MCMC iterations for IS: 5000
@@ -369,19 +376,19 @@ a list of datasets.</p>
#&gt; ----------------- Fixed effects ------------------
#&gt; ----------------------------------------------------
#&gt; Parameter Estimate SE CV(%)
-#&gt; [1,] parent_0 86.21 1.51 1.7
+#&gt; [1,] parent_0 86.14 1.61 1.9
#&gt; [2,] log_k_parent -3.21 0.59 18.5
-#&gt; [3,] log_k_A1 -4.64 0.29 6.3
-#&gt; [4,] f_parent_ilr_1 -0.32 0.30 93.2
-#&gt; [5,] a.1 4.69 0.27 5.8
+#&gt; [3,] log_k_A1 -4.66 0.30 6.4
+#&gt; [4,] f_parent_ilr_1 -0.33 0.30 91.7
+#&gt; [5,] a.1 4.68 0.27 5.8
#&gt; ----------------------------------------------------
#&gt; ----------- Variance of random effects -----------
#&gt; ----------------------------------------------------
#&gt; Parameter Estimate SE CV(%)
-#&gt; parent_0 omega2.parent_0 6.07 7.08 117
-#&gt; log_k_parent omega2.log_k_parent 1.75 1.11 63
+#&gt; parent_0 omega2.parent_0 7.71 8.14 106
+#&gt; log_k_parent omega2.log_k_parent 1.76 1.12 63
#&gt; log_k_A1 omega2.log_k_A1 0.26 0.26 101
-#&gt; f_parent_ilr_1 omega2.f_parent_ilr_1 0.38 0.27 71
+#&gt; f_parent_ilr_1 omega2.f_parent_ilr_1 0.39 0.28 71
#&gt; ----------------------------------------------------
#&gt; ------ Correlation matrix of random effects ------
#&gt; ----------------------------------------------------
@@ -399,66 +406,16 @@ a list of datasets.</p>
#&gt; --------------- Statistical criteria -------------
#&gt; ----------------------------------------------------
#&gt; Likelihood computed by linearisation
-#&gt; -2LL= 1064.397
-#&gt; AIC = 1082.397
-#&gt; BIC = 1078.882
+#&gt; -2LL= 1064.364
+#&gt; AIC = 1082.364
+#&gt; BIC = 1078.848
#&gt;
#&gt; Likelihood computed by importance sampling
-#&gt; -2LL= 1063.161
-#&gt; AIC = 1081.161
-#&gt; BIC = 1077.646
-#&gt; ----------------------------------------------------</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by the SAEM algorithm
-#&gt; -----------------------------------------
-#&gt; ---- Data and Model ----
-#&gt; -----------------------------------------
-#&gt; Data
-#&gt; Dataset ds_saemix
-#&gt; Longitudinal data: value ~ time + name | ds
-#&gt;
-#&gt; Model:
-#&gt; Mixed model generated from mmkin object
-#&gt; 4 parameters: parent_0 log_k_parent log_k_A1 f_parent_ilr_1
-#&gt; error model: constant
-#&gt; No covariate
-#&gt;
-#&gt; Key options
-#&gt; Estimation of individual parameters (MAP)
-#&gt; Estimation of standard errors and linearised log-likelihood
-#&gt; Estimation of log-likelihood by importance sampling
-#&gt; Number of iterations: K1=300, K2=100
-#&gt; Number of chains: 10
-#&gt; Seed: 123456
-#&gt; Number of MCMC iterations for IS: 5000
-#&gt; Input/output
-#&gt; results not saved
-#&gt; no graphs
-#&gt; ----------------------------------------------------
-#&gt; ---- Results ----
-#&gt; Fixed effects
-#&gt; Parameter Estimate SE CV(%)
-#&gt; parent_0 86.214 1.506 1.75
-#&gt; log_k_parent -3.210 0.593 18.47
-#&gt; log_k_A1 -4.643 0.294 6.34
-#&gt; f_parent_ilr_1 -0.322 0.300 93.24
-#&gt; a.1 4.689 0.270 5.76
-#&gt;
-#&gt; Variance of random effects
-#&gt; Parameter Estimate SE CV(%)
-#&gt; omega2.parent_0 6.068 7.078 116.7
-#&gt; omega2.log_k_parent 1.752 1.111 63.4
-#&gt; omega2.log_k_A1 0.256 0.257 100.5
-#&gt; omega2.f_parent_ilr_1 0.385 0.273 70.8
-#&gt;
-#&gt; Statistical criteria
-#&gt; Likelihood computed by linearisation
-#&gt; -2LL= 1064.397
-#&gt; AIC= 1082.397
-#&gt; BIC= 1078.882
-#&gt; Likelihood computed by importance sampling
-#&gt; -2LL= 1063.161
-#&gt; AIC= 1081.161
-#&gt; BIC= 1077.646 </div><div class='input'># }
-</div><div class='img'><img src='saemix-5.png' alt='' width='700' height='433' /></div></pre>
+#&gt; -2LL= 1063.462
+#&gt; AIC = 1081.462
+#&gt; BIC = 1077.947
+#&gt; ----------------------------------------------------</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span>(<span class='no'>f_saemix</span>, <span class='kw'>plot.type</span> <span class='kw'>=</span> <span class='st'>"convergence"</span>)</div><div class='output co'>#&gt; Plotting convergence plots</div><div class='img'><img src='saemix-2.png' alt='' width='700' height='433' /></div><div class='input'># }
+</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">

Contact - Imprint