aboutsummaryrefslogblamecommitdiff
path: root/docs/reference/nlme.mmkin.html
blob: 01287ddab42bb8dc05a4be47c4250a121f4bbe88 (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>Create an nlme model for an mmkin row object — nlme.mmkin • mkin</title>


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

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>

<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />

<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>

<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/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="Create an nlme model for an mmkin row object — nlme.mmkin" />
<meta property="og:description" content="This functions sets up a nonlinear mixed effects model for an mmkin row
object. 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." />
<meta name="twitter:card" content="summary" />




<!-- 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>
    <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">0.9.49.10</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>
  </ul>
</li>
<li>
  <a href="../news/index.html">News</a>
</li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        
      </ul>
      
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      

      </header>

<div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>Create an nlme model for an mmkin row object</h1>
    
    <div class="hidden name"><code>nlme.mmkin.Rd</code></div>
    </div>

    <div class="ref-description">
    <p>This functions sets up a nonlinear mixed effects model for an mmkin row
object. 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.</p>
    </div>

    <pre class="usage"><span class='co'># S3 method for mmkin</span>
<span class='fu'>nlme</span>(
  <span class='no'>model</span>,
  <span class='kw'>data</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.frame</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.parent</a></span>()),
  <span class='no'>fixed</span>,
  <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>fixed</span>,
  <span class='no'>groups</span>,
  <span class='no'>start</span>,
  <span class='kw'>correlation</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  <span class='kw'>weights</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
  <span class='no'>subset</span>,
  <span class='kw'>method</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"ML"</span>, <span class='st'>"REML"</span>),
  <span class='kw'>na.action</span> <span class='kw'>=</span> <span class='no'>na.fail</span>,
  <span class='no'>naPattern</span>,
  <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(),
  <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>
)

<span class='co'># S3 method for nlme.mmkin</span>
<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>x</span>, <span class='no'>...</span>)

<span class='co'># S3 method for nlme.mmkin</span>
<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>object</span>, <span class='no'>...</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>model</th>
      <td><p>An <code><a href='mmkin.html'>mmkin</a></code> row object.</p></td>
    </tr>
    <tr>
      <th>data</th>
      <td><p>Should the data be printed?</p></td>
    </tr>
    <tr>
      <th>fixed</th>
      <td><p>Ignored, all degradation parameters fitted in the
mmkin model are used as fixed parameters</p></td>
    </tr>
    <tr>
      <th>random</th>
      <td><p>If not specified, all fixed effects are complemented
with uncorrelated random effects</p></td>
    </tr>
    <tr>
      <th>groups</th>
      <td><p>See the documentation of nlme</p></td>
    </tr>
    <tr>
      <th>start</th>
      <td><p>If not specified, mean values of the fitted degradation
parameters taken from the mmkin object are used</p></td>
    </tr>
    <tr>
      <th>correlation</th>
      <td><p>See the documentation of nlme</p></td>
    </tr>
    <tr>
      <th>weights</th>
      <td><p>passed to nlme</p></td>
    </tr>
    <tr>
      <th>subset</th>
      <td><p>passed to nlme</p></td>
    </tr>
    <tr>
      <th>method</th>
      <td><p>passed to nlme</p></td>
    </tr>
    <tr>
      <th>na.action</th>
      <td><p>passed to nlme</p></td>
    </tr>
    <tr>
      <th>naPattern</th>
      <td><p>passed to nlme</p></td>
    </tr>
    <tr>
      <th>control</th>
      <td><p>passed to nlme</p></td>
    </tr>
    <tr>
      <th>verbose</th>
      <td><p>passed to nlme</p></td>
    </tr>
    <tr>
      <th>x</th>
      <td><p>An nlme.mmkin object to print</p></td>
    </tr>
    <tr>
      <th>...</th>
      <td><p>Update specifications passed to update.nlme</p></td>
    </tr>
    <tr>
      <th>object</th>
      <td><p>An nlme.mmkin object to update</p></td>
    </tr>
    </table>

    <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>

    <p>Upon success, a fitted nlme.mmkin object, which is an nlme object
  with additional elements</p>
    <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>

    <div class='dont-index'><p><code><a href='nlme.html'>nlme_function</a></code></p></div>

    <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
    <pre class="examples"><div class='input'><span class='no'>ds</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
 <span class='kw'>function</span>(<span class='no'>x</span>) <span class='fu'><a href='https://rdrr.io/r/base/subset.html'>subset</a></span>(<span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)], <span class='no'>name</span> <span class='kw'>==</span> <span class='st'>"parent"</span>))
