diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/news/index.html | 1 | ||||
-rw-r--r-- | docs/dev/pkgdown.yml | 2 | ||||
-rw-r--r-- | docs/dev/reference/endpoints.html | 14 | ||||
-rw-r--r-- | docs/dev/reference/index.html | 6 | ||||
-rw-r--r-- | docs/dev/reference/saem.html | 44 | ||||
-rw-r--r-- | docs/dev/reference/summary.saem.mmkin.html | 436 | ||||
-rw-r--r-- | docs/dev/sitemap.xml | 3 |
7 files changed, 482 insertions, 24 deletions
diff --git a/docs/dev/news/index.html b/docs/dev/news/index.html index 3980ea88..4f811b9f 100644 --- a/docs/dev/news/index.html +++ b/docs/dev/news/index.html @@ -146,6 +146,7 @@ <a href="#mkin-0-9-50-4-unreleased" class="anchor"></a>mkin 0.9.50.4 (unreleased)<small> Unreleased </small> </h1> <ul> +<li><p>‘saem’ generic function to fit saemix models, with a method ‘saem.mmkin’ and a corresponding ‘summary.saem.mmkin’</p></li> <li><p>‘transform_odeparms’, ‘backtransform_odeparms’: Use logit transformation for solitary fractions like the g parameter of the DFOP model, or formation fractions for a pathway to only one target variable</p></li> <li><p>‘update’ method for ‘mmkin’ objects</p></li> <li><p>‘plot’, ‘summary’ and ‘print’ methods for ‘nlme.mmkin’ objects</p></li> diff --git a/docs/dev/pkgdown.yml b/docs/dev/pkgdown.yml index aebac46b..120f4975 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-07T12:14Z +last_built: 2020-11-08T01:44Z urls: reference: https://pkgdown.jrwb.de/mkin/reference article: https://pkgdown.jrwb.de/mkin/articles diff --git a/docs/dev/reference/endpoints.html b/docs/dev/reference/endpoints.html index 5a20a34c..db702c2e 100644 --- a/docs/dev/reference/endpoints.html +++ b/docs/dev/reference/endpoints.html @@ -165,8 +165,11 @@ advantage that the SFORB model can also be used for metabolites.</p> <colgroup><col class="name" /><col class="desc" /></colgroup> <tr> <th>fit</th> - <td><p>An object of class <code><a href='mkinfit.html'>mkinfit</a></code> or -<code><a href='nlme.mmkin.html'>nlme.mmkin</a></code></p></td> + <td><p>An object of class <a href='mkinfit.html'>mkinfit</a>, <a href='nlme.mmkin.html'>nlme.mmkin</a> or +<a href='saem.html'>saem.mmkin</a>. Or another object that has list components +mkinmod containing an <a href='mkinmod.html'>mkinmod</a> degradation model, and two numeric vectors, +bparms.optim and bparms.fixed, that contain parameter values +for that model.</p></td> </tr> </table> @@ -176,9 +179,14 @@ advantage that the SFORB model can also be used for metabolites.</p> and, if applicable, a vector of formation fractions named ff and, if the SFORB model was in use, a vector of eigenvalues of these SFORB models, equivalent to DFOP rate constants</p> + <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> + + <p>Additional DT50 values are calculated from the FOMC DT90 and k1 and k2 from +HS and DFOP, as well as from Eigenvalues b1 and b2 of any SFORB models</p> <h2 class="hasAnchor" id="note"><a class="anchor" href="#note"></a>Note</h2> - <p>The function is used internally by <code><a href='summary.mkinfit.html'>summary.mkinfit</a></code>.</p> + <p>The function is used internally by <a href='summary.mkinfit.html'>summary.mkinfit</a>, +<a href='summary.nlme.mmkin.html'>summary.nlme.mmkin</a> and <a href='summary.saem.mmkin.html'>summary.saem.mmkin</a>.</p> <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> <p>Johannes Ranke</p> diff --git a/docs/dev/reference/index.html b/docs/dev/reference/index.html index f1884d2b..825c4d27 100644 --- a/docs/dev/reference/index.html +++ b/docs/dev/reference/index.html @@ -343,6 +343,12 @@ of an mmkin object</p></td> </tr><tr> <td> + <p><code><a href="summary.saem.mmkin.html">summary(<i><saem.mmkin></i>)</a></code> <code><a href="summary.saem.mmkin.html">print(<i><summary.saem.mmkin></i>)</a></code> </p> + </td> + <td><p>Summary method for class "saem.mmkin"</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> </td> <td><p>Helper functions to create nlme models from mmkin row objects</p></td> diff --git a/docs/dev/reference/saem.html b/docs/dev/reference/saem.html index f883eb11..06fcfaa7 100644 --- a/docs/dev/reference/saem.html +++ b/docs/dev/reference/saem.html @@ -41,8 +41,8 @@ <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)." /> +effects models created from mmkin row objects using the Stochastic Approximation +Expectation Maximisation algorithm (SAEM)." /> <meta name="robots" content="noindex"> @@ -147,8 +147,8 @@ to the expectation maximisation algorithm (SAEM)." /> <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> +effects models created from <a href='mmkin.html'>mmkin</a> row objects using the Stochastic Approximation +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> @@ -205,7 +205,8 @@ by the saemix function?</p></td> <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 S3 object of class 'saem.mmkin', containing the fitted +<a href='https://rdrr.io/pkg/saemix/man/SaemixObject-class.html'>saemix::SaemixObject</a> as a list component named 'so'.</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> @@ -215,6 +216,9 @@ obtained by fitting the same model to a list of datasets using <a href='mkinfit. <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="see-also"><a class="anchor" href="#see-also"></a>See also</h2> + + <div class='dont-index'><p><a href='summary.saem.mmkin.html'>summary.saem.mmkin</a></p></div> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'><span class='co'># \dontrun{</span> @@ -225,27 +229,27 @@ using <a href='mmkin.html'>mmkin</a>.</p> 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'><-</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'>#> Running main SAEM algorithm -#> [1] "Sat Nov 7 13:14:50 2020" +#> [1] "Sun Nov 8 02:44:42 2020" #> .... #> Minimisation finished -#> [1] "Sat Nov 7 13:14:52 2020"</div><div class='input'> +#> [1] "Sun Nov 8 02:44:43 2020"</div><div class='input'> <span class='va'>f_mmkin_parent</span> <span class='op'><-</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'><-</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'>#> Running main SAEM algorithm -#> [1] "Sat Nov 7 13:14:53 2020" +#> [1] "Sun Nov 8 02:44:45 2020" #> .... #> Minimisation finished -#> [1] "Sat Nov 7 13:14:55 2020"</div><div class='input'><span class='va'>f_saem_fomc</span> <span class='op'><-</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> +#> [1] "Sun Nov 8 02:44:46 2020"</div><div class='input'><span class='va'>f_saem_fomc</span> <span class='op'><-</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'>#> Running main SAEM algorithm -#> [1] "Sat Nov 7 13:14:55 2020" +#> [1] "Sun Nov 8 02:44:47 2020" #> .... #> Minimisation finished -#> [1] "Sat Nov 7 13:14:57 2020"</div><div class='input'><span class='va'>f_saem_dfop</span> <span class='op'><-</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> +#> [1] "Sun Nov 8 02:44:49 2020"</div><div class='input'><span class='va'>f_saem_dfop</span> <span class='op'><-</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'>#> Running main SAEM algorithm -#> [1] "Sat Nov 7 13:14:57 2020" +#> [1] "Sun Nov 8 02:44:49 2020" #> .... #> Minimisation finished -#> [1] "Sat Nov 7 13:15:00 2020"</div><div class='input'> +#> [1] "Sun Nov 8 02:44:52 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> @@ -258,10 +262,10 @@ using <a href='mmkin.html'>mmkin</a>.</p> <span class='va'>f_mmkin_parent_tc</span> <span class='op'><-</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'><-</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'>#> Running main SAEM algorithm -#> [1] "Sat Nov 7 13:15:02 2020" +#> [1] "Sun Nov 8 02:44:54 2020" #> .... #> Minimisation finished -#> [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> +#> [1] "Sun Nov 8 02:44:59 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'>#> Likelihoods computed by importance sampling </div><div class='output co'>#> AIC BIC #> 1 467.7644 465.0305 #> 2 469.4862 466.3617</div><div class='input'> @@ -271,20 +275,20 @@ using <a href='mmkin.html'>mmkin</a>.</p> <span class='co'># This takes about 4 minutes on my system</span> <span class='va'>f_saem</span> <span class='op'><-</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'>#> Running main SAEM algorithm -#> [1] "Sat Nov 7 13:15:08 2020" +#> [1] "Sun Nov 8 02:45:00 2020" #> .... #> Minimisation finished -#> [1] "Sat Nov 7 13:19:07 2020"</div><div class='input'> +#> [1] "Sun Nov 8 02:49:01 2020"</div><div class='output co'>#> <span class='error'>Error in exp(trans_k): non-numeric argument to mathematical function</span></div><div class='output co'>#> <span class='message'>Timing stopped at: 317.7 169.9 258.9</span></div><div class='input'> <span class='va'>f_mmkin_des</span> <span class='op'><-</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'><-</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'>#> Running main SAEM algorithm -#> [1] "Sat Nov 7 13:19:26 2020" +#> [1] "Sun Nov 8 02:49:20 2020" #> .... #> Minimisation finished -#> [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'>#> <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> +#> [1] "Sun Nov 8 02:57:30 2020"</div><div class='output co'>#> <span class='error'>Error in exp(trans_k): non-numeric argument to mathematical function</span></div><div class='output co'>#> <span class='message'>Timing stopped at: 591.7 205.6 521.4</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</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_des</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='error'>Error in compare.saemix(list(f_saem$so, f_saem_des$so)): object 'f_saem' 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"> diff --git a/docs/dev/reference/summary.saem.mmkin.html b/docs/dev/reference/summary.saem.mmkin.html new file mode 100644 index 00000000..01e8eb12 --- /dev/null +++ b/docs/dev/reference/summary.saem.mmkin.html @@ -0,0 +1,436 @@ +<!-- 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>Summary method for class "saem.mmkin" — summary.saem.mmkin • 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="Summary method for class "saem.mmkin" — summary.saem.mmkin" /> +<meta property="og:description" content="Lists model equations, initial parameter values, optimised parameters +for fixed effects (population), random effects (deviations from the +population mean) and residual error model, as well as the resulting +endpoints such as formation fractions and DT50 values. Optionally +(default is FALSE), the data are listed in full." /> + + +<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>Summary method for class "saem.mmkin"</h1> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/summary.saem.mmkin.R'><code>R/summary.saem.mmkin.R</code></a></small> + <div class="hidden name"><code>summary.saem.mmkin.Rd</code></div> + </div> + + <div class="ref-description"> + <p>Lists model equations, initial parameter values, optimised parameters +for fixed effects (population), random effects (deviations from the +population mean) and residual error model, as well as the resulting +endpoints such as formation fractions and DT50 values. Optionally +(default is FALSE), the data are listed in full.</p> + </div> + + <pre class="usage"><span class='co'># S3 method for saem.mmkin</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>, distimes <span class='op'>=</span> <span class='cn'>TRUE</span>, <span class='va'>...</span><span class='op'>)</span> + +<span class='co'># S3 method for summary.saem.mmkin</span> +<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>, verbose <span class='op'>=</span> <span class='va'>x</span><span class='op'>$</span><span class='va'>verbose</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 object of class <a href='saem.html'>saem.mmkin</a></p></td> + </tr> + <tr> + <th>data</th> + <td><p>logical, indicating whether the full data should be included in +the summary.</p></td> + </tr> + <tr> + <th>verbose</th> + <td><p>Should the summary be verbose?</p></td> + </tr> + <tr> + <th>distimes</th> + <td><p>logical, indicating whether DT50 and DT90 values should be +included.</p></td> + </tr> + <tr> + <th>...</th> + <td><p>optional arguments passed to methods like <code>print</code>.</p></td> + </tr> + <tr> + <th>x</th> + <td><p>an object of class summary.saem.mmkin</p></td> + </tr> + <tr> + <th>digits</th> + <td><p>Number of digits to use for printing</p></td> + </tr> + </table> + + <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> + + <p>The summary function returns a list based on the <a href='https://rdrr.io/pkg/saemix/man/SaemixObject-class.html'>saemix::SaemixObject</a> +obtained in the fit, with at least the following additional components</p> +<dt>saemixversion, mkinversion, Rversion</dt><dd><p>The saemix, mkin and R versions used</p></dd> +<dt>date.fit, date.summary</dt><dd><p>The dates where the fit and the summary were +produced</p></dd> +<dt>diffs</dt><dd><p>The differential equations used in the degradation model</p></dd> +<dt>use_of_ff</dt><dd><p>Was maximum or minimum use made of formation fractions</p></dd> +<dt>data</dt><dd><p>The data</p></dd> +<dt>confint_trans</dt><dd><p>Transformed parameters as used in the optimisation, with confidence intervals</p></dd> +<dt>confint_back</dt><dd><p>Backtransformed parameters, with confidence intervals if available</p></dd> +<dt>ff</dt><dd><p>The estimated formation fractions derived from the fitted +model.</p></dd> +<dt>distimes</dt><dd><p>The DT50 and DT90 values for each observed variable.</p></dd> +<dt>SFORB</dt><dd><p>If applicable, eigenvalues of SFORB components of the model.</p></dd> +The print method is called for its side effect, i.e. printing the summary. + + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke for the mkin specific parts +saemix authors for the parts inherited from saemix.</p> + + <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> + <pre class="examples"><div class='input'><span class='co'># Generate five datasets following SFO kinetics</span> +<span class='va'>sampling_times</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='fl'>0</span>, <span class='fl'>1</span>, <span class='fl'>3</span>, <span class='fl'>7</span>, <span class='fl'>14</span>, <span class='fl'>28</span>, <span class='fl'>60</span>, <span class='fl'>90</span>, <span class='fl'>120</span><span class='op'>)</span> +<span class='va'>dt50_sfo_in_pop</span> <span class='op'><-</span> <span class='fl'>50</span> +<span class='va'>k_in_pop</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/Log.html'>log</a></span><span class='op'>(</span><span class='fl'>2</span><span class='op'>)</span> <span class='op'>/</span> <span class='va'>dt50_sfo_in_pop</span> +<span class='fu'><a href='https://rdrr.io/r/base/Random.html'>set.seed</a></span><span class='op'>(</span><span class='fl'>1234</span><span class='op'>)</span> +<span class='va'>k_in</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/stats/Lognormal.html'>rlnorm</a></span><span class='op'>(</span><span class='fl'>5</span>, <span class='fu'><a href='https://rdrr.io/r/base/Log.html'>log</a></span><span class='op'>(</span><span class='va'>k_in_pop</span><span class='op'>)</span>, <span class='fl'>0.5</span><span class='op'>)</span> +<span class='va'>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='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'>pred_sfo</span> <span class='op'><-</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>k</span><span class='op'>)</span> <span class='op'>{</span> + <span class='fu'><a href='mkinpredict.html'>mkinpredict</a></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_parent <span class='op'>=</span> <span class='va'>k</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><span class='op'>)</span>, + <span class='va'>sampling_times</span><span class='op'>)</span> +<span class='op'>}</span> + +<span class='va'>ds_sfo_mean</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>k_in</span>, <span class='va'>pred_sfo</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_sfo_mean</span><span class='op'>)</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span><span class='op'>(</span><span class='st'>"ds"</span>, <span class='fl'>1</span><span class='op'>:</span><span class='fl'>5</span><span class='op'>)</span> + +<span class='va'>ds_sfo_syn</span> <span class='op'><-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>ds_sfo_mean</span>, <span class='kw'>function</span><span class='op'>(</span><span class='va'>ds</span><span class='op'>)</span> <span class='op'>{</span> + <span class='fu'><a href='add_err.html'>add_err</a></span><span class='op'>(</span><span class='va'>ds</span>, + sdfunc <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>value</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/MathFun.html'>sqrt</a></span><span class='op'>(</span><span class='fl'>1</span><span class='op'>^</span><span class='fl'>2</span> <span class='op'>+</span> <span class='va'>value</span><span class='op'>^</span><span class='fl'>2</span> <span class='op'>*</span> <span class='fl'>0.07</span><span class='op'>^</span><span class='fl'>2</span><span class='op'>)</span>, + n <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span><span class='op'>[[</span><span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span> +<span class='op'>}</span><span class='op'>)</span> + +<span class='co'># \dontrun{</span> +<span class='co'># Evaluate using mmkin and saem</span> +<span class='va'>f_mmkin</span> <span class='op'><-</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> +<span class='va'>f_saem</span> <span class='op'><-</span> <span class='fu'><a href='saem.html'>saem</a></span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>)</span> +</div><div class='output co'>#> Running main SAEM algorithm +#> [1] "Sun Nov 8 02:58:03 2020" +#> .... +#> Minimisation finished +#> [1] "Sun Nov 8 02:58:07 2020"</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_saem</span>, data <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> saemix version used for fitting: 3.1.9000 +#> mkin version used for pre-fitting: 0.9.50.4 +#> R version used for fitting: 4.0.3 +#> Date of fit: Sun Nov 8 02:58:07 2020 +#> Date of summary: Sun Nov 8 02:58:07 2020 +#> +#> Equations: +#> d_parent/dt = - k_parent * parent +#> +#> Data: +#> 90 observations of 1 variable(s) grouped in 5 datasets +#> +#> Model predictions using solution type analytical +#> +#> Fitted in 4.175 s using 300, 100 iterations +#> +#> Variance model: Two-component variance function +#> +#> Mean of starting values for individual parameters: +#> parent_0 log_k_parent +#> 97.849556 -4.455036 +#> +#> Fixed degradation parameter values: +#> None +#> +#> Results: +#> +#> Likelihood computed by importance sampling +#> AIC BIC logLik +#> 555.6718 553.3284 -271.8359 +#> +#> Optimised, transformed parameters with symmetric confidence intervals: +#> est. lower upper +#> parent_0 97.840291 94.701895 100.978686 +#> log_k_parent -4.464246 -5.001413 -3.927078 +#> +#> Correlation: +#> prnt_0 +#> log_k_parent 0.022 +#> +#> Random effects: +#> est. lower upper +#> SD.parent_0 3.0805465 0.4960170 5.6650760 +#> SD.log_k_parent 0.6109508 0.2301398 0.9917617 +#> +#> Variance model: +#> est. lower upper +#> a.1 1.06249961 0.23012265 1.89487657 +#> b.1 0.04649661 0.03060849 0.06238473 +#> +#> Backtransformed parameters with asymmetric confidence intervals: +#> est. lower upper +#> parent_0 97.84029088 94.701895315 100.97868644 +#> k_parent 0.01151338 0.006728434 0.01970115 +#> +#> Estimated disappearance times: +#> DT50 DT90 +#> parent 60.2 200 +#> +#> Data: +#> ds name time observed predicted residual standardized +#> ds 1 parent 0 103.6 97.303 6.297361 -1.12720 +#> ds 1 parent 0 95.9 97.303 -1.402639 0.25107 +#> ds 1 parent 1 95.4 96.599 -1.198705 0.21583 +#> ds 1 parent 1 95.3 96.599 -1.298705 0.23383 +#> ds 1 parent 3 91.6 95.206 -3.606076 0.65693 +#> ds 1 parent 3 94.5 95.206 -0.706076 0.12863 +#> ds 1 parent 7 88.1 92.481 -4.380761 0.81692 +#> ds 1 parent 7 89.6 92.481 -2.880761 0.53720 +#> ds 1 parent 14 90.3 87.898 2.402166 -0.46649 +#> ds 1 parent 14 96.0 87.898 8.102166 -1.57340 +#> ds 1 parent 28 80.2 79.402 0.797948 -0.16783 +#> ds 1 parent 28 77.9 79.402 -1.502052 0.31593 +#> ds 1 parent 60 59.3 62.940 -3.639829 0.91247 +#> ds 1 parent 60 59.6 62.940 -3.339829 0.83726 +#> ds 1 parent 90 59.4 50.620 8.779547 -2.56999 +#> ds 1 parent 90 51.0 50.620 0.379547 -0.11110 +#> ds 1 parent 120 38.8 40.712 -1.912380 0.64706 +#> ds 1 parent 120 38.9 40.712 -1.812380 0.61323 +#> ds 2 parent 0 103.2 97.185 6.015158 -1.07774 +#> ds 2 parent 0 95.1 97.185 -2.084842 0.37354 +#> ds 2 parent 1 88.3 95.609 -7.309466 1.32706 +#> ds 2 parent 1 102.4 95.609 6.790534 -1.23285 +#> ds 2 parent 3 88.4 92.535 -4.134911 0.77071 +#> ds 2 parent 3 95.2 92.535 2.665089 -0.49675 +#> ds 2 parent 7 83.5 86.679 -3.179231 0.62426 +#> ds 2 parent 7 96.4 86.679 9.720769 -1.90873 +#> ds 2 parent 14 77.3 77.309 -0.009268 0.00199 +#> ds 2 parent 14 76.0 77.309 -1.309268 0.28113 +#> ds 2 parent 28 61.7 61.499 0.201491 -0.05137 +#> ds 2 parent 28 56.5 61.499 -4.998509 1.27449 +#> ds 2 parent 60 35.1 36.454 -1.353571 0.49087 +#> ds 2 parent 60 32.2 36.454 -4.253571 1.54256 +#> ds 2 parent 90 21.2 22.326 -1.125996 0.53604 +#> ds 2 parent 90 23.3 22.326 0.974004 -0.46368 +#> ds 2 parent 120 14.1 13.674 0.426440 -0.25110 +#> ds 2 parent 120 16.9 13.674 3.226440 -1.89983 +#> ds 3 parent 0 92.4 93.838 -1.437848 0.26501 +#> ds 3 parent 0 94.0 93.838 0.162152 -0.02989 +#> ds 3 parent 1 95.7 91.709 3.991384 -0.74932 +#> ds 3 parent 1 90.8 91.709 -0.908616 0.17058 +#> ds 3 parent 3 86.7 87.594 -0.893997 0.17409 +#> ds 3 parent 3 85.8 87.594 -1.793997 0.34934 +#> ds 3 parent 7 77.1 79.910 -2.810299 0.58817 +#> ds 3 parent 7 81.5 79.910 1.589701 -0.33271 +#> ds 3 parent 14 69.1 68.050 1.050102 -0.24845 +#> ds 3 parent 14 62.4 68.050 -5.649898 1.33675 +#> ds 3 parent 28 49.1 49.349 -0.248837 0.07412 +#> ds 3 parent 28 47.2 49.349 -2.148837 0.64010 +#> ds 3 parent 60 21.9 23.676 -1.775776 0.82085 +#> ds 3 parent 60 23.6 23.676 -0.075776 0.03503 +#> ds 3 parent 90 12.4 11.892 0.507660 -0.31425 +#> ds 3 parent 90 13.8 11.892 1.907660 -1.18088 +#> ds 3 parent 120 4.9 5.974 -1.073521 0.80099 +#> ds 3 parent 120 7.5 5.974 1.526479 -1.13895 +#> ds 4 parent 0 91.8 102.087 -10.287197 1.77084 +#> ds 4 parent 0 104.6 102.087 2.512803 -0.43256 +#> ds 4 parent 1 117.5 101.632 15.867689 -2.74145 +#> ds 4 parent 1 99.3 101.632 -2.332311 0.40295 +#> ds 4 parent 3 94.0 100.729 -6.728610 1.17100 +#> ds 4 parent 3 98.7 100.729 -2.028610 0.35304 +#> ds 4 parent 7 109.2 98.945 10.254756 -1.81080 +#> ds 4 parent 7 89.2 98.945 -9.745244 1.72083 +#> ds 4 parent 14 103.3 95.900 7.400009 -1.34021 +#> ds 4 parent 14 103.0 95.900 7.100009 -1.28588 +#> ds 4 parent 28 90.8 90.088 0.712227 -0.13563 +#> ds 4 parent 28 88.7 90.088 -1.387773 0.26427 +#> ds 4 parent 60 74.8 78.091 -3.291273 0.70124 +#> ds 4 parent 60 75.3 78.091 -2.791273 0.59471 +#> ds 4 parent 90 71.1 68.300 2.800407 -0.66075 +#> ds 4 parent 90 78.0 68.300 9.700407 -2.28880 +#> ds 4 parent 120 59.1 59.736 -0.635668 0.16554 +#> ds 4 parent 120 53.8 59.736 -5.935668 1.54574 +#> ds 5 parent 0 94.9 98.353 -3.452694 0.61266 +#> ds 5 parent 0 101.8 98.353 3.447306 -0.61171 +#> ds 5 parent 1 96.1 96.722 -0.621996 0.11187 +#> ds 5 parent 1 97.1 96.722 0.378004 -0.06799 +#> ds 5 parent 3 93.8 93.541 0.258738 -0.04781 +#> ds 5 parent 3 85.8 93.541 -7.741262 1.43043 +#> ds 5 parent 7 87.6 87.490 0.109848 -0.02141 +#> ds 5 parent 7 94.0 87.490 6.509848 -1.26885 +#> ds 5 parent 14 82.5 77.827 4.672679 -0.99818 +#> ds 5 parent 14 81.7 77.827 3.872679 -0.82728 +#> ds 5 parent 28 60.0 61.585 -1.585419 0.40382 +#> ds 5 parent 28 61.0 61.585 -0.585419 0.14911 +#> ds 5 parent 60 32.5 36.068 -3.568284 1.30251 +#> ds 5 parent 60 35.5 36.068 -0.568284 0.20744 +#> ds 5 parent 90 21.8 21.842 -0.042136 0.02028 +#> ds 5 parent 90 24.4 21.842 2.557864 -1.23088 +#> ds 5 parent 120 14.1 13.227 0.872898 -0.52035 +#> ds 5 parent 120 12.1 13.227 -1.127102 0.67189</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/sitemap.xml b/docs/dev/sitemap.xml index c5f285f1..d9ef2228 100644 --- a/docs/dev/sitemap.xml +++ b/docs/dev/sitemap.xml @@ -190,6 +190,9 @@ <loc>https://pkgdown.jrwb.de/mkin/reference/summary.nlme.mmkin.html</loc> </url> <url> + <loc>https://pkgdown.jrwb.de/mkin/reference/summary.saem.mmkin.html</loc> + </url> + <url> <loc>https://pkgdown.jrwb.de/mkin/reference/synthetic_data_for_UBA_2014.html</loc> </url> <url> |