aboutsummaryrefslogtreecommitdiff
path: root/docs/reference/nlme.mmkin.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference/nlme.mmkin.html')
-rw-r--r--docs/reference/nlme.mmkin.html240
1 files changed, 130 insertions, 110 deletions
diff --git a/docs/reference/nlme.mmkin.html b/docs/reference/nlme.mmkin.html
index c0fb499d..af3b712c 100644
--- a/docs/reference/nlme.mmkin.html
+++ b/docs/reference/nlme.mmkin.html
@@ -74,7 +74,7 @@ have been obtained by fitting the same model to a list of datasets." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mkin</a>
- <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.2</span>
+ <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.50.3</span>
</span>
</div>
@@ -111,6 +111,9 @@ have been obtained by fitting the same model to a list of datasets." />
<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>
@@ -119,7 +122,7 @@ have been obtained by fitting the same model to a list of datasets." />
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
- <a href="http://github.com/jranke/mkin/">
+ <a href="https://github.com/jranke/mkin/">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
@@ -138,7 +141,7 @@ have been obtained by fitting the same model to a list of datasets." />
<div class="col-md-9 contents">
<div class="page-header">
<h1>Create an nlme model for an mmkin row object</h1>
- <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/nlme.mmkin.R'><code>R/nlme.mmkin.R</code></a></small>
+ <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/nlme.mmkin.R'><code>R/nlme.mmkin.R</code></a></small>
<div class="hidden name"><code>nlme.mmkin.Rd</code></div>
</div>
@@ -149,28 +152,28 @@ 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='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span>
+ <span class='va'>model</span>,
+ data <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.frame</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/sys.parent.html'>sys.parent</a></span><span class='op'>(</span><span class='op'>)</span><span class='op'>)</span>,
+ <span class='va'>fixed</span>,
+ random <span class='op'>=</span> <span class='va'>fixed</span>,
+ <span class='va'>groups</span>,
+ <span class='va'>start</span>,
+ correlation <span class='op'>=</span> <span class='cn'>NULL</span>,
+ weights <span class='op'>=</span> <span class='cn'>NULL</span>,
+ <span class='va'>subset</span>,
+ method <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'>"ML"</span>, <span class='st'>"REML"</span><span class='op'>)</span>,
+ na.action <span class='op'>=</span> <span class='va'>na.fail</span>,
+ <span class='va'>naPattern</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><span class='op'>)</span>,
+ verbose <span class='op'>=</span> <span class='cn'>FALSE</span>
+<span class='op'>)</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='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>x</span>, <span class='va'>...</span><span class='op'>)</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>
+<span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span><span class='op'>(</span><span class='va'>object</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">
@@ -181,7 +184,7 @@ have been obtained by fitting the same model to a list of datasets.</p>
</tr>
<tr>
<th>data</th>
- <td><p>Should the data be printed?</p></td>
+ <td><p>Ignored, data are taken from the mmkin model</p></td>
</tr>
<tr>
<th>fixed</th>
@@ -254,165 +257,181 @@ parameters taken from the mmkin object are used</p></td>
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>
+ <div class='dont-index'><p><code><a href='nlme_function.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='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f</span><span class='kw'>[[</span><span class='fl'>1</span>]])</div><div class='output co'>#&gt; $distimes
+ <pre class="examples"><div class='input'><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='va'>name</span> <span class='op'>==</span> <span class='st'>"parent"</span><span class='op'>)</span><span class='op'>)</span>
+<span class='va'>f</span> <span class='op'>&lt;-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='va'>ds</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span>, cores <span class='op'>=</span> <span class='fl'>1</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.0195</span></div><div class='output co'>#&gt; <span class='warning'>Warning: Shapiro-Wilk test for standardized residuals: p = 0.011</span></div><div class='input'><span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://svn.r-project.org/R-packages/trunk/nlme'>nlme</a></span><span class='op'>)</span>
+<span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[[</span><span class='fl'>1</span><span class='op'>]</span><span class='op'>]</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; $distimes
#&gt; DT50 DT90
#&gt; parent 11.96183 39.73634
-#&gt; </div><div class='input'><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 ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent_sink)
+#&gt; </div><div class='input'><span class='va'>f_nlme</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>)</span>
+<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>f_nlme</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by maximum likelihood
+#&gt; Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent)
#&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.540979 -3.229602
+#&gt; Fixed: list(parent_0 ~ 1, log_k_parent ~ 1)
+#&gt; parent_0 log_k_parent
+#&gt; 85.541149 -3.229596
#&gt;
#&gt; Random effects:
-#&gt; Formula: list(parent_0 ~ 1, log_k_parent_sink ~ 1)
+#&gt; Formula: list(parent_0 ~ 1, log_k_parent ~ 1)
#&gt; Level: ds
#&gt; Structure: Diagonal
-#&gt; parent_0 log_k_parent_sink Residual
-#&gt; StdDev: 1.308245 1.288586 6.304923
+#&gt; parent_0 log_k_parent 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='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme</span>)</div><div class='output co'>#&gt; $distimes
+#&gt; Number of Groups: 5 </div><div class='input'><span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>f_nlme</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; $distimes
#&gt; DT50 DT90
-#&gt; parent 17.51556 58.18543
+#&gt; parent 17.51545 58.18505
#&gt; </div><div class='input'><span class='co'># \dontrun{</span>
- <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 ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent_sink)
+ <span class='va'>f_nlme_2</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f</span>, start <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span>parent_0 <span class='op'>=</span> <span class='fl'>100</span>, log_k_parent_sink <span class='op'>=</span> <span class='fl'>0.1</span><span class='op'>)</span><span class='op'>)</span>
+ <span class='fu'><a href='https://rdrr.io/r/stats/update.html'>update</a></span><span class='op'>(</span><span class='va'>f_nlme_2</span>, random <span class='op'>=</span> <span class='va'>parent_0</span> <span class='op'>~</span> <span class='fl'>1</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; Nonlinear mixed-effects model fit by maximum likelihood
+#&gt; Model: value ~ (mkin::get_deg_func())(name, time, parent_0, log_k_parent)
#&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; Fixed: list(parent_0 ~ 1, log_k_parent ~ 1)
+#&gt; parent_0 log_k_parent
+#&gt; 75.933480 -3.555983
#&gt;
#&gt; Random effects:
#&gt; Formula: parent_0 ~ 1 | ds
#&gt; parent_0 Residual
-#&gt; StdDev: 0.002416802 21.63027
+#&gt; StdDev: 0.002416792 21.63027
#&gt;
#&gt; Number of Observations: 90
#&gt; Number of Groups: 5 </div><div class='input'> <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/base/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='va'>ds_2</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='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='va'>m_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='mkinsub.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='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"min"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+ <span class='va'>m_sfo_sfo_ff</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='mkinsub.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='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, use_of_ff <span class='op'>=</span> <span class='st'>"max"</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+ <span class='va'>m_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='mkinsub.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='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+ <span class='va'>m_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='mkinsub.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='mkinsub.html'>mkinsub</a></span><span class='op'>(</span><span class='st'>"SFO"</span><span class='op'>)</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+
+ <span class='va'>f_2</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'>m_sfo_sfo</span>,
+ <span class='st'>"SFO-SFO-ff"</span> <span class='op'>=</span> <span class='va'>m_sfo_sfo_ff</span>,
+ <span class='st'>"FOMC-SFO"</span> <span class='op'>=</span> <span class='va'>m_fomc_sfo</span>,
+ <span class='st'>"DFOP-SFO"</span> <span class='op'>=</span> <span class='va'>m_dfop_sfo</span><span class='op'>)</span>,
+ <span class='va'>ds_2</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+ <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"SFO-SFO"</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>]</span><span class='op'>)</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='va'>f_nlme_sfo_sfo</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"SFO-SFO"</span>, <span class='op'>]</span><span class='op'>)</span>
<span class='co'># plot(f_nlme_sfo_sfo) # not feasible with pkgdown figures</span>
- <span class='fu'><a href='https://rdrr.io/r/base/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='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme_sfo_sfo</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</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/base/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='va'>f_nlme_sfo_sfo_ff</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"SFO-SFO-ff"</span>, <span class='op'>]</span><span class='op'>)</span>
+ <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme_sfo_sfo_ff</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</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;
+ <span class='va'>f_nlme_fomc_sfo</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"FOMC-SFO"</span>, <span class='op'>]</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>pnlsMaxIter <span class='op'>=</span> <span class='fl'>100</span>, tolerance <span class='op'>=</span> <span class='fl'>1e-4</span><span class='op'>)</span>, verbose <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+</div><div class='output co'>#&gt;
#&gt; **Iteration 1
-#&gt; LME step: Loglik: -394.1603, nlminb iterations: 2
+#&gt; LME step: Loglik: -394.1603, nlminb iterations: 3
#&gt; reStruct parameters:
#&gt; ds1 ds2 ds3 ds4 ds5
-#&gt; -0.2079863 0.8563823 1.7454253 1.0917707 1.2756955
+#&gt; -0.2079793 0.8563830 1.7454105 1.0917354 1.2756825
#&gt; Beginning PNLS step: .. completed fit_nlme() step.
-#&gt; PNLS step: RSS = 643.8814
-#&gt; fixed effects: 94.17379 -5.473189 -0.6970234 -0.202509 2.103883
+#&gt; PNLS step: RSS = 643.8803
+#&gt; fixed effects: 94.17379 -5.473193 -0.6970236 -0.2025091 2.103883
#&gt; iterations: 100
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
#&gt; fixed reStruct
-#&gt; 0.7959873 0.1447512
+#&gt; 0.7960134 0.1447728
#&gt;
#&gt; **Iteration 2
#&gt; LME step: Loglik: -396.3824, nlminb iterations: 7
#&gt; reStruct parameters:
#&gt; ds1 ds2 ds3 ds4 ds5
-#&gt; -1.712406e-01 -2.278541e-05 1.842120e+00 1.073975e+00 1.322924e+00
+#&gt; -1.712404e-01 -2.432655e-05 1.842120e+00 1.073975e+00 1.322925e+00
#&gt; Beginning PNLS step: .. completed fit_nlme() step.
-#&gt; PNLS step: RSS = 643.8025
-#&gt; fixed effects: 94.17385 -5.473491 -0.6970406 -0.2025139 2.103871
+#&gt; PNLS step: RSS = 643.8035
+#&gt; fixed effects: 94.17385 -5.473487 -0.6970404 -0.2025137 2.103871
#&gt; iterations: 100
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
-#&gt; fixed reStruct
-#&gt; 5.51758e-05 1.26861e-03
+#&gt; fixed reStruct
+#&gt; 5.382757e-05 1.236667e-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.1712500923 -0.0001515734 1.8420972550 1.0739796967 1.3229177241
+#&gt; -0.1712499044 -0.0001499831 1.8420971364 1.0739799123 1.3229167796
#&gt; Beginning PNLS step: .. completed fit_nlme() step.
-#&gt; PNLS step: RSS = 643.7941
-#&gt; fixed effects: 94.17386 -5.473523 -0.6970424 -0.2025146 2.103869
+#&gt; PNLS step: RSS = 643.7948
+#&gt; fixed effects: 94.17386 -5.473521 -0.6970422 -0.2025144 2.10387
#&gt; iterations: 100
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0001):
#&gt; fixed reStruct
-#&gt; 5.792621e-06 1.335434e-04
+#&gt; 6.072817e-06 1.400857e-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.1712517206 -0.0001651603 1.8420950864 1.0739800294 1.3229173529
+#&gt; -0.1712529502 -0.0001641277 1.8420957542 1.0739797181 1.3229173076
#&gt; Beginning PNLS step: .. completed fit_nlme() step.
-#&gt; PNLS step: RSS = 643.7949
-#&gt; fixed effects: 94.17386 -5.473521 -0.6970423 -0.2025145 2.10387
+#&gt; PNLS step: RSS = 643.7936
+#&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; 4.025781e-07 9.628656e-06 </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; 1.027451e-06 2.275704e-05 </div><div class='input'> <span class='va'>f_nlme_dfop_sfo</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/pkg/nlme/man/nlme.html'>nlme</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"DFOP-SFO"</span>, <span class='op'>]</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>pnlsMaxIter <span class='op'>=</span> <span class='fl'>120</span>, tolerance <span class='op'>=</span> <span class='fl'>5e-4</span><span class='op'>)</span>, verbose <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span>
+</div><div class='output co'>#&gt;
#&gt; **Iteration 1
-#&gt; LME step: Loglik: -404.9583, nlminb iterations: 1
+#&gt; LME step: Loglik: -404.9582, nlminb iterations: 1
#&gt; reStruct parameters:
#&gt; ds1 ds2 ds3 ds4 ds5 ds6
-#&gt; -0.4114357 0.9798641 1.6990035 0.7293314 0.3354323 1.7113047
+#&gt; -0.4114355 0.9798697 1.6990037 0.7293315 0.3354323 1.7113046
#&gt; Beginning PNLS step: .. completed fit_nlme() step.
-#&gt; PNLS step: RSS = 630.3642
-#&gt; fixed effects: 93.82269 -5.455991 -0.6788957 -1.862196 -4.199671 0.0553284
+#&gt; PNLS step: RSS = 630.3644
+#&gt; fixed effects: 93.82269 -5.455991 -0.6788957 -1.862196 -4.199671 0.05532828
#&gt; iterations: 120
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0005):
#&gt; fixed reStruct
-#&gt; 0.7879730 0.5822574
+#&gt; 0.7885368 0.5822683
#&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.371224105 0.003056163 1.789939431 0.724671132 0.301602942 1.754200482
+#&gt; -0.371224133 0.003056179 1.789939402 0.724671158 0.301602977 1.754200729
#&gt; Beginning PNLS step: .. completed fit_nlme() step.
-#&gt; PNLS step: RSS = 630.364
-#&gt; fixed effects: 93.82269 -5.455991 -0.6788958 -1.862196 -4.199671 0.05532834
+#&gt; PNLS step: RSS = 630.3633
+#&gt; fixed effects: 93.82269 -5.455992 -0.6788958 -1.862196 -4.199671 0.05532831
#&gt; iterations: 120
#&gt; Convergence crit. (must all become &lt;= tolerance = 0.0005):
#&gt; fixed reStruct
-#&gt; 9.814652e-07 1.059239e-05 </div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/base/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/base/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/base/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/base/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.8547 884.6201 -408.9274
-#&gt; f_nlme_fomc_sfo 2 11 818.5151 853.0089 -398.2576 1 vs 2 21.33957 &lt;.0001
-#&gt; f_nlme_sfo_sfo 3 9 1085.1821 1113.4043 -533.5910 2 vs 3 270.66697 &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.8547 884.6201 -408.9274
+#&gt; 4.789774e-07 2.200661e-05 </div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/graphics/plot.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"FOMC-SFO"</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>]</span><span class='op'>)</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.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme_fomc_sfo</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</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.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_2</span><span class='op'>[</span><span class='st'>"DFOP-SFO"</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>]</span><span class='op'>)</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.default.html'>plot</a></span><span class='op'>(</span><span class='va'>f_nlme_dfop_sfo</span>, <span class='fl'>3</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</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='op'>(</span><span class='va'>f_nlme_dfop_sfo</span>, <span class='va'>f_nlme_fomc_sfo</span>, <span class='va'>f_nlme_sfo_sfo</span><span class='op'>)</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.8547 884.6201 -408.9273
+#&gt; f_nlme_fomc_sfo 2 11 818.5149 853.0087 -398.2575 1 vs 2 21.33975 &lt;.0001
+#&gt; f_nlme_sfo_sfo 3 9 1085.1821 1113.4043 -533.5910 2 vs 3 270.66716 &lt;.0001</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/anova.html'>anova</a></span><span class='op'>(</span><span class='va'>f_nlme_dfop_sfo</span>, <span class='va'>f_nlme_sfo_sfo</span><span class='op'>)</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.8547 884.6201 -408.9273
#&gt; f_nlme_sfo_sfo 2 9 1085.1821 1113.4043 -533.5910 1 vs 2 249.3274 &lt;.0001</div><div class='input'>
- <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme_sfo_sfo</span>)</div><div class='output co'>#&gt; $ff
+ <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>f_nlme_sfo_sfo</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; $ff
#&gt; parent_sink parent_A1 A1_sink
#&gt; 0.5912432 0.4087568 1.0000000
#&gt;
@@ -420,15 +439,16 @@ with additional elements</p>
#&gt; DT50 DT90
#&gt; parent 19.13518 63.5657
#&gt; A1 66.02155 219.3189
-#&gt; </div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span>(<span class='no'>f_nlme_dfop_sfo</span>)</div><div class='output co'>#&gt; $ff
+#&gt; </div><div class='input'> <span class='fu'><a href='endpoints.html'>endpoints</a></span><span class='op'>(</span><span class='va'>f_nlme_dfop_sfo</span><span class='op'>)</span>
+</div><div class='output co'>#&gt; $ff
#&gt; parent_A1 parent_sink
#&gt; 0.2768574 0.7231426
#&gt;
#&gt; $distimes
-#&gt; DT50 DT90 DT50_k1 DT50_k2
-#&gt; parent 11.07091 104.6320 4.462384 46.20825
-#&gt; A1 162.30518 539.1661 NA NA
-#&gt; </div><div class='input'># }
+#&gt; DT50 DT90 DT50back DT50_k1 DT50_k2
+#&gt; parent 11.07091 104.6320 31.49738 4.462384 46.20825
+#&gt; A1 162.30536 539.1667 NA NA NA
+#&gt; </div><div class='input'><span class='co'># }</span>
</div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
@@ -445,7 +465,7 @@ with additional elements</p>
</div>
<div class="pkgdown">
- <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
+ <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
</div>
</footer>

Contact - Imprint