<span class='no'>f</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='st'>"SFO"</span>, <span class='no'>ds</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>)
<span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>nlme</span>)
<span class='no'>f_nlme</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>)
<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by maximum likelihood
#&gt;   Model: value ~ deg_func(name, time, parent_0, log_k_parent_sink) 
#&gt;   Data: "Not shown" 
#&gt;   Log-likelihood: -307.5269
#&gt;   Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1) 
#&gt;          parent_0 log_k_parent_sink 
#&gt;         85.541149         -3.229596 
#&gt; 
#&gt; Random effects:
#&gt;  Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1)
#&gt;  Level: ds
#&gt;  Structure: Diagonal
#&gt;         parent_0 log_k_parent_sink Residual
#&gt; StdDev:  1.30857          1.288591 6.304906
#&gt; 
#&gt; Number of Observations: 90
#&gt; Number of Groups: 5 </div><div class='input'><span class='no'>f_nlme_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f</span>, <span class='kw'>start</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='kw'>parent_0</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>log_k_parent_sink</span> <span class='kw'>=</span> <span class='fl'>0.1</span>))
<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span>(<span class='no'>f_nlme_2</span>, <span class='kw'>random</span> <span class='kw'>=</span> <span class='no'>parent_0</span> ~ <span class='fl'>1</span>)</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by maximum likelihood
#&gt;   Model: value ~ deg_func(name, time, parent_0, log_k_parent_sink) 
#&gt;   Data: "Not shown" 
#&gt;   Log-likelihood: -404.3729
#&gt;   Fixed: list(parent_0 ~ 1, log_k_parent_sink ~ 1) 
#&gt;          parent_0 log_k_parent_sink 
#&gt;         75.933480         -3.555983 
#&gt; 
#&gt; Random effects:
#&gt;  Formula: parent_0 ~ 1 | ds
#&gt;            parent_0 Residual
#&gt; StdDev: 0.002416792 21.63027
#&gt; 
#&gt; Number of Observations: 90
#&gt; Number of Groups: 5 </div><div class='input'><span class='co'># \dontrun{</span>
  <span class='co'># Test on some real data</span>
  <span class='no'>ds_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/lapply.html'>lapply</a></span>(<span class='no'>experimental_data_for_UBA_2019</span>[<span class='fl'>6</span>:<span class='fl'>10</span>],
   <span class='kw'>function</span>(<span class='no'>x</span>) <span class='no'>x</span>$<span class='no'>data</span>[<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"name"</span>, <span class='st'>"time"</span>, <span class='st'>"value"</span>)])
  <span class='no'>m_sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>),
    <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"min"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
  <span class='no'>m_sfo_sfo_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"A1"</span>),
    <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>use_of_ff</span> <span class='kw'>=</span> <span class='st'>"max"</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
  <span class='no'>m_fomc_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"FOMC"</span>, <span class='st'>"A1"</span>),
    <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
  <span class='no'>m_dfop_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mkinmod.html'>mkinmod</a></span>(<span class='kw'>parent</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"DFOP"</span>, <span class='st'>"A1"</span>),
    <span class='kw'>A1</span> <span class='kw'>=</span> <span class='fu'><a href='mkinsub.html'>mkinsub</a></span>(<span class='st'>"SFO"</span>), <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)

  <span class='no'>f_2</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"SFO-SFO"</span> <span class='kw'>=</span> <span class='no'>m_sfo_sfo</span>,
   <span class='st'>"SFO-SFO-ff"</span> <span class='kw'>=</span> <span class='no'>m_sfo_sfo_ff</span>,
   <span class='st'>"FOMC-SFO"</span> <span class='kw'>=</span> <span class='no'>m_fomc_sfo</span>,
   <span class='st'>"DFOP-SFO"</span> <span class='kw'>=</span> <span class='no'>m_dfop_sfo</span>),
    <span class='no'>ds_2</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)
  <span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>]) <span class='co'># Separate fits for datasets 3 and 4</span></div><div class='img'><img src='nlme.mmkin-1.png' alt='' width='700' height='433' /></div><div class='input'>
  <span class='no'>f_nlme_sfo_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO"</span>, ])
  <span class='co'># plot(f_nlme_sfo_sfo) # not feasible with pkgdown figures</span>
  <span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>f_nlme_sfo_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>) <span class='co'># Global mixed model: Fits for datasets 3 and 4</span></div><div class='img'><img src='nlme.mmkin-2.png' alt='' width='700' height='433' /></div><div class='input'>
  <span class='co'># With formation fractions</span>
  <span class='no'>f_nlme_sfo_sfo_ff</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"SFO-SFO-ff"</span>, ])
  <span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>f_nlme_sfo_sfo_ff</span>, <span class='fl'>3</span>:<span class='fl'>4</span>) <span class='co'># chi2 different due to different df attribution</span></div><div class='img'><img src='nlme.mmkin-3.png' alt='' width='700' height='433' /></div><div class='input'>
  <span class='co'># For more parameters, we need to increase pnlsMaxIter and the tolerance</span>
  <span class='co'># to get convergence</span>
  <span class='no'>f_nlme_fomc_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, ],
    <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>pnlsMaxIter</span> <span class='kw'>=</span> <span class='fl'>100</span>, <span class='kw'>tolerance</span> <span class='kw'>=</span> <span class='fl'>1e-4</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; 
