aboutsummaryrefslogblamecommitdiff
path: root/docs/dev/reference/saem.html
blob: 1e92e3fbb8bde7c4c555e1713385f34569a329e3 (plain) (tree)










































                                                                                                                                                                                                             

                                                                                















































































                                                                                                                                                                                                    
                                             
















                                                 
                                                                                                                                     




                                                                                                                                                         

                                                                                                         

          
                                                                                                                                                                



                                                     
                                                                                                                                                                                                                                    
                                                                                                                                                                               
                                                                         

                                                                                                                                                                                                                                                                                                                                                                                   

                                                                      
                                                                


                             


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            



                                                                                                                                                                                                                                    
                                                                                                                                                                               


                                                                  











                                                                                                                                                                                                                       
                  
                                                                                                                                     

         







                                                                                     




                                                                                  






                                                                                                       


                      

                                                                                                                                                                                                





                                                         
        




                                                                           






                                                          



                                                                                   
                                                                

                                                                                                                             








                                                                                                                                                    

                                                                                            
                                                                                                                                                      





                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                        


                                                                                                                                                                                                                                                                                                                                                                                           
                                    

                               
                                                             


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                                    

                               
                                                                                                                                                                                                                                                                                                                                     
                                                              
                                    

                               
                                                                                                                                                                                                                                                                                                                                     
                                                              
                                    

                               
                                                             
                                                                                                       



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             





                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      



                                              


                                                   



                                             















                                                                                                                                                                                                                                                                                                                                                                                              


                                                                                                                                                                                                                                                                                                                    
                                    

                               

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    






                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
                                                                         


                                                                                                                                                                                                                                                                                                                       



                                                                                                 

                                                                                                                                                                                                                                                                       
                                    

                               
                                                                                                                                                                                                                                                                                                                                      
                                                              
                                    

                               
                                                                                                                                                      













                                                                                                                                                                      























                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                               
                                                                                  

                                                   

                                                













                                                                            
                                                 




                                                                                      
                                                                                      
                      
                      






                                                
                          
                          
      
                           






                                             





                                                        

                                                        

                     
                                              





                                              

                     

                           
      
                                 
                                                 





                                                 


                                    

                        


                                                    
                                                    













































































































































































                                                                                                     












                                                                                                             




























                                                                                
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
  <head>
  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Fit nonlinear mixed models with SAEM — saem • mkin</title>


<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>

<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>

<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />

<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>

<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>

<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>




<meta property="og:title" content="Fit nonlinear mixed models with SAEM — saem" />
<meta property="og:description" content="This function uses saemix::saemix() as a backend for fitting nonlinear mixed
effects models created from mmkin row objects using the Stochastic Approximation
Expectation Maximisation algorithm (SAEM)." />


<meta name="robots" content="noindex">

<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>

<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->



  </head>

  <body data-spy="scroll" data-target="#toc">
    <div class="container template-reference-topic">
      <header>
      <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="../index.html">mkin</a>
        <span class="version label label-info" data-toggle="tooltip" data-placement="bottom" title="In-development version">0.9.50.4</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="../reference/index.html">Functions and data</a>
</li>
<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
    Articles
     
    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu">
    <li>
      <a href="../articles/mkin.html">Introduction to mkin</a>
    </li>
    <li>
      <a href="../articles/FOCUS_D.html">Example evaluation of FOCUS Example Dataset D</a>
    </li>
    <li>
      <a href="../articles/FOCUS_L.html">Example evaluation of FOCUS Laboratory Data L1 to L3</a>
    </li>
    <li>
      <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a>
    </li>
    <li>
      <a href="../articles/web_only/compiled_models.html">Performance benefit by using compiled model definitions in mkin</a>
    </li>
    <li>
      <a href="../articles/twa.html">Calculation of time weighted average concentrations with mkin</a>
    </li>
    <li>
      <a href="../articles/web_only/NAFTA_examples.html">Example evaluation of NAFTA SOP Attachment examples</a>
    </li>
    <li>
      <a href="../articles/web_only/benchmarks.html">Some benchmark timings</a>
    </li>
  </ul>
</li>
<li>
  <a href="../news/index.html">News</a>
</li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li>
  <a href="https://github.com/jranke/mkin/">
    <span class="fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
      
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      

      </header>

<div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>Fit nonlinear mixed models with SAEM</h1>
    <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/saem.R'><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'>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>

    <pre class="usage"><span class='fu'>saem</span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span><span class='op'>)</span>

<span class='co'># S3 method for mmkin</span>
<span class='fu'>saem</span><span class='op'>(</span>
  <span class='va'>object</span>,
  transformations <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'>"mkin"</span>, <span class='st'>"saemix"</span><span class='op'>)</span>,
  degparms_start <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/numeric.html'>numeric</a></span><span class='op'>(</span><span class='op'>)</span>,
  solution_type <span class='op'>=</span> <span class='st'>"auto"</span>,
  control <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>displayProgress <span class='op'>=</span> <span class='cn'>FALSE</span>, print <span class='op'>=</span> <span class='cn'>FALSE</span>, save <span class='op'>=</span> <span class='cn'>FALSE</span>, save.graphs <span class='op'>=</span>
    <span class='cn'>FALSE</span><span class='op'>)</span>,
  verbose <span class='op'>=</span> <span class='cn'>FALSE</span>,
  suppressPlot <span class='op'>=</span> <span class='cn'>TRUE</span>,
  quiet <span class='op'>=</span> <span class='cn'>FALSE</span>,
  <span class='va'>...</span>
