<!DOCTYPE html> <!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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 Expectation Maximisation algorithm (SAEM)."><!-- 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-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.1.2</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" data-bs-toggle="dropdown" 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/dimethenamid_2018.html">Example evaluations of dimethenamid data from 2018 with nonlinear mixed-effects models</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/" class="external-link"> <span class="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/HEAD/R/saem.R" class="external-link"><code>R/saem.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" class="external-link">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 Expectation Maximisation algorithm (SAEM).</p> </div> <div id="ref-usage"> <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">saem</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> <span></span> <span><span class="co"># S3 method for mmkin</span></span> <span><span class="fu">saem</span><span class="op">(</span></span> <span> <span class="va">object</span>,</span> <span> transformations <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"mkin"</span>, <span class="st">"saemix"</span><span class="op">)</span>,</span> <span> degparms_start <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a></span><span class="op">(</span><span class="op">)</span>,</span> <span> test_log_parms <span class="op">=</span> <span class="cn">TRUE</span>,</span> <span> conf.level <span class="op">=</span> <span class="fl">0.6</span>,</span> <span> solution_type <span class="op">=</span> <span class="st">"auto"</span>,</span> <span> nbiter.saemix <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">300</span>, <span class="fl">100</span><span class="op">)</span>,</span> <span> control <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">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>, nbiter.saemix <span class="op">=</span> <span class="va">nbiter.saemix</span>,</span> <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>,</span> <span> fail_with_errors <span class="op">=</span> <span class="cn">TRUE</span>,</span> <span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span> <span> quiet <span class="op">=</span> <span class="cn">FALSE</span>,</span> <span> <span class="va">...</span></span> <span><span class="op">)</span></span> <span></span> <span><span class="co"># S3 method for saem.mmkin</span></span> <span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">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" class="external-link">max</a></span><span class="op">(</span><span class="fl">3</span>, <span class="fu"><a href="https://rdrr.io/r/base/options.html" class="external-link">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></span> <span></span> <span><span class="fu">saemix_model</span><span class="op">(</span></span> <span> <span class="va">object</span>,</span> <span> solution_type <span class="op">=</span> <span class="st">"auto"</span>,</span> <span> transformations <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"mkin"</span>, <span class="st">"saemix"</span><span class="op">)</span>,</span> <span> degparms_start <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/numeric.html" class="external-link">numeric</a></span><span class="op">(</span><span class="op">)</span>,</span> <span> test_log_parms <span class="op">=</span> <span class="cn">FALSE</span>,</span> <span> conf.level <span class="op">=</span> <span class="fl">0.6</span>,</span> <span> verbose <span class="op">=</span> <span class="cn">FALSE</span>,</span> <span> <span class="va">...</span></span> <span><span class="op">)</span></span> <span></span> <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></span></code></pre></div> </div> <div id="arguments"> <h2>Arguments</h2> <dl><dt>object</dt> <dd><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></dd> <dt>...</dt> <dd><p>Further parameters passed to <a href="https://rdrr.io/pkg/saemix/man/saemixModel.html" class="external-link">saemix::saemixModel</a>.</p></dd> <dt>transformations</dt> <dd><p>Per default, all parameter transformations are done in mkin. If this argument is set to 'saemix', parameter transformations are done in 'saemix' for the supported cases, i.e. (as of version 1.1.2) SFO, FOMC, DFOP and HS without fixing <code>parent_0</code>, and SFO or DFOP with one SFO metabolite.</p></dd> <dt>degparms_start</dt> <dd><p>Parameter values given as a named numeric vector will be used to override the starting values obtained from the 'mmkin' object.</p></dd> <dt>test_log_parms</dt> <dd><p>If TRUE, an attempt is made to use more robust starting values for population parameters fitted as log parameters in mkin (like rate constants) by only considering rate constants that pass the t-test when calculating mean degradation parameters using <a href="mean_degparms.html">mean_degparms</a>.</p></dd> <dt>conf.level</dt> <dd><p>Possibility to adjust the required confidence level for parameter that are tested if requested by 'test_log_parms'.</p></dd> <dt>solution_type</dt> <dd><p>Possibility to specify the solution type in case the automatic choice is not desired</p></dd> <dt>nbiter.saemix</dt> <dd><p>Convenience option to increase the number of iterations</p></dd> <dt>control</dt> <dd><p>Passed to <a href="https://rdrr.io/pkg/saemix/man/saemix.html" class="external-link">saemix::saemix</a>.</p></dd> <dt>fail_with_errors</dt> <dd><p>Should a failure to compute standard errors from the inverse of the Fisher Information Matrix be a failure?</p></dd> <dt>verbose</dt> <dd><p>Should we print information about created objects of type <a href="https://rdrr.io/pkg/saemix/man/SaemixModel-class.html" class="external-link">saemix::SaemixModel</a> and <a href="https://rdrr.io/pkg/saemix/man/SaemixData-class.html" class="external-link">saemix::SaemixData</a>?</p></dd> <dt>quiet</dt> <dd><p>Should we suppress the messages saemix prints at the beginning and the end of the optimisation process?</p></dd> <dt>x</dt> <dd><p>An saem.mmkin object to print</p></dd> <dt>digits</dt> <dd><p>Number of digits to use for printing</p></dd> </dl></div> <div id="value"> <h2>Value</h2> <p>An S3 object of class 'saem.mmkin', containing the fitted <a href="https://rdrr.io/pkg/saemix/man/SaemixObject-class.html" class="external-link">saemix::SaemixObject</a> as a list component named 'so'. The object also inherits from 'mixed.mmkin'.</p> <p>An <a href="https://rdrr.io/pkg/saemix/man/SaemixModel-class.html" class="external-link">saemix::SaemixModel</a> object.</p> <p>An <a href="https://rdrr.io/pkg/saemix/man/SaemixData-class.html" class="external-link">saemix::SaemixData</a> object.</p> </div> <div id="details"> <h2>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" class="external-link">saemix::saemixModel()</a></code> are the mean values of the parameters found using <a href="mmkin.html">mmkin</a>.</p> </div> <div id="see-also"> <h2>See also</h2> <div class="dont-index"><p><a href="summary.saem.mmkin.html">summary.saem.mmkin</a> <a href="plot.mixed.mmkin.html">plot.mixed.mmkin</a></p></div> </div> <div id="ref-examples"> <h2>Examples</h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> <span class="r-in"><span><span class="va">ds</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">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></span> <span class="r-in"><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" class="external-link">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" class="external-link">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></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">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></span> <span class="r-in"><span><span class="va">f_mmkin_parent_p0_fixed</span> <span class="op"><-</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>,</span></span> <span class="r-in"><span> state.ini <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">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></span> <span class="r-in"><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></span></span> <span class="r-in"><span></span></span> <span class="r-in"><span><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" class="external-link">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></span> <span class="r-in"><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></span></span> <span class="r-in"><span><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></span></span> <span class="r-in"><span><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></span></span> <span class="r-in"><span><span class="fu"><a href="illparms.html">illparms</a></span><span class="op">(</span><span class="va">f_saem_dfop</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] "sd(g_qlogis)"</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">update</a></span><span class="op">(</span><span class="va">f_saem_dfop</span>, covariance.model <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/diag.html" class="external-link">diag</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">1</span>, <span class="fl">1</span>, <span class="fl">0</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> Kinetic nonlinear mixed-effects model fit by SAEM</span> <span class="r-out co"><span class="r-pr">#></span> Structural model:</span> <span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> <span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> <span class="r-out co"><span class="r-pr">#></span> * parent</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Data:</span> <span class="r-out co"><span class="r-pr">#></span> 90 observations of 1 variable(s) grouped in 5 datasets</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Likelihood computed by importance sampling</span> <span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> <span class="r-out co"><span class="r-pr">#></span> 490.6 487.5 -237.3</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Fitted parameters:</span> <span class="r-out co"><span class="r-pr">#></span> estimate lower upper</span> <span class="r-out co"><span class="r-pr">#></span> parent_0 93.902 91.3695 96.4339</span> <span class="r-out co"><span class="r-pr">#></span> log_k1 -2.936 -3.9950 -1.8762</span> <span class="r-out co"><span class="r-pr">#></span> log_k2 -3.091 -4.9290 -1.2523</span> <span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.366 -0.6484 -0.0836</span> <span class="r-out co"><span class="r-pr">#></span> a.1 2.385 2.0033 2.7664</span> <span class="r-out co"><span class="r-pr">#></span> SD.parent_0 2.476 0.3890 4.5623</span> <span class="r-out co"><span class="r-pr">#></span> SD.log_k1 1.195 0.4381 1.9517</span> <span class="r-out co"><span class="r-pr">#></span> SD.log_k2 2.092 0.7906 3.3932</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/AIC.html" class="external-link">AIC</a></span><span class="op">(</span><span class="va">f_saem_dfop</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] 493.9811</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># The returned saem.mmkin object contains an SaemixObject, therefore we can use</span></span></span> <span class="r-in"><span><span class="co"># functions from saemix</span></span></span> <span class="r-in"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va">saemix</span><span class="op">)</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Loading required package: npde</span> <span class="r-msg co"><span class="r-pr">#></span> Package saemix, version 3.1</span> <span class="r-msg co"><span class="r-pr">#></span> please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr</span> <span class="r-msg co"><span class="r-pr">#></span> </span> <span class="r-msg co"><span class="r-pr">#></span> Attaching package: ‘saemix’</span> <span class="r-msg co"><span class="r-pr">#></span> The following objects are masked from ‘package:npde’:</span> <span class="r-msg co"><span class="r-pr">#></span> </span> <span class="r-msg co"><span class="r-pr">#></span> kurtosis, skewness</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/compare.saemix.html" class="external-link">compare.saemix</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></span> <span class="r-msg co"><span class="r-pr">#></span> Likelihoods calculated by importance sampling</span> <span class="r-out co"><span class="r-pr">#></span> AIC BIC</span> <span class="r-out co"><span class="r-pr">#></span> 1 624.2598 622.3070</span> <span class="r-out co"><span class="r-pr">#></span> 2 467.8664 465.1324</span> <span class="r-out co"><span class="r-pr">#></span> 3 493.9811 490.4660</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"convergence"</span><span class="op">)</span></span></span> <span class="r-plt img"><img src="saem-1.png" alt="" width="700" height="433"></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"individual.fit"</span><span class="op">)</span></span></span> <span class="r-plt img"><img src="saem-2.png" alt="" width="700" height="433"></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"npde"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> Simulating data using nsim = 1000 simulated datasets</span> <span class="r-out co"><span class="r-pr">#></span> Computing WRES and npde .</span> <span class="r-msg co"><span class="r-pr">#></span> Please use npdeSaemix to obtain VPC and npde</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_fomc</span><span class="op">$</span><span class="va">so</span>, plot.type <span class="op">=</span> <span class="st">"vpc"</span><span class="op">)</span></span></span> <span class="r-plt img"><img src="saem-3.png" alt="" width="700" height="433"></span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="va">f_mmkin_parent_tc</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/update.html" class="external-link">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></span> <span class="r-in"><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></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/compare.saemix.html" class="external-link">compare.saemix</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></span> <span class="r-msg co"><span class="r-pr">#></span> Likelihoods calculated by importance sampling</span> <span class="r-out co"><span class="r-pr">#></span> AIC BIC</span> <span class="r-out co"><span class="r-pr">#></span> 1 467.8664 465.1324</span> <span class="r-out co"><span class="r-pr">#></span> 2 469.9096 466.7851</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="va">sfo_sfo</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> <span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> <span class="r-in"><span><span class="va">fomc_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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"FOMC"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> <span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> <span class="r-in"><span><span class="va">dfop_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="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="st">"A1"</span><span class="op">)</span>,</span></span> <span class="r-in"><span> A1 <span class="op">=</span> <span class="fu"><a href="mkinmod.html">mkinsub</a></span><span class="op">(</span><span class="st">"SFO"</span><span class="op">)</span><span class="op">)</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> <span class="r-in"><span><span class="co"># The following fit uses analytical solutions for SFO-SFO and DFOP-SFO,</span></span></span> <span class="r-in"><span><span class="co"># and compiled ODEs for FOMC that are much slower</span></span></span> <span class="r-in"><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="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span></span></span> <span class="r-in"><span> <span class="st">"SFO-SFO"</span> <span class="op">=</span> <span class="va">sfo_sfo</span>, <span class="st">"FOMC-SFO"</span> <span class="op">=</span> <span class="va">fomc_sfo</span>, <span class="st">"DFOP-SFO"</span> <span class="op">=</span> <span class="va">dfop_sfo</span><span class="op">)</span>,</span></span> <span class="r-in"><span> <span class="va">ds</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="co"># saem fits of SFO-SFO and DFOP-SFO to these data take about five seconds</span></span></span> <span class="r-in"><span><span class="co"># each on this system, as we use analytical solutions written for saemix.</span></span></span> <span class="r-in"><span><span class="co"># When using the analytical solutions written for mkin this took around</span></span></span> <span class="r-in"><span><span class="co"># four minutes</span></span></span> <span class="r-in"><span><span class="va">f_saem_sfo_sfo</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">[</span><span class="st">"SFO-SFO"</span>, <span class="op">]</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="va">f_saem_dfop_sfo</span> <span class="op"><-</span> <span class="fu">saem</span><span class="op">(</span><span class="va">f_mmkin</span><span class="op">[</span><span class="st">"DFOP-SFO"</span>, <span class="op">]</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="co"># We can use print, plot and summary methods to check the results</span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> Kinetic nonlinear mixed-effects model fit by SAEM</span> <span class="r-out co"><span class="r-pr">#></span> Structural model:</span> <span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> <span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> <span class="r-out co"><span class="r-pr">#></span> * parent</span> <span class="r-out co"><span class="r-pr">#></span> d_A1/dt = + f_parent_to_A1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)</span> <span class="r-out co"><span class="r-pr">#></span> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *</span> <span class="r-out co"><span class="r-pr">#></span> exp(-k2 * time))) * parent - k_A1 * A1</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Data:</span> <span class="r-out co"><span class="r-pr">#></span> 170 observations of 2 variable(s) grouped in 5 datasets</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Likelihood computed by importance sampling</span> <span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> <span class="r-out co"><span class="r-pr">#></span> 842 836.9 -408</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Fitted parameters:</span> <span class="r-out co"><span class="r-pr">#></span> estimate lower upper</span> <span class="r-out co"><span class="r-pr">#></span> parent_0 93.7701 91.1458 96.3945</span> <span class="r-out co"><span class="r-pr">#></span> log_k_A1 -5.8116 -7.5998 -4.0234</span> <span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.9608 -1.3654 -0.5562</span> <span class="r-out co"><span class="r-pr">#></span> log_k1 -2.5841 -3.6876 -1.4805</span> <span class="r-out co"><span class="r-pr">#></span> log_k2 -3.5228 -5.3254 -1.7203</span> <span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.1027 -0.8719 0.6665</span> <span class="r-out co"><span class="r-pr">#></span> a.1 1.8856 1.6676 2.1037</span> <span class="r-out co"><span class="r-pr">#></span> SD.parent_0 2.7682 0.7668 4.7695</span> <span class="r-out co"><span class="r-pr">#></span> SD.log_k_A1 1.7447 0.4047 3.0848</span> <span class="r-out co"><span class="r-pr">#></span> SD.f_parent_qlogis 0.4525 0.1620 0.7431</span> <span class="r-out co"><span class="r-pr">#></span> SD.log_k1 1.2423 0.4560 2.0285</span> <span class="r-out co"><span class="r-pr">#></span> SD.log_k2 2.0390 0.7601 3.3180</span> <span class="r-out co"><span class="r-pr">#></span> SD.g_qlogis 0.4439 -0.3069 1.1947</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/plot.html" class="external-link">plot</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span><span class="op">)</span></span></span> <span class="r-plt img"><img src="saem-4.png" alt="" width="700" height="433"></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/pkg/saemix/man/summary-methods.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">f_saem_dfop_sfo</span>, data <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> saemix version used for fitting: 3.1 </span> <span class="r-out co"><span class="r-pr">#></span> mkin version used for pre-fitting: 1.1.2 </span> <span class="r-out co"><span class="r-pr">#></span> R version used for fitting: 4.2.1 </span> <span class="r-out co"><span class="r-pr">#></span> Date of fit: Wed Aug 10 13:15:20 2022 </span> <span class="r-out co"><span class="r-pr">#></span> Date of summary: Wed Aug 10 13:15:20 2022 </span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Equations:</span> <span class="r-out co"><span class="r-pr">#></span> d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *</span> <span class="r-out co"><span class="r-pr">#></span> time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))</span> <span class="r-out co"><span class="r-pr">#></span> * parent</span> <span class="r-out co"><span class="r-pr">#></span> d_A1/dt = + f_parent_to_A1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)</span> <span class="r-out co"><span class="r-pr">#></span> * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *</span> <span class="r-out co"><span class="r-pr">#></span> exp(-k2 * time))) * parent - k_A1 * A1</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Data:</span> <span class="r-out co"><span class="r-pr">#></span> 170 observations of 2 variable(s) grouped in 5 datasets</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Model predictions using solution type analytical </span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Fitted in 9.258 s</span> <span class="r-out co"><span class="r-pr">#></span> Using 300, 100 iterations and 10 chains</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Variance model: Constant variance </span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Mean of starting values for individual parameters:</span> <span class="r-out co"><span class="r-pr">#></span> parent_0 log_k_A1 f_parent_qlogis log_k1 log_k2 </span> <span class="r-out co"><span class="r-pr">#></span> 93.8102 -5.3734 -0.9711 -1.8799 -4.2708 </span> <span class="r-out co"><span class="r-pr">#></span> g_qlogis </span> <span class="r-out co"><span class="r-pr">#></span> 0.1356 </span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Fixed degradation parameter values:</span> <span class="r-out co"><span class="r-pr">#></span> None</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Results:</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Likelihood computed by importance sampling</span> <span class="r-out co"><span class="r-pr">#></span> AIC BIC logLik</span> <span class="r-out co"><span class="r-pr">#></span> 842 836.9 -408</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Optimised parameters:</span> <span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> <span class="r-out co"><span class="r-pr">#></span> parent_0 93.7701 91.1458 96.3945</span> <span class="r-out co"><span class="r-pr">#></span> log_k_A1 -5.8116 -7.5998 -4.0234</span> <span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.9608 -1.3654 -0.5562</span> <span class="r-out co"><span class="r-pr">#></span> log_k1 -2.5841 -3.6876 -1.4805</span> <span class="r-out co"><span class="r-pr">#></span> log_k2 -3.5228 -5.3254 -1.7203</span> <span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.1027 -0.8719 0.6665</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Correlation: </span> <span class="r-out co"><span class="r-pr">#></span> parnt_0 lg_k_A1 f_prnt_ log_k1 log_k2 </span> <span class="r-out co"><span class="r-pr">#></span> log_k_A1 -0.0160 </span> <span class="r-out co"><span class="r-pr">#></span> f_parent_qlogis -0.0263 0.0612 </span> <span class="r-out co"><span class="r-pr">#></span> log_k1 0.0100 -0.0014 -0.0033 </span> <span class="r-out co"><span class="r-pr">#></span> log_k2 0.0131 0.0050 -0.0011 0.0071 </span> <span class="r-out co"><span class="r-pr">#></span> g_qlogis -0.0419 -0.0199 0.0026 -0.0765 -0.0707</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Random effects:</span> <span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> <span class="r-out co"><span class="r-pr">#></span> SD.parent_0 2.7682 0.7668 4.7695</span> <span class="r-out co"><span class="r-pr">#></span> SD.log_k_A1 1.7447 0.4047 3.0848</span> <span class="r-out co"><span class="r-pr">#></span> SD.f_parent_qlogis 0.4525 0.1620 0.7431</span> <span class="r-out co"><span class="r-pr">#></span> SD.log_k1 1.2423 0.4560 2.0285</span> <span class="r-out co"><span class="r-pr">#></span> SD.log_k2 2.0390 0.7601 3.3180</span> <span class="r-out co"><span class="r-pr">#></span> SD.g_qlogis 0.4439 -0.3069 1.1947</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Variance model:</span> <span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> <span class="r-out co"><span class="r-pr">#></span> a.1 1.886 1.668 2.104</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Backtransformed parameters:</span> <span class="r-out co"><span class="r-pr">#></span> est. lower upper</span> <span class="r-out co"><span class="r-pr">#></span> parent_0 93.770115 9.115e+01 96.39447</span> <span class="r-out co"><span class="r-pr">#></span> k_A1 0.002993 5.005e-04 0.01789</span> <span class="r-out co"><span class="r-pr">#></span> f_parent_to_A1 0.276720 2.034e-01 0.36443</span> <span class="r-out co"><span class="r-pr">#></span> k1 0.075467 2.503e-02 0.22753</span> <span class="r-out co"><span class="r-pr">#></span> k2 0.029516 4.867e-03 0.17902</span> <span class="r-out co"><span class="r-pr">#></span> g 0.474353 2.949e-01 0.66073</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Resulting formation fractions:</span> <span class="r-out co"><span class="r-pr">#></span> ff</span> <span class="r-out co"><span class="r-pr">#></span> parent_A1 0.2767</span> <span class="r-out co"><span class="r-pr">#></span> parent_sink 0.7233</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Estimated disappearance times:</span> <span class="r-out co"><span class="r-pr">#></span> DT50 DT90 DT50back DT50_k1 DT50_k2</span> <span class="r-out co"><span class="r-pr">#></span> parent 14.56 58.26 17.54 9.185 23.48</span> <span class="r-out co"><span class="r-pr">#></span> A1 231.62 769.41 NA NA NA</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Data:</span> <span class="r-out co"><span class="r-pr">#></span> ds name time observed predicted residual std standardized</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 0 97.2 95.78623 1.41377 1.886 0.749758</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 0 96.4 95.78623 0.61377 1.886 0.325498</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 3 71.1 71.34666 -0.24666 1.886 -0.130812</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 3 69.2 71.34666 -2.14666 1.886 -1.138429</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 6 58.1 56.49768 1.60232 1.886 0.849749</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 6 56.6 56.49768 0.10232 1.886 0.054262</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 10 44.4 44.53511 -0.13511 1.886 -0.071650</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 10 43.4 44.53511 -1.13511 1.886 -0.601974</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 20 33.3 29.77451 3.52549 1.886 1.869656</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 20 29.2 29.77451 -0.57451 1.886 -0.304675</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 34 17.6 19.32540 -1.72540 1.886 -0.915023</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 34 18.0 19.32540 -1.32540 1.886 -0.702894</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 55 10.5 10.42781 0.07219 1.886 0.038282</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 55 9.3 10.42781 -1.12781 1.886 -0.598107</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 90 4.5 3.74190 0.75810 1.886 0.402037</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 90 4.7 3.74190 0.95810 1.886 0.508102</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 112 3.0 1.96485 1.03515 1.886 0.548966</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 112 3.4 1.96485 1.43515 1.886 0.761096</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 132 2.3 1.09395 1.20605 1.886 0.639596</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 parent 132 2.7 1.09395 1.60605 1.886 0.851726</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 3 4.3 4.72702 -0.42702 1.886 -0.226458</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 3 4.6 4.72702 -0.12702 1.886 -0.067361</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 6 7.0 7.51314 -0.51314 1.886 -0.272128</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 6 7.2 7.51314 -0.31314 1.886 -0.166063</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 10 8.2 9.63719 -1.43719 1.886 -0.762179</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 10 8.0 9.63719 -1.63719 1.886 -0.868244</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 20 11.0 11.84931 -0.84931 1.886 -0.450409</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 20 13.7 11.84931 1.85069 1.886 0.981468</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 34 11.5 12.82336 -1.32336 1.886 -0.701808</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 34 12.7 12.82336 -0.12336 1.886 -0.065418</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 55 14.9 12.89456 2.00544 1.886 1.063533</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 55 14.5 12.89456 1.60544 1.886 0.851403</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 90 12.1 11.55919 0.54081 1.886 0.286806</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 90 12.3 11.55919 0.74081 1.886 0.392871</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 112 9.9 10.42334 -0.52334 1.886 -0.277539</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 112 10.2 10.42334 -0.22334 1.886 -0.118442</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 132 8.8 9.37987 -0.57987 1.886 -0.307519</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 6 A1 132 7.8 9.37987 -1.57987 1.886 -0.837844</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 0 93.6 90.95702 2.64298 1.886 1.401639</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 0 92.3 90.95702 1.34298 1.886 0.712217</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 3 87.0 84.77506 2.22494 1.886 1.179942</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 3 82.2 84.77506 -2.57506 1.886 -1.365616</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 7 74.0 77.60962 -3.60962 1.886 -1.914268</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 7 73.9 77.60962 -3.70962 1.886 -1.967301</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 14 64.2 67.50646 -3.30646 1.886 -1.753499</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 14 69.5 67.50646 1.99354 1.886 1.057221</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 30 54.0 52.48909 1.51091 1.886 0.801271</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 30 54.6 52.48909 2.11091 1.886 1.119465</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 60 41.1 39.54372 1.55628 1.886 0.825335</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 60 38.4 39.54372 -1.14372 1.886 -0.606542</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 90 32.5 33.87968 -1.37968 1.886 -0.731676</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 90 35.5 33.87968 1.62032 1.886 0.859298</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 120 28.1 30.41071 -2.31071 1.886 -1.225427</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 120 29.0 30.41071 -1.41071 1.886 -0.748135</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 180 26.5 25.36386 1.13614 1.886 0.602524</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 parent 180 27.6 25.36386 2.23614 1.886 1.185881</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 3 3.9 2.74863 1.15137 1.886 0.610600</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 3 3.1 2.74863 0.35137 1.886 0.186341</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 7 6.9 5.92686 0.97314 1.886 0.516081</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 7 6.6 5.92686 0.67314 1.886 0.356983</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 14 10.4 10.38800 0.01200 1.886 0.006362</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 14 8.3 10.38800 -2.08800 1.886 -1.107320</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 30 14.4 16.93529 -2.53529 1.886 -1.344524</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 30 13.7 16.93529 -3.23529 1.886 -1.715751</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 60 22.1 22.33044 -0.23044 1.886 -0.122209</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 60 22.3 22.33044 -0.03044 1.886 -0.016144</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 90 27.5 24.42300 3.07700 1.886 1.631809</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 90 25.4 24.42300 0.97700 1.886 0.518127</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 120 28.0 25.51140 2.48860 1.886 1.319768</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 120 26.6 25.51140 1.08860 1.886 0.577313</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 180 25.8 26.80282 -1.00282 1.886 -0.531818</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 7 A1 180 25.3 26.80282 -1.50282 1.886 -0.796981</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 0 91.9 91.08733 0.81267 1.886 0.430980</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 0 90.8 91.08733 -0.28733 1.886 -0.152377</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 1 64.9 67.55332 -2.65332 1.886 -1.407123</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 1 66.2 67.55332 -1.35332 1.886 -0.717701</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 3 43.5 41.65811 1.84189 1.886 0.976800</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 3 44.1 41.65811 2.44189 1.886 1.294994</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 8 18.3 19.65773 -1.35773 1.886 -0.720038</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 8 18.1 19.65773 -1.55773 1.886 -0.826103</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 14 10.2 10.65118 -0.45118 1.886 -0.239269</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 14 10.8 10.65118 0.14882 1.886 0.078925</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 27 4.9 3.11694 1.78306 1.886 0.945601</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 27 3.3 3.11694 0.18306 1.886 0.097082</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 48 1.6 0.43165 1.16835 1.886 0.619603</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 48 1.5 0.43165 1.06835 1.886 0.566570</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 70 1.1 0.05441 1.04559 1.886 0.554503</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 parent 70 0.9 0.05441 0.84559 1.886 0.448438</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 1 9.6 7.66431 1.93569 1.886 1.026546</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 1 7.7 7.66431 0.03569 1.886 0.018930</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 3 15.0 15.57948 -0.57948 1.886 -0.307311</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 3 15.1 15.57948 -0.47948 1.886 -0.254279</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 8 21.2 20.38988 0.81012 1.886 0.429625</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 8 21.1 20.38988 0.71012 1.886 0.376593</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 14 19.7 20.16439 -0.46439 1.886 -0.246276</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 14 18.9 20.16439 -1.26439 1.886 -0.670535</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 27 17.5 16.40918 1.09082 1.886 0.578489</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 27 15.9 16.40918 -0.50918 1.886 -0.270030</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 48 9.5 10.12011 -0.62011 1.886 -0.328861</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 48 9.8 10.12011 -0.32011 1.886 -0.169764</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 70 6.2 5.79080 0.40920 1.886 0.217011</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 8 A1 70 6.1 5.79080 0.30920 1.886 0.163979</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 0 99.8 97.38786 2.41214 1.886 1.279218</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 0 98.3 97.38786 0.91214 1.886 0.483731</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 1 77.1 79.25431 -2.15431 1.886 -1.142481</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 1 77.2 79.25431 -2.05431 1.886 -1.089449</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 3 59.0 55.69866 3.30134 1.886 1.750781</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 3 58.1 55.69866 2.40134 1.886 1.273489</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 8 27.4 31.64893 -4.24893 1.886 -2.253314</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 8 29.2 31.64893 -2.44893 1.886 -1.298729</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 14 19.1 22.57316 -3.47316 1.886 -1.841901</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 14 29.6 22.57316 7.02684 1.886 3.726507</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 27 10.1 14.11345 -4.01345 1.886 -2.128430</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 27 18.2 14.11345 4.08655 1.886 2.167199</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 48 4.5 6.95586 -2.45586 1.886 -1.302400</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 48 9.1 6.95586 2.14414 1.886 1.137093</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 70 2.3 3.31753 -1.01753 1.886 -0.539619</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 70 2.9 3.31753 -0.41753 1.886 -0.221424</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 91 2.0 1.63642 0.36358 1.886 0.192816</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 91 1.8 1.63642 0.16358 1.886 0.086751</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 120 2.0 0.61667 1.38333 1.886 0.733614</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 parent 120 2.2 0.61667 1.58333 1.886 0.839679</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 1 4.2 3.67247 0.52753 1.886 0.279763</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 1 3.9 3.67247 0.22753 1.886 0.120666</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 3 7.4 8.36240 -0.96240 1.886 -0.510385</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 3 7.9 8.36240 -0.46240 1.886 -0.245223</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 8 14.5 12.80590 1.69410 1.886 0.898422</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 8 13.7 12.80590 0.89410 1.886 0.474162</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 14 14.2 13.99625 0.20375 1.886 0.108053</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 14 12.2 13.99625 -1.79625 1.886 -0.952596</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 27 13.7 14.22730 -0.52730 1.886 -0.279641</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 27 13.2 14.22730 -1.02730 1.886 -0.544803</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 48 13.6 13.33713 0.26287 1.886 0.139406</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 48 15.4 13.33713 2.06287 1.886 1.093991</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 70 10.4 11.84008 -1.44008 1.886 -0.763708</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 70 11.6 11.84008 -0.24008 1.886 -0.127318</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 91 10.0 10.30732 -0.30732 1.886 -0.162980</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 91 9.5 10.30732 -0.80732 1.886 -0.428142</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 120 9.1 8.33981 0.76019 1.886 0.403149</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 9 A1 120 9.0 8.33981 0.66019 1.886 0.350117</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 0 96.1 93.70349 2.39651 1.886 1.270926</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 0 94.3 93.70349 0.59651 1.886 0.316342</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 8 73.9 77.86253 -3.96253 1.886 -2.101429</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 8 73.9 77.86253 -3.96253 1.886 -2.101429</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 14 69.4 70.18665 -0.78665 1.886 -0.417182</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 14 73.1 70.18665 2.91335 1.886 1.545019</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 21 65.6 64.03245 1.56755 1.886 0.831308</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 21 65.3 64.03245 1.26755 1.886 0.672210</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 41 55.9 54.71491 1.18509 1.886 0.628480</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 41 54.4 54.71491 -0.31491 1.886 -0.167007</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 63 47.0 49.63436 -2.63436 1.886 -1.397065</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 63 49.3 49.63436 -0.33436 1.886 -0.177319</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 91 44.7 45.08853 -0.38853 1.886 -0.206049</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 91 46.7 45.08853 1.61147 1.886 0.854600</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 120 42.1 41.07653 1.02347 1.886 0.542772</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 parent 120 41.3 41.07653 0.22347 1.886 0.118513</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 8 3.3 4.08295 -0.78295 1.886 -0.415218</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 8 3.4 4.08295 -0.68295 1.886 -0.362186</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 14 3.9 6.04367 -2.14367 1.886 -1.136841</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 14 2.9 6.04367 -3.14367 1.886 -1.667165</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 21 6.4 7.59693 -1.19693 1.886 -0.634761</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 21 7.2 7.59693 -0.39693 1.886 -0.210502</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 41 9.1 9.86436 -0.76436 1.886 -0.405361</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 41 8.5 9.86436 -1.36436 1.886 -0.723555</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 63 11.7 10.99397 0.70603 1.886 0.374425</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 63 12.0 10.99397 1.00603 1.886 0.533522</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 91 13.3 11.91274 1.38726 1.886 0.735696</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 91 13.2 11.91274 1.28726 1.886 0.682663</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 120 14.3 12.66519 1.63481 1.886 0.866981</span> <span class="r-out co"><span class="r-pr">#></span> Dataset 10 A1 120 12.1 12.66519 -0.56519 1.886 -0.299733</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># The following takes about 6 minutes</span></span></span> <span class="r-in"><span><span class="co">#f_saem_dfop_sfo_deSolve <- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve",</span></span></span> <span class="r-in"><span><span class="co"># control = list(nbiter.saemix = c(200, 80), nbdisplay = 10))</span></span></span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co">#saemix::compare.saemix(list(</span></span></span> <span class="r-in"><span><span class="co"># f_saem_dfop_sfo$so,</span></span></span> <span class="r-in"><span><span class="co"># f_saem_dfop_sfo_deSolve$so))</span></span></span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># If the model supports it, we can also use eigenvalue based solutions, which</span></span></span> <span class="r-in"><span><span class="co"># take a similar amount of time</span></span></span> <span class="r-in"><span><span class="co">#f_saem_sfo_sfo_eigen <- saem(f_mmkin["SFO-SFO", ], solution_type = "eigen",</span></span></span> <span class="r-in"><span><span class="co"># control = list(nbiter.saemix = c(200, 80), nbdisplay = 10))</span></span></span> <span class="r-in"><span><span class="co"># }</span></span></span> </code></pre></div> </div> </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></p><p>Developed by Johannes Ranke.</p> </div> <div class="pkgdown"> <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.6.</p> </div> </footer></div> </body></html>