#&gt; **Iteration 1
#&gt; LME step: Loglik: -394.1603, nlminb iterations: 2
#&gt; reStruct  parameters:
#&gt;        ds1        ds2        ds3        ds4        ds5 
#&gt; -0.2079984  0.8563873  1.7454146  1.0917723  1.2756924 
#&gt;  Beginning PNLS step: ..  completed fit_nlme() step.
#&gt; PNLS step: RSS =  643.8786 
#&gt;  fixed effects: 94.17379  -5.473199  -0.6970239  -0.2025094  2.103883  
#&gt;  iterations: 100 
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
#&gt;     fixed  reStruct 
#&gt; 0.7865373 0.1448077 
#&gt; 
#&gt; **Iteration 2
#&gt; LME step: Loglik: -396.3824, nlminb iterations: 7
#&gt; reStruct  parameters:
#&gt;           ds1           ds2           ds3           ds4           ds5 
#&gt; -1.712408e-01 -2.680989e-05  1.842119e+00  1.073975e+00  1.322924e+00 
#&gt;  Beginning PNLS step: ..  completed fit_nlme() step.
#&gt; PNLS step: RSS =  643.8022 
#&gt;  fixed effects: 94.17385  -5.473491  -0.6970405  -0.202514  2.103871  
#&gt;  iterations: 100 
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
#&gt;        fixed     reStruct 
#&gt; 5.341904e-05 1.227073e-03 
#&gt; 
#&gt; **Iteration 3
#&gt; LME step: Loglik: -396.3825, nlminb iterations: 7
#&gt; reStruct  parameters:
#&gt;           ds1           ds2           ds3           ds4           ds5 
#&gt; -0.1712484347 -0.0001513555  1.8420964843  1.0739800649  1.3229176990 
#&gt;  Beginning PNLS step: ..  completed fit_nlme() step.
#&gt; PNLS step: RSS =  643.7947 
#&gt;  fixed effects: 94.17386  -5.473522  -0.6970423  -0.2025142  2.10387  
#&gt;  iterations: 100 
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
#&gt;        fixed     reStruct 
#&gt; 5.568186e-06 1.276609e-04 
#&gt; 
#&gt; **Iteration 4
#&gt; LME step: Loglik: -396.3825, nlminb iterations: 7
#&gt; reStruct  parameters:
#&gt;          ds1          ds2          ds3          ds4          ds5 
#&gt; -0.171251200 -0.000164506  1.842095097  1.073980200  1.322916184 
#&gt;  Beginning PNLS step: ..  completed fit_nlme() step.
#&gt; PNLS step: RSS =  643.7934 
#&gt;  fixed effects: 94.17386  -5.473526  -0.6970426  -0.2025146  2.103869  
#&gt;  iterations: 100 
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
#&gt;        fixed     reStruct 
#&gt; 2.332100e-06 1.979007e-05 </div><div class='input'>  <span class='no'>f_nlme_dfop_sfo</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, ],
    <span class='kw'>control</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>pnlsMaxIter</span> <span class='kw'>=</span> <span class='fl'>120</span>, <span class='kw'>tolerance</span> <span class='kw'>=</span> <span class='fl'>5e-4</span>), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; 
#&gt; **Iteration 1
#&gt; LME step: Loglik: -404.9591, nlminb iterations: 1
#&gt; reStruct  parameters:
#&gt;        ds1        ds2        ds3        ds4        ds5        ds6 
#&gt; -0.4114594  0.9798456  1.6990016  0.7293119  0.3353829  1.7112922 
#&gt;  Beginning PNLS step: ..  completed fit_nlme() step.
#&gt; PNLS step: RSS =  630.391 
#&gt;  fixed effects: 93.82265  -5.455841  -0.6788837  -1.862191  -4.199654  0.05531046  
#&gt;  iterations: 120 
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0005):
#&gt;     fixed  reStruct 
#&gt; 0.7872619 0.5811683 
#&gt; 
#&gt; **Iteration 2
#&gt; LME step: Loglik: -407.7755, nlminb iterations: 11
#&gt; reStruct  parameters:
#&gt;          ds1          ds2          ds3          ds4          ds5          ds6 
#&gt; -0.371222832  0.003084754  1.789952290  0.724634064  0.301559136  1.754244638 
#&gt;  Beginning PNLS step: ..  completed fit_nlme() step.
#&gt; PNLS step: RSS =  630.359 
#&gt;  fixed effects: 93.82269  -5.456014  -0.6788967  -1.862202  -4.199678  0.05534118  
#&gt;  iterations: 120 
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0005):
#&gt;        fixed     reStruct 
#&gt; 0.0005550885 0.0007749418 
#&gt; 
#&gt; **Iteration 3
#&gt; LME step: Loglik: -407.7756, nlminb iterations: 11
#&gt; reStruct  parameters:
#&gt;          ds1          ds2          ds3          ds4          ds5          ds6 
#&gt; -0.371217033  0.003064156  1.789935045  0.724683005  0.301622307  1.754234135 
#&gt;  Beginning PNLS step: ..  completed fit_nlme() step.
#&gt; PNLS step: RSS =  630.358 
#&gt;  fixed effects: 93.82269  -5.456017  -0.6788969  -1.862197  -4.199677  0.05532978  
#&gt;  iterations: 120 
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0005):
#&gt;        fixed     reStruct 
#&gt; 2.059533e-04 4.860085e-05 </div><div class='input'>  <span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"FOMC-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-4.png' alt='' width='700' height='433' /></div><div class='input'>  <span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>f_nlme_fomc_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-5.png' alt='' width='700' height='433' /></div><div class='input'>
  <span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>f_2</span>[<span class='st'>"DFOP-SFO"</span>, <span class='fl'>3</span>:<span class='fl'>4</span>])</div><div class='img'><img src='nlme.mmkin-6.png' alt='' width='700' height='433' /></div><div class='input'>  <span class='fu'><a href='https://rdrr.io/r/graphics/plot.html'>plot</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='fl'>3</span>:<span class='fl'>4</span>)</div><div class='img'><img src='nlme.mmkin-7.png' alt='' width='700' height='433' /></div><div class='input'>
  <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_fomc_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>)</div><div class='output co'>#&gt;                 Model df       AIC       BIC    logLik   Test   L.Ratio p-value
#&gt; f_nlme_dfop_sfo     1 13  843.8541  884.6194 -408.9270                         
#&gt; f_nlme_fomc_sfo     2 11  818.5149  853.0087 -398.2575 1 vs 2  21.33913  &lt;.0001
#&gt; f_nlme_sfo_sfo      3  9 1085.1821 1113.4042 -533.5910 2 vs 3 270.66712  &lt;.0001</div><div class='input'>  <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span>(<span class='no'>f_nlme_dfop_sfo</span>, <span class='no'>f_nlme_sfo_sfo</span>) <span class='co'># if we ignore FOMC</span></div><div class='output co'>#&gt;                 Model df       AIC       BIC   logLik   Test L.Ratio p-value
#&gt; f_nlme_dfop_sfo     1 13  843.8541  884.6194 -408.927                       
#&gt; f_nlme_sfo_sfo      2  9 1085.1821 1113.4042 -533.591 1 vs 2 249.328  &lt;.0001</div><div class='input'># }
</div></pre>
  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
    <h2>Contents</h2>
    <ul class="nav nav-pills nav-stacked">
      <li><a href="#arguments">Arguments</a></li>
      <li><a href="#value">Value</a></li>
      <li><a href="#see-also">See also</a></li>
      <li><a href="#examples">Examples</a></li>
    </ul>

  </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.4.1.</p>
</div>

      </footer>
   </div>

  


  </body>
</html>


Contact - Imprint