<span class='op'>)</span>

<span class='co'># S3 method for 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>, <span class='va'>...</span><span class='op'>)</span>

<span class='fu'>saemix_model</span><span class='op'>(</span>
  <span class='va'>object</span>,
  solution_type <span class='op'>=</span> <span class='st'>"auto"</span>,
  transformations <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'>"mkin"</span>, <span class='st'>"saemix"</span><span class='op'>)</span>,
  degparms_start <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/numeric.html'>numeric</a></span><span class='op'>(</span><span class='op'>)</span>,
  verbose <span class='op'>=</span> <span class='cn'>FALSE</span>,
  <span class='va'>...</span>
<span class='op'>)</span>

<span class='fu'>saemix_data</span><span class='op'>(</span><span class='va'>object</span>, verbose <span class='op'>=</span> <span class='cn'>FALSE</span>, <span class='va'>...</span><span class='op'>)</span></pre>

    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
    <table class="ref-arguments">
    <colgroup><col class="name" /><col class="desc" /></colgroup>
    <tr>
      <th>object</th>
      <td><p>An <a href='mmkin.html'>mmkin</a> row object containing several fits of the same
<a href='mkinmod.html'>mkinmod</a> model to different datasets</p></td>
    </tr>
    <tr>
      <th>...</th>
      <td><p>Further parameters passed to <a href='https://rdrr.io/pkg/saemix/man/saemixModel.html'>saemix::saemixModel</a>.</p></td>
    </tr>
    <tr>
      <th>transformations</th>
      <td><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. Currently this is only
supported in cases where the initial concentration of the parent is not fixed,
SFO or DFOP is used for the parent and there is either no metabolite or one.</p></td>
    </tr>
    <tr>
      <th>degparms_start</th>
      <td><p>Parameter values given as a named numeric vector will
be used to override the starting values obtained from the 'mmkin' object.</p></td>
    </tr>
    <tr>
      <th>solution_type</th>
      <td><p>Possibility to specify the solution type in case the
automatic choice is not desired</p></td>
    </tr>
    <tr>
      <th>control</th>
      <td><p>Passed to <a href='https://rdrr.io/pkg/saemix/man/saemix.html'>saemix::saemix</a></p></td>
    </tr>
    <tr>
      <th>verbose</th>
      <td><p>Should we print information about created objects of
type <a href='https://rdrr.io/pkg/saemix/man/SaemixModel-class.html'>saemix::SaemixModel</a> and <a href='https://rdrr.io/pkg/saemix/man/SaemixData-class.html'>saemix::SaemixData</a>?</p></td>
    </tr>
    <tr>
      <th>suppressPlot</th>
      <td><p>Should we suppress any plotting that is done
by the saemix function?</p></td>
    </tr>
    <tr>
      <th>quiet</th>
      <td><p>Should we suppress the messages saemix prints at the beginning
and the end of the optimisation process?</p></td>
    </tr>
    <tr>
      <th>x</th>
      <td><p>An saem.mmkin object to print</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>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'. The
object also inherits from 'mixed.mmkin'.</p>
<p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixModel-class.html'>saemix::SaemixModel</a> object.</p>
<p>An <a href='https://rdrr.io/pkg/saemix/man/SaemixData-class.html'>saemix::SaemixData</a> object.</p>
    <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>

    <p>An mmkin row object is essentially a list of mkinfit objects that have been
obtained by fitting the same model to a list of datasets using <a href='mkinfit.html'>mkinfit</a>.</p>
<p>Starting values for the fixed effects (population mean parameters, argument
psi0 of <code><a href='https://rdrr.io/pkg/saemix/man/saemixModel.html'>saemix::saemixModel()</a></code> are the mean values of the parameters found
using <a href='mmkin.html'>mmkin</a>.</p>
    <h2 class="hasAnchor" id="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> <a href='plot.mixed.mmkin.html'>plot.mixed.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>
<span class='va'>ds</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span><span class='op'>(</span><span class='va'>experimental_data_for_UBA_2019</span><span class='op'>[</span><span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>]</span>,
 <span class='kw'>function</span><span class='op'>(</span><span class='va'>x</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span><span class='op'>(</span><span class='va'>x</span><span class='op'>$</span><span class='va'>data</span><span class='op'>[</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span><span class='op'>)</span><span class='op'>]</span><span class='op'>)</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/names.html'>names</a></span><span class='op'>(</span><span class='va'>ds</span><span class='op'>)</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/paste.html'>paste</a></span><span class='op'>(</span><span class='st'>"Dataset"</span>, <span class='fl'>6</span><span class='op'>:</span><span class='fl'>10</span><span class='op'>)</span>
<span class='va'>f_mmkin_parent_p0_fixed</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='va'>ds</span>,
  state.ini <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fl'>100</span><span class='op'>)</span>, fixed_initials <span class='op'>=</span> <span class='st'>"parent"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='va'>f_saem_p0_fixed</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent_p0_fixed</span><span class='op'>)</span>
</div><div class='output co'>#&gt; Running main SAEM algorithm
#&gt; [1] "Mon Dec 21 05:58:33 2020"
#&gt; ....
#&gt;     Minimisation finished
#&gt; [1] "Mon Dec 21 05:58:34 2020"</div><div class='input'>
<span class='va'>f_mmkin_parent</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span><span class='op'>)</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='va'>f_saem_sfo</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"SFO"</span>, <span class='op'>]</span><span class='op'>)</span>
</div><div class='output co'>#&gt; Running main SAEM algorithm
#&gt; [1] "Mon Dec 21 05:58:36 2020"
#&gt; ....
#&gt;     Minimisation finished
#&gt; [1] "Mon Dec 21 05:58:37 2020"</div><div class='input'><span class='va'>f_saem_fomc</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span><span class='op'>)</span>
</div><div class='output co'>#&gt; Running main SAEM algorithm
#&gt; [1] "Mon Dec 21 05:58:38 2020"
#&gt; ....
#&gt;     Minimisation finished
#&gt; [1] "Mon Dec 21 05:58:40 2020"</div><div class='input'><span class='va'>f_saem_dfop</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent</span><span class='op'>[</span><span class='st'>"DFOP"</span>, <span class='op'>]</span><span class='op'>)</span>
</div><div class='output co'>#&gt; Running main SAEM algorithm
#&gt; [1] "Mon Dec 21 05:58:40 2020"
#&gt; ....
#&gt;     Minimisation finished
#&gt; [1] "Mon Dec 21 05:58:43 2020"</div><div class='input'>
<span class='co'># The returned saem.mmkin object contains an SaemixObject, therefore we can use</span>
<span class='co'># functions from saemix</span>
<span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'>saemix</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='message'>Package saemix, version 3.1.9000</span>
#&gt; <span class='message'>  please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='va'>f_saem_sfo</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_dfop</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='error'>Error in compare.saemix(list(f_saem_sfo$so, f_saem_fomc$so, f_saem_dfop$so)): 'compare.saemix' requires at least two models.</span></div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>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>
</div><div class='output co'>#&gt; Plotting convergence plots</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>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>
</div><div class='img'><img src='saem-1.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt; Plotting individual fits</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>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>
</div><div class='img'><img src='saem-2.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt; Simulating data using nsim = 1000 simulated datasets
#&gt; Computing WRES and npde .
#&gt; Plotting npde</div><div class='img'><img src='saem-3.png' alt='' width='700' height='433' /></div><div class='output co'>#&gt; ---------------------------------------------
#&gt; Distribution of npde:
#&gt;            mean= -0.01528   (SE= 0.098 )
#&gt;        variance= 0.862   (SE= 0.13 )
#&gt;        skewness= 0.5016 
#&gt;        kurtosis= 1.18 
#&gt; ---------------------------------------------
#&gt; 
#&gt; Statistical tests
#&gt;   Wilcoxon signed rank test  : 0.679
#&gt;   Fisher variance test       : 0.36
#&gt;   SW test of normality       : 0.0855 .
#&gt; Global adjusted p-value      : 0.257
#&gt; ---
#&gt; Signif. codes: '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 
#&gt; ---------------------------------------------</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span><span class='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>
</div><div class='output co'>#&gt; Performing simulations under the model.
#&gt; Plotting VPC
#&gt; Method used for VPC: binning by quantiles on X , dividing into the following intervals
#&gt;   Interval  Centered.On
#&gt; 1 (-1,3]      1.3      
#&gt; 2 (3,8]       7.4      
#&gt; 3 (8,14]     13.2      
#&gt; 4 (14,21]    20.5      
#&gt; 5 (21,37.7]  29.5      
#&gt; 6 (37.7,60]  50.4      
#&gt; 7 (60,90]    76.6      
#&gt; 8 (90,120]  109.0      
#&gt; 9 (120,180] 156.0      </div><div class='img'><img src='saem-4.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='va'>f_mmkin_parent_tc</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span><span class='op'>(</span><span class='va'>f_mmkin_parent</span>, error_model <span class='op'>=</span> <span class='st'>"tc"</span><span class='op'>)</span>
<span class='va'>f_saem_fomc_tc</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin_parent_tc</span><span class='op'>[</span><span class='st'>"FOMC"</span>, <span class='op'>]</span><span class='op'>)</span>
</div><div class='output co'>#&gt; Running main SAEM algorithm
#&gt; [1] "Mon Dec 21 05:58:46 2020"
#&gt; ....
#&gt;     Minimisation finished
#&gt; [1] "Mon Dec 21 05:58:51 2020"</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/compare.saemix.html'>compare.saemix</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='va'>f_saem_fomc</span><span class='op'>$</span><span class='va'>so</span>, <span class='va'>f_saem_fomc_tc</span><span class='op'>$</span><span class='va'>so</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='error'>Error in compare.saemix(list(f_saem_fomc$so, f_saem_fomc_tc$so)): 'compare.saemix' requires at least two models.</span></div><div class='input'>
<span class='va'>sfo_sfo</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"A1"</span><span class='op'>)</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>
</div><div class='output co'>#&gt; <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'><span class='va'>fomc_sfo</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"FOMC"</span>, <span class='st'>"A1"</span><span class='op'>)</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>
</div><div class='output co'>#&gt; <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'><span class='va'>dfop_sfo</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span><span class='op'>(</span>parent <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"DFOP"</span>, <span class='st'>"A1"</span><span class='op'>)</span>,
  A1 <span class='op'>=</span> <span class='fu'><a href='mkinmod.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='message'>Temporary DLL for differentials generated and loaded</span></div><div class='input'><span class='co'># The following fit uses analytical solutions for SFO-SFO and DFOP-SFO,</span>
<span class='co'># and compiled ODEs for FOMC that are much slower</span>
<span class='va'>f_mmkin</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</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 class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
<span class='co'># saem fits of SFO-SFO and DFOP-SFO to these data take about five seconds</span>
<span class='co'># each on this system, as we use analytical solutions written for saemix.</span>
<span class='co'># When using the analytical solutions written for mkin this took around</span>
<span class='co'># four minutes</span>
<span class='va'>f_saem_sfo_sfo</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>[</span><span class='st'>"SFO-SFO"</span>, <span class='op'>]</span><span class='op'>)</span>
</div><div class='output co'>#&gt; Running main SAEM algorithm
#&gt; [1] "Mon Dec 21 05:58:53 2020"
#&gt; ....
#&gt;     Minimisation finished
#&gt; [1] "Mon Dec 21 05:58:58 2020"</div><div class='input'><span class='va'>f_saem_dfop_sfo</span> <span class='op'>&lt;-</span> <span class='fu'>saem</span><span class='op'>(</span><span class='va'>f_mmkin</span><span class='op'>[</span><span class='st'>"DFOP-SFO"</span>, <span class='op'>]</span><span class='op'>)</span>
</div><div class='output co'>#&gt; Running main SAEM algorithm
#&gt; [1] "Mon Dec 21 05:58:59 2020"
#&gt; ....
#&gt;     Minimisation finished
#&gt; [1] "Mon Dec 21 05:59:08 2020"</div><div class='input'><span class='co'># We can use print, plot and summary methods to check the results</span>
<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>f_saem_dfop_sfo</span><span class='op'>)</span>
</div><div class='output co'>#&gt; Kinetic nonlinear mixed-effects model fit by SAEM
#&gt; Structural model:
#&gt; d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
#&gt;            time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
#&gt;            * parent
#&gt; d_A1/dt = + f_parent_to_A1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)
#&gt;            * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *
#&gt;            exp(-k2 * time))) * parent - k_A1 * A1
#&gt; 
#&gt; Data:
#&gt; 170 observations of 2 variable(s) grouped in 5 datasets
#&gt; 
#&gt; Likelihood computed by importance sampling
#&gt;     AIC   BIC logLik
#&gt;   841.6 836.5 -407.8
#&gt; 
#&gt; Fitted parameters:
#&gt;                     estimate    lower   upper
#&gt; parent_0            93.76647 91.15312 96.3798
#&gt; log_k_A1            -6.13235 -8.45788 -3.8068
#&gt; f_parent_qlogis     -0.97364 -1.36940 -0.5779
#&gt; log_k1              -2.53176 -3.80372 -1.2598
#&gt; log_k2              -3.58667 -5.29524 -1.8781
#&gt; g_qlogis             0.01238 -1.07968  1.1044
#&gt; Var.parent_0         7.61106 -3.34955 18.5717
#&gt; Var.log_k_A1         4.64679 -2.73133 12.0249
#&gt; Var.f_parent_qlogis  0.19693 -0.05498  0.4488
#&gt; Var.log_k1           2.01717 -0.51980  4.5542
#&gt; Var.log_k2           3.63412 -0.92964  8.1979
#&gt; Var.g_qlogis         0.20045 -0.97425  1.3751
#&gt; a.1                  1.88335  1.66636  2.1004
#&gt; SD.parent_0          2.75881  0.77234  4.7453
#&gt; SD.log_k_A1          2.15564  0.44429  3.8670
#&gt; SD.f_parent_qlogis   0.44377  0.15994  0.7276
#&gt; SD.log_k1            1.42027  0.52714  2.3134
#&gt; SD.log_k2            1.90634  0.70934  3.1033
#&gt; SD.g_qlogis          0.44771 -0.86417  1.7596</div><div class='input'><span class='fu'><a href='https://rdrr.io/pkg/saemix/man/plot-SaemixObject-method.html'>plot</a></span><span class='op'>(</span><span class='va'>f_saem_dfop_sfo</span><span class='op'>)</span>
</div><div class='img'><img src='saem-5.png' alt='' width='700' height='433' /></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_dfop_sfo</span>, data <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
</div><div class='output co'>#&gt; saemix version used for fitting:      3.1.9000 
#&gt; mkin version used for pre-fitting:  0.9.50.4 
#&gt; R version used for fitting:         4.0.3 
#&gt; Date of fit:     Mon Dec 21 05:59:09 2020 
#&gt; Date of summary: Mon Dec 21 05:59:09 2020 
#&gt; 
#&gt; Equations:
#&gt; d_parent/dt = - ((k1 * g * exp(-k1 * time) + k2 * (1 - g) * exp(-k2 *
#&gt;            time)) / (g * exp(-k1 * time) + (1 - g) * exp(-k2 * time)))
#&gt;            * parent
#&gt; d_A1/dt = + f_parent_to_A1 * ((k1 * g * exp(-k1 * time) + k2 * (1 - g)
#&gt;            * exp(-k2 * time)) / (g * exp(-k1 * time) + (1 - g) *
#&gt;            exp(-k2 * time))) * parent - k_A1 * A1
#&gt; 
#&gt; Data:
#&gt; 170 observations of 2 variable(s) grouped in 5 datasets
#&gt; 
#&gt; Model predictions using solution type analytical 
#&gt; 
#&gt; Fitted in 9.836 s using 300, 100 iterations
#&gt; 
#&gt; Variance model: Constant variance 
#&gt; 
#&gt; Mean of starting values for individual parameters:
#&gt;        parent_0        log_k_A1 f_parent_qlogis          log_k1          log_k2 
#&gt;         93.8102         -9.7647         -0.9711         -1.8799         -4.2708 
#&gt;        g_qlogis 
#&gt;          0.1356 
#&gt; 
#&gt; Fixed degradation parameter values:
#&gt; None
#&gt; 
#&gt; Results:
#&gt; 
#&gt; Likelihood computed by importance sampling
#&gt;     AIC   BIC logLik
#&gt;   841.6 836.5 -407.8
#&gt; 
#&gt; Optimised parameters:
#&gt;                     est.  lower   upper
#&gt; parent_0        93.76647 91.153 96.3798
#&gt; log_k_A1        -6.13235 -8.458 -3.8068
#&gt; f_parent_qlogis -0.97364 -1.369 -0.5779
#&gt; log_k1          -2.53176 -3.804 -1.2598
#&gt; log_k2          -3.58667 -5.295 -1.8781
#&gt; g_qlogis         0.01238 -1.080  1.1044
#&gt; 
#&gt; Correlation: 
#&gt;                 prnt_0 lg__A1 f_prn_ log_k1 log_k2
#&gt; log_k_A1        -0.013                            
#&gt; f_parent_qlogis -0.025  0.050                     
#&gt; log_k1           0.030  0.000 -0.005              
#&gt; log_k2           0.010  0.005 -0.003  0.032       
#&gt; g_qlogis        -0.063 -0.015  0.010 -0.167 -0.177
#&gt; 
#&gt; Random effects:
#&gt;                      est.   lower  upper
#&gt; SD.parent_0        2.7588  0.7723 4.7453
#&gt; SD.log_k_A1        2.1556  0.4443 3.8670
#&gt; SD.f_parent_qlogis 0.4438  0.1599 0.7276
#&gt; SD.log_k1          1.4203  0.5271 2.3134
#&gt; SD.log_k2          1.9063  0.7093 3.1033
#&gt; SD.g_qlogis        0.4477 -0.8642 1.7596
#&gt; 
#&gt; Variance model:
#&gt;      est. lower upper
#&gt; a.1 1.883 1.666   2.1
#&gt; 
#&gt; Backtransformed parameters:
#&gt;                     est.     lower    upper
#&gt; parent_0       93.766473 9.115e+01 96.37983
#&gt; k_A1            0.002171 2.122e-04  0.02222
#&gt; f_parent_to_A1  0.274156 2.027e-01  0.35942
#&gt; k1              0.079519 2.229e-02  0.28371
#&gt; k2              0.027691 5.015e-03  0.15288
#&gt; g               0.503095 2.536e-01  0.75109
#&gt; 
#&gt; Resulting formation fractions:
#&gt;                 ff
#&gt; parent_A1   0.2742
#&gt; parent_sink 0.7258
#&gt; 
#&gt; Estimated disappearance times:
#&gt;          DT50    DT90 DT50back DT50_k1 DT50_k2
#&gt; parent  14.11   59.53    17.92   8.717   25.03
#&gt; A1     319.21 1060.38       NA      NA      NA
#&gt; 
#&gt; Data:
#&gt;          ds   name time observed predicted residual   std standardized
#&gt;   Dataset 6 parent    0     97.2  95.79523 -1.40477 1.883    -0.745888
#&gt;   Dataset 6 parent    0     96.4  95.79523 -0.60477 1.883    -0.321114
#&gt;   Dataset 6 parent    3     71.1  71.32042  0.22042 1.883     0.117035
#&gt;   Dataset 6 parent    3     69.2  71.32042  2.12042 1.883     1.125873
#&gt;   Dataset 6 parent    6     58.1  56.45256 -1.64744 1.883    -0.874739
#&gt;   Dataset 6 parent    6     56.6  56.45256 -0.14744 1.883    -0.078288
#&gt;   Dataset 6 parent   10     44.4  44.48523  0.08523 1.883     0.045256
#&gt;   Dataset 6 parent   10     43.4  44.48523  1.08523 1.883     0.576224
#&gt;   Dataset 6 parent   20     33.3  29.75774 -3.54226 1.883    -1.880826
#&gt;   Dataset 6 parent   20     29.2  29.75774  0.55774 1.883     0.296141
#&gt;   Dataset 6 parent   34     17.6  19.35710  1.75710 1.883     0.932966
#&gt;   Dataset 6 parent   34     18.0  19.35710  1.35710 1.883     0.720578
#&gt;   Dataset 6 parent   55     10.5  10.48443 -0.01557 1.883    -0.008266
#&gt;   Dataset 6 parent   55      9.3  10.48443  1.18443 1.883     0.628895
#&gt;   Dataset 6 parent   90      4.5   3.78622 -0.71378 1.883    -0.378995
#&gt;   Dataset 6 parent   90      4.7   3.78622 -0.91378 1.883    -0.485188
#&gt;   Dataset 6 parent  112      3.0   1.99608 -1.00392 1.883    -0.533048
#&gt;   Dataset 6 parent  112      3.4   1.99608 -1.40392 1.883    -0.745435
#&gt;   Dataset 6 parent  132      2.3   1.11539 -1.18461 1.883    -0.628990
#&gt;   Dataset 6 parent  132      2.7   1.11539 -1.58461 1.883    -0.841377
#&gt;   Dataset 6     A1    3      4.3   4.66132  0.36132 1.883     0.191849
#&gt;   Dataset 6     A1    3      4.6   4.66132  0.06132 1.883     0.032559
#&gt;   Dataset 6     A1    6      7.0   7.41087  0.41087 1.883     0.218157
#&gt;   Dataset 6     A1    6      7.2   7.41087  0.21087 1.883     0.111964
#&gt;   Dataset 6     A1   10      8.2   9.50878  1.30878 1.883     0.694921
#&gt;   Dataset 6     A1   10      8.0   9.50878  1.50878 1.883     0.801114
#&gt;   Dataset 6     A1   20     11.0  11.69902  0.69902 1.883     0.371157
#&gt;   Dataset 6     A1   20     13.7  11.69902 -2.00098 1.883    -1.062455
#&gt;   Dataset 6     A1   34     11.5  12.67784  1.17784 1.883     0.625396
#&gt;   Dataset 6     A1   34     12.7  12.67784 -0.02216 1.883    -0.011765
#&gt;   Dataset 6     A1   55     14.9  12.78556 -2.11444 1.883    -1.122701
#&gt;   Dataset 6     A1   55     14.5  12.78556 -1.71444 1.883    -0.910314
#&gt;   Dataset 6     A1   90     12.1  11.52954 -0.57046 1.883    -0.302898
#&gt;   Dataset 6     A1   90     12.3  11.52954 -0.77046 1.883    -0.409092
#&gt;   Dataset 6     A1  112      9.9  10.43825  0.53825 1.883     0.285793
#&gt;   Dataset 6     A1  112     10.2  10.43825  0.23825 1.883     0.126503
#&gt;   Dataset 6     A1  132      8.8   9.42830  0.62830 1.883     0.333609
#&gt;   Dataset 6     A1  132      7.8   9.42830  1.62830 1.883     0.864577
#&gt;   Dataset 7 parent    0     93.6  90.91477 -2.68523 1.883    -1.425772
#&gt;   Dataset 7 parent    0     92.3  90.91477 -1.38523 1.883    -0.735514
#&gt;   Dataset 7 parent    3     87.0  84.76874 -2.23126 1.883    -1.184726
#&gt;   Dataset 7 parent    3     82.2  84.76874  2.56874 1.883     1.363919
#&gt;   Dataset 7 parent    7     74.0  77.62735  3.62735 1.883     1.926003
#&gt;   Dataset 7 parent    7     73.9  77.62735  3.72735 1.883     1.979100
#&gt;   Dataset 7 parent   14     64.2  67.52266  3.32266 1.883     1.764224
#&gt;   Dataset 7 parent   14     69.5  67.52266 -1.97734 1.883    -1.049904
#&gt;   Dataset 7 parent   30     54.0  52.41949 -1.58051 1.883    -0.839202
#&gt;   Dataset 7 parent   30     54.6  52.41949 -2.18051 1.883    -1.157783
#&gt;   Dataset 7 parent   60     41.1  39.36582 -1.73418 1.883    -0.920794
#&gt;   Dataset 7 parent   60     38.4  39.36582  0.96582 1.883     0.512818
#&gt;   Dataset 7 parent   90     32.5  33.75388  1.25388 1.883     0.665771
#&gt;   Dataset 7 parent   90     35.5  33.75388 -1.74612 1.883    -0.927132
#&gt;   Dataset 7 parent  120     28.1  30.41716  2.31716 1.883     1.230335
#&gt;   Dataset 7 parent  120     29.0  30.41716  1.41716 1.883     0.752464
#&gt;   Dataset 7 parent  180     26.5  25.66046 -0.83954 1.883    -0.445767
#&gt;   Dataset 7 parent  180     27.6  25.66046 -1.93954 1.883    -1.029832
#&gt;   Dataset 7     A1    3      3.9   2.69355 -1.20645 1.883    -0.640585
#&gt;   Dataset 7     A1    3      3.1   2.69355 -0.40645 1.883    -0.215811
#&gt;   Dataset 7     A1    7      6.9   5.81807 -1.08193 1.883    -0.574470
#&gt;   Dataset 7     A1    7      6.6   5.81807 -0.78193 1.883    -0.415180
#&gt;   Dataset 7     A1   14     10.4  10.22529 -0.17471 1.883    -0.092767
#&gt;   Dataset 7     A1   14      8.3  10.22529  1.92529 1.883     1.022265
#&gt;   Dataset 7     A1   30     14.4  16.75484  2.35484 1.883     1.250345
#&gt;   Dataset 7     A1   30     13.7  16.75484  3.05484 1.883     1.622022
#&gt;   Dataset 7     A1   60     22.1  22.22540  0.12540 1.883     0.066583
#&gt;   Dataset 7     A1   60     22.3  22.22540 -0.07460 1.883    -0.039610
#&gt;   Dataset 7     A1   90     27.5  24.38799 -3.11201 1.883    -1.652376
#&gt;   Dataset 7     A1   90     25.4  24.38799 -1.01201 1.883    -0.537344
#&gt;   Dataset 7     A1  120     28.0  25.53294 -2.46706 1.883    -1.309927
#&gt;   Dataset 7     A1  120     26.6  25.53294 -1.06706 1.883    -0.566572
#&gt;   Dataset 7     A1  180     25.8  26.94943  1.14943 1.883     0.610309
#&gt;   Dataset 7     A1  180     25.3  26.94943  1.64943 1.883     0.875793
#&gt;   Dataset 8 parent    0     91.9  91.53246 -0.36754 1.883    -0.195151
#&gt;   Dataset 8 parent    0     90.8  91.53246  0.73246 1.883     0.388914
#&gt;   Dataset 8 parent    1     64.9  67.73197  2.83197 1.883     1.503686
#&gt;   Dataset 8 parent    1     66.2  67.73197  1.53197 1.883     0.813428
#&gt;   Dataset 8 parent    3     43.5  41.58448 -1.91552 1.883    -1.017081
#&gt;   Dataset 8 parent    3     44.1  41.58448 -2.51552 1.883    -1.335661
#&gt;   Dataset 8 parent    8     18.3  19.62286  1.32286 1.883     0.702395
#&gt;   Dataset 8 parent    8     18.1  19.62286  1.52286 1.883     0.808589
#&gt;   Dataset 8 parent   14     10.2  10.77819  0.57819 1.883     0.306999
#&gt;   Dataset 8 parent   14     10.8  10.77819 -0.02181 1.883    -0.011582
#&gt;   Dataset 8 parent   27      4.9   3.26977 -1.63023 1.883    -0.865599
#&gt;   Dataset 8 parent   27      3.3   3.26977 -0.03023 1.883    -0.016051
#&gt;   Dataset 8 parent   48      1.6   0.48024 -1.11976 1.883    -0.594557
#&gt;   Dataset 8 parent   48      1.5   0.48024 -1.01976 1.883    -0.541460
#&gt;   Dataset 8 parent   70      1.1   0.06438 -1.03562 1.883    -0.549881
#&gt;   Dataset 8 parent   70      0.9   0.06438 -0.83562 1.883    -0.443688
#&gt;   Dataset 8     A1    1      9.6   7.61539 -1.98461 1.883    -1.053761
#&gt;   Dataset 8     A1    1      7.7   7.61539 -0.08461 1.883    -0.044923
#&gt;   Dataset 8     A1    3     15.0  15.47954  0.47954 1.883     0.254622
#&gt;   Dataset 8     A1    3     15.1  15.47954  0.37954 1.883     0.201525
#&gt;   Dataset 8     A1    8     21.2  20.22616 -0.97384 1.883    -0.517076
#&gt;   Dataset 8     A1    8     21.1  20.22616 -0.87384 1.883    -0.463979
#&gt;   Dataset 8     A1   14     19.7  20.00067  0.30067 1.883     0.159645
#&gt;   Dataset 8     A1   14     18.9  20.00067  1.10067 1.883     0.584419
#&gt;   Dataset 8     A1   27     17.5  16.38142 -1.11858 1.883    -0.593929
#&gt;   Dataset 8     A1   27     15.9  16.38142  0.48142 1.883     0.255619
#&gt;   Dataset 8     A1   48      9.5  10.25357  0.75357 1.883     0.400123
#&gt;   Dataset 8     A1   48      9.8  10.25357  0.45357 1.883     0.240833
#&gt;   Dataset 8     A1   70      6.2   5.95728 -0.24272 1.883    -0.128878
#&gt;   Dataset 8     A1   70      6.1   5.95728 -0.14272 1.883    -0.075781
#&gt;   Dataset 9 parent    0     99.8  97.47274 -2.32726 1.883    -1.235697
#&gt;   Dataset 9 parent    0     98.3  97.47274 -0.82726 1.883    -0.439246
#&gt;   Dataset 9 parent    1     77.1  79.72257  2.62257 1.883     1.392500
#&gt;   Dataset 9 parent    1     77.2  79.72257  2.52257 1.883     1.339404
#&gt;   Dataset 9 parent    3     59.0  56.26497 -2.73503 1.883    -1.452212
#&gt;   Dataset 9 parent    3     58.1  56.26497 -1.83503 1.883    -0.974342
#&gt;   Dataset 9 parent    8     27.4  31.66985  4.26985 1.883     2.267151
#&gt;   Dataset 9 parent    8     29.2  31.66985  2.46985 1.883     1.311410
#&gt;   Dataset 9 parent   14     19.1  22.39789  3.29789 1.883     1.751071
#&gt;   Dataset 9 parent   14     29.6  22.39789 -7.20211 1.883    -3.824090
#&gt;   Dataset 9 parent   27     10.1  14.21758  4.11758 1.883     2.186301
#&gt;   Dataset 9 parent   27     18.2  14.21758 -3.98242 1.883    -2.114537
#&gt;   Dataset 9 parent   48      4.5   7.27921  2.77921 1.883     1.475671
#&gt;   Dataset 9 parent   48      9.1   7.27921 -1.82079 1.883    -0.966780
#&gt;   Dataset 9 parent   70      2.3   3.61470  1.31470 1.883     0.698065
#&gt;   Dataset 9 parent   70      2.9   3.61470  0.71470 1.883     0.379485
#&gt;   Dataset 9 parent   91      2.0   1.85303 -0.14697 1.883    -0.078038
#&gt;   Dataset 9 parent   91      1.8   1.85303  0.05303 1.883     0.028155
#&gt;   Dataset 9 parent  120      2.0   0.73645 -1.26355 1.883    -0.670906
#&gt;   Dataset 9 parent  120      2.2   0.73645 -1.46355 1.883    -0.777099
#&gt;   Dataset 9     A1    1      4.2   3.87843 -0.32157 1.883    -0.170743
#&gt;   Dataset 9     A1    1      3.9   3.87843 -0.02157 1.883    -0.011453
#&gt;   Dataset 9     A1    3      7.4   8.90535  1.50535 1.883     0.799291
#&gt;   Dataset 9     A1    3      7.9   8.90535  1.00535 1.883     0.533807
#&gt;   Dataset 9     A1    8     14.5  13.75172 -0.74828 1.883    -0.397312
#&gt;   Dataset 9     A1    8     13.7  13.75172  0.05172 1.883     0.027462
#&gt;   Dataset 9     A1   14     14.2  14.97541  0.77541 1.883     0.411715
#&gt;   Dataset 9     A1   14     12.2  14.97541  2.77541 1.883     1.473650
#&gt;   Dataset 9     A1   27     13.7  14.94728  1.24728 1.883     0.662266
#&gt;   Dataset 9     A1   27     13.2  14.94728  1.74728 1.883     0.927750
#&gt;   Dataset 9     A1   48     13.6  13.66078  0.06078 1.883     0.032272
#&gt;   Dataset 9     A1   48     15.4  13.66078 -1.73922 1.883    -0.923470
#&gt;   Dataset 9     A1   70     10.4  11.84899  1.44899 1.883     0.769365
#&gt;   Dataset 9     A1   70     11.6  11.84899  0.24899 1.883     0.132204
#&gt;   Dataset 9     A1   91     10.0  10.09177  0.09177 1.883     0.048727
#&gt;   Dataset 9     A1   91      9.5  10.09177  0.59177 1.883     0.314211
#&gt;   Dataset 9     A1  120      9.1   7.91379 -1.18621 1.883    -0.629841
#&gt;   Dataset 9     A1  120      9.0   7.91379 -1.08621 1.883    -0.576745
#&gt;  Dataset 10 parent    0     96.1  93.65257 -2.44743 1.883    -1.299505
#&gt;  Dataset 10 parent    0     94.3  93.65257 -0.64743 1.883    -0.343763
#&gt;  Dataset 10 parent    8     73.9  77.85906  3.95906 1.883     2.102132
#&gt;  Dataset 10 parent    8     73.9  77.85906  3.95906 1.883     2.102132
#&gt;  Dataset 10 parent   14     69.4  70.17143  0.77143 1.883     0.409606
#&gt;  Dataset 10 parent   14     73.1  70.17143 -2.92857 1.883    -1.554974
#&gt;  Dataset 10 parent   21     65.6  63.99188 -1.60812 1.883    -0.853862
#&gt;  Dataset 10 parent   21     65.3  63.99188 -1.30812 1.883    -0.694572
#&gt;  Dataset 10 parent   41     55.9  54.64292 -1.25708 1.883    -0.667467
#&gt;  Dataset 10 parent   41     54.4  54.64292  0.24292 1.883     0.128985
#&gt;  Dataset 10 parent   63     47.0  49.61303  2.61303 1.883     1.387433
#&gt;  Dataset 10 parent   63     49.3  49.61303  0.31303 1.883     0.166207
#&gt;  Dataset 10 parent   91     44.7  45.17807  0.47807 1.883     0.253839
#&gt;  Dataset 10 parent   91     46.7  45.17807 -1.52193 1.883    -0.808096
#&gt;  Dataset 10 parent  120     42.1  41.27970 -0.82030 1.883    -0.435552
#&gt;  Dataset 10 parent  120     41.3  41.27970 -0.02030 1.883    -0.010778
#&gt;  Dataset 10     A1    8      3.3   3.99294  0.69294 1.883     0.367929
#&gt;  Dataset 10     A1    8      3.4   3.99294  0.59294 1.883     0.314832
#&gt;  Dataset 10     A1   14      3.9   5.92756  2.02756 1.883     1.076570
#&gt;  Dataset 10     A1   14      2.9   5.92756  3.02756 1.883     1.607538
#&gt;  Dataset 10     A1   21      6.4   7.47313  1.07313 1.883     0.569799
#&gt;  Dataset 10     A1   21      7.2   7.47313  0.27313 1.883     0.145025
#&gt;  Dataset 10     A1   41      9.1   9.76819  0.66819 1.883     0.354786
#&gt;  Dataset 10     A1   41      8.5   9.76819  1.26819 1.883     0.673367
#&gt;  Dataset 10     A1   63     11.7  10.94733 -0.75267 1.883    -0.399643
#&gt;  Dataset 10     A1   63     12.0  10.94733 -1.05267 1.883    -0.558933
#&gt;  Dataset 10     A1   91     13.3  11.93773 -1.36227 1.883    -0.723321
#&gt;  Dataset 10     A1   91     13.2  11.93773 -1.26227 1.883    -0.670224
#&gt;  Dataset 10     A1  120     14.3  12.77666 -1.52334 1.883    -0.808847
#&gt;  Dataset 10     A1  120     12.1  12.77666  0.67666 1.883     0.359282</div><div class='input'>
<span class='co'># The following takes about 6 minutes</span>
<span class='co'>#f_saem_dfop_sfo_deSolve &lt;- saem(f_mmkin["DFOP-SFO", ], solution_type = "deSolve",</span>
<span class='co'>#  control = list(nbiter.saemix = c(200, 80), nbdisplay = 10))</span>

<span class='co'>#saemix::compare.saemix(list(</span>
<span class='co'>#  f_saem_dfop_sfo$so,</span>
<span class='co'>#  f_saem_dfop_sfo_deSolve$so))</span>

<span class='co'># If the model supports it, we can also use eigenvalue based solutions, which</span>
<span class='co'># take a similar amount of time</span>
<span class='co'>#f_saem_sfo_sfo_eigen &lt;- saem(f_mmkin["SFO-SFO", ], solution_type = "eigen",</span>
<span class='co'>#  control = list(nbiter.saemix = c(200, 80), nbdisplay = 10))</span>
<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>


Contact - Imprint