diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-11-17 14:54:20 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-11-17 14:56:25 +0100 |
commit | e5d1df9a9b1f0951d7dfbaf24eee4294470b73e2 (patch) | |
tree | 18740ef050a68d1a6fe91f1bd2fdfdd97ac6448b /docs/reference/loftest.html | |
parent | 90354f5cd9e095f9ef98424689a2716770b248d4 (diff) |
Complete update of online docs for v1.2.0
Diffstat (limited to 'docs/reference/loftest.html')
-rw-r--r-- | docs/reference/loftest.html | 121 |
1 files changed, 65 insertions, 56 deletions
diff --git a/docs/reference/loftest.html b/docs/reference/loftest.html index ee9b37e4..254b568f 100644 --- a/docs/reference/loftest.html +++ b/docs/reference/loftest.html @@ -20,7 +20,7 @@ lrtest.default from the lmtest package."><!-- mathjax --><script src="https://cd </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">mkin</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.1.0</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.2.0</span> </span> </div> @@ -47,19 +47,25 @@ lrtest.default from the lmtest package."><!-- mathjax --><script src="https://cd <a href="../articles/web_only/dimethenamid_2018.html">Example evaluations of dimethenamid data from 2018 with nonlinear mixed-effects models</a> </li> <li> - <a href="../articles/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</a> + <a href="../articles/web_only/multistart.html">Short demo of the multistart method</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/web_only/FOCUS_Z.html">Example evaluation of FOCUS Example Dataset Z</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> + <a href="../articles/web_only/benchmarks.html">Benchmark timings for mkin</a> + </li> + <li> + <a href="../articles/web_only/saem_benchmarks.html">Benchmark timings for saem.mmkin</a> </li> </ul></li> <li> @@ -93,18 +99,21 @@ compares the likelihoods using the likelihood ratio test </div> <div id="ref-usage"> - <div class="sourceCode"><pre class="sourceCode r"><code><span class="fu">loftest</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span> - -<span class="co"># S3 method for mkinfit</span> -<span class="fu">loftest</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></code></pre></div> + <div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">loftest</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span> +<span></span> +<span><span class="co"># S3 method for mkinfit</span></span> +<span><span class="fu">loftest</span><span class="op">(</span><span class="va">object</span>, <span class="va">...</span><span class="op">)</span></span></code></pre></div> </div> <div id="arguments"> <h2>Arguments</h2> <dl><dt>object</dt> <dd><p>A model object with a defined loftest method</p></dd> + + <dt>...</dt> <dd><p>Not used</p></dd> + </dl></div> <div id="details"> <h2>Details</h2> @@ -120,12 +129,12 @@ of replicate samples.</p> <div id="ref-examples"> <h2>Examples</h2> - <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span class="co"># \dontrun{</span></span> -<span class="r-in"><span class="va">test_data</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">subset</a></span><span class="op">(</span><span class="va">synthetic_data_for_UBA_2014</span><span class="op">[[</span><span class="fl">12</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">data</span>, <span class="va">name</span> <span class="op">==</span> <span class="st">"parent"</span><span class="op">)</span></span> -<span class="r-in"><span class="va">sfo_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="va">test_data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> -<span class="r-in"><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_fit</span><span class="op">)</span> <span class="co"># We see a clear pattern in the residuals</span></span> + <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \dontrun{</span></span></span> +<span class="r-in"><span><span class="va">test_data</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/subset.html" class="external-link">subset</a></span><span class="op">(</span><span class="va">synthetic_data_for_UBA_2014</span><span class="op">[[</span><span class="fl">12</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">data</span>, <span class="va">name</span> <span class="op">==</span> <span class="st">"parent"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">sfo_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="st">"SFO"</span>, <span class="va">test_data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_fit</span><span class="op">)</span> <span class="co"># We see a clear pattern in the residuals</span></span></span> <span class="r-plt img"><img src="loftest-1.png" alt="" width="700" height="433"></span> -<span class="r-in"><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_fit</span><span class="op">)</span> <span class="co"># We have a clear lack of fit</span></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_fit</span><span class="op">)</span> <span class="co"># We have a clear lack of fit</span></span></span> <span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> @@ -135,13 +144,13 @@ of replicate samples.</p> <span class="r-out co"><span class="r-pr">#></span> 2 3 -63.954 -7 46.487 7.027e-08 ***</span> <span class="r-out co"><span class="r-pr">#></span> ---</span> <span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> -<span class="r-in"><span class="co">#</span></span> -<span class="r-in"><span class="co"># We try a different model (the one that was used to generate the data)</span></span> -<span class="r-in"><span class="va">dfop_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="va">test_data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> -<span class="r-in"><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">dfop_fit</span><span class="op">)</span> <span class="co"># We don't see systematic deviations, but heteroscedastic residuals</span></span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># We try a different model (the one that was used to generate the data)</span></span></span> +<span class="r-in"><span><span class="va">dfop_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="st">"DFOP"</span>, <span class="va">test_data</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">dfop_fit</span><span class="op">)</span> <span class="co"># We don't see systematic deviations, but heteroscedastic residuals</span></span></span> <span class="r-plt img"><img src="loftest-2.png" alt="" width="700" height="433"></span> -<span class="r-in"><span class="co"># therefore we should consider adapting the error model, although we have</span></span> -<span class="r-in"><span class="fu">loftest</span><span class="op">(</span><span class="va">dfop_fit</span><span class="op">)</span> <span class="co"># no lack of fit</span></span> +<span class="r-in"><span><span class="co"># therefore we should consider adapting the error model, although we have</span></span></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">dfop_fit</span><span class="op">)</span> <span class="co"># no lack of fit</span></span></span> <span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> @@ -149,12 +158,12 @@ of replicate samples.</p> <span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq)</span> <span class="r-out co"><span class="r-pr">#></span> 1 10 -40.710 </span> <span class="r-out co"><span class="r-pr">#></span> 2 5 -42.453 -5 3.485 0.6257</span> -<span class="r-in"><span class="co">#</span></span> -<span class="r-in"><span class="co"># This is the anova model used internally for the comparison</span></span> -<span class="r-in"><span class="va">test_data_anova</span> <span class="op"><-</span> <span class="va">test_data</span></span> -<span class="r-in"><span class="va">test_data_anova</span><span class="op">$</span><span class="va">time</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova</span><span class="op">$</span><span class="va">time</span><span class="op">)</span></span> -<span class="r-in"><span class="va">anova_fit</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">value</span> <span class="op">~</span> <span class="va">time</span>, data <span class="op">=</span> <span class="va">test_data_anova</span><span class="op">)</span></span> -<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">anova_fit</span><span class="op">)</span></span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># This is the anova model used internally for the comparison</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova</span> <span class="op"><-</span> <span class="va">test_data</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova</span><span class="op">$</span><span class="va">time</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova</span><span class="op">$</span><span class="va">time</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">anova_fit</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">value</span> <span class="op">~</span> <span class="va">time</span>, data <span class="op">=</span> <span class="va">test_data_anova</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">anova_fit</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Call:</span> <span class="r-out co"><span class="r-pr">#></span> lm(formula = value ~ time, data = test_data_anova)</span> @@ -181,18 +190,18 @@ of replicate samples.</p> <span class="r-out co"><span class="r-pr">#></span> Multiple R-squared: 0.9953, Adjusted R-squared: 0.9912 </span> <span class="r-out co"><span class="r-pr">#></span> F-statistic: 240.5 on 8 and 9 DF, p-value: 1.417e-09</span> <span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/stats/logLik.html" class="external-link">logLik</a></span><span class="op">(</span><span class="va">anova_fit</span><span class="op">)</span> <span class="co"># We get the same likelihood and degrees of freedom</span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/stats/logLik.html" class="external-link">logLik</a></span><span class="op">(</span><span class="va">anova_fit</span><span class="op">)</span> <span class="co"># We get the same likelihood and degrees of freedom</span></span></span> <span class="r-out co"><span class="r-pr">#></span> 'log Lik.' -40.71015 (df=10)</span> -<span class="r-in"><span class="co">#</span></span> -<span class="r-in"><span class="va">test_data_2</span> <span class="op"><-</span> <span class="va">synthetic_data_for_UBA_2014</span><span class="op">[[</span><span class="fl">12</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">data</span></span> -<span class="r-in"><span class="va">m_synth_SFO_lin</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"M1"</span><span class="op">)</span>,</span> -<span class="r-in"> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"M2"</span><span class="op">)</span>,</span> -<span class="r-in"> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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><span class="op">)</span></span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="va">test_data_2</span> <span class="op"><-</span> <span class="va">synthetic_data_for_UBA_2014</span><span class="op">[[</span><span class="fl">12</span><span class="op">]</span><span class="op">]</span><span class="op">$</span><span class="va">data</span></span></span> +<span class="r-in"><span><span class="va">m_synth_SFO_lin</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"M1"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="st">"M2"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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><span class="op">)</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> -<span class="r-in"><span class="va">sfo_lin_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_SFO_lin</span>, <span class="va">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> -<span class="r-in"><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_lin_fit</span><span class="op">)</span> <span class="co"># not a good model, we try parallel formation</span></span> +<span class="r-in"><span><span class="va">sfo_lin_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_SFO_lin</span>, <span class="va">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_lin_fit</span><span class="op">)</span> <span class="co"># not a good model, we try parallel formation</span></span></span> <span class="r-plt img"><img src="loftest-3.png" alt="" width="700" height="433"></span> -<span class="r-in"><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_lin_fit</span><span class="op">)</span></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_lin_fit</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> @@ -202,15 +211,15 @@ of replicate samples.</p> <span class="r-out co"><span class="r-pr">#></span> 2 7 -171.927 -21 156.64 < 2.2e-16 ***</span> <span class="r-out co"><span class="r-pr">#></span> ---</span> <span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> -<span class="r-in"><span class="co">#</span></span> -<span class="r-in"><span class="va">m_synth_SFO_par</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span> -<span class="r-in"> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span> -<span class="r-in"> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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><span class="op">)</span></span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="va">m_synth_SFO_par</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span>, to <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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><span class="op">)</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> -<span class="r-in"><span class="va">sfo_par_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_SFO_par</span>, <span class="va">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> -<span class="r-in"><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_par_fit</span><span class="op">)</span> <span class="co"># much better for metabolites</span></span> +<span class="r-in"><span><span class="va">sfo_par_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_SFO_par</span>, <span class="va">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">sfo_par_fit</span><span class="op">)</span> <span class="co"># much better for metabolites</span></span></span> <span class="r-plt img"><img src="loftest-4.png" alt="" width="700" height="433"></span> -<span class="r-in"><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_par_fit</span><span class="op">)</span></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">sfo_par_fit</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> @@ -220,15 +229,15 @@ of replicate samples.</p> <span class="r-out co"><span class="r-pr">#></span> 2 7 -156.331 -21 125.45 < 2.2e-16 ***</span> <span class="r-out co"><span class="r-pr">#></span> ---</span> <span class="r-out co"><span class="r-pr">#></span> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1</span> -<span class="r-in"><span class="co">#</span></span> -<span class="r-in"><span class="va">m_synth_DFOP_par</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"DFOP"</span>, to <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span> -<span class="r-in"> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span> -<span class="r-in"> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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><span class="op">)</span></span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="va">m_synth_DFOP_par</span> <span class="op"><-</span> <span class="fu"><a href="mkinmod.html">mkinmod</a></span><span class="op">(</span>parent <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"DFOP"</span>, to <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"M1"</span>, <span class="st">"M2"</span><span class="op">)</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M1 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <span class="op">=</span> <span class="st">"SFO"</span><span class="op">)</span>,</span></span> +<span class="r-in"><span> M2 <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span>type <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><span class="op">)</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Temporary DLL for differentials generated and loaded</span> -<span class="r-in"><span class="va">dfop_par_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_DFOP_par</span>, <span class="va">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span> -<span class="r-in"><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">dfop_par_fit</span><span class="op">)</span> <span class="co"># No visual lack of fit</span></span> +<span class="r-in"><span><span class="va">dfop_par_fit</span> <span class="op"><-</span> <span class="fu"><a href="mkinfit.html">mkinfit</a></span><span class="op">(</span><span class="va">m_synth_DFOP_par</span>, <span class="va">test_data_2</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="plot.mkinfit.html">plot_res</a></span><span class="op">(</span><span class="va">dfop_par_fit</span><span class="op">)</span> <span class="co"># No visual lack of fit</span></span></span> <span class="r-plt img"><img src="loftest-5.png" alt="" width="700" height="433"></span> -<span class="r-in"><span class="fu">loftest</span><span class="op">(</span><span class="va">dfop_par_fit</span><span class="op">)</span> <span class="co"># no lack of fit found by the test</span></span> +<span class="r-in"><span><span class="fu">loftest</span><span class="op">(</span><span class="va">dfop_par_fit</span><span class="op">)</span> <span class="co"># no lack of fit found by the test</span></span></span> <span class="r-out co"><span class="r-pr">#></span> Likelihood ratio test</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Model 1: ANOVA with error model const</span> @@ -236,13 +245,13 @@ of replicate samples.</p> <span class="r-out co"><span class="r-pr">#></span> #Df LogLik Df Chisq Pr(>Chisq)</span> <span class="r-out co"><span class="r-pr">#></span> 1 28 -93.606 </span> <span class="r-out co"><span class="r-pr">#></span> 2 9 -102.763 -19 18.313 0.5016</span> -<span class="r-in"><span class="co">#</span></span> -<span class="r-in"><span class="co"># The anova model used for comparison in the case of transformation products</span></span> -<span class="r-in"><span class="va">test_data_anova_2</span> <span class="op"><-</span> <span class="va">dfop_par_fit</span><span class="op">$</span><span class="va">data</span></span> -<span class="r-in"><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">variable</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">variable</span><span class="op">)</span></span> -<span class="r-in"><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">time</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">time</span><span class="op">)</span></span> -<span class="r-in"><span class="va">anova_fit_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">observed</span> <span class="op">~</span> <span class="va">time</span><span class="op">:</span><span class="va">variable</span> <span class="op">-</span> <span class="fl">1</span>, data <span class="op">=</span> <span class="va">test_data_anova_2</span><span class="op">)</span></span> -<span class="r-in"><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">anova_fit_2</span><span class="op">)</span></span> +<span class="r-in"><span><span class="co">#</span></span></span> +<span class="r-in"><span><span class="co"># The anova model used for comparison in the case of transformation products</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova_2</span> <span class="op"><-</span> <span class="va">dfop_par_fit</span><span class="op">$</span><span class="va">data</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">variable</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">variable</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">time</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">as.factor</a></span><span class="op">(</span><span class="va">test_data_anova_2</span><span class="op">$</span><span class="va">time</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">anova_fit_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">observed</span> <span class="op">~</span> <span class="va">time</span><span class="op">:</span><span class="va">variable</span> <span class="op">-</span> <span class="fl">1</span>, data <span class="op">=</span> <span class="va">test_data_anova_2</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="va">anova_fit_2</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> Call:</span> <span class="r-out co"><span class="r-pr">#></span> lm(formula = observed ~ time:variable - 1, data = test_data_anova_2)</span> @@ -287,7 +296,7 @@ of replicate samples.</p> <span class="r-out co"><span class="r-pr">#></span> Multiple R-squared: 0.9979, Adjusted R-squared: 0.9957 </span> <span class="r-out co"><span class="r-pr">#></span> F-statistic: 469.2 on 25 and 25 DF, p-value: < 2.2e-16</span> <span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-in"><span class="co"># }</span></span> +<span class="r-in"><span><span class="co"># }</span></span></span> </code></pre></div> </div> </div> @@ -302,7 +311,7 @@ of replicate samples.</p> </div> <div class="pkgdown"> - <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.3.</p> + <p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.6.</p> </div> </footer></div> |