diff options
Diffstat (limited to 'docs/reference/AIC.mmkin.html')
-rw-r--r-- | docs/reference/AIC.mmkin.html | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/docs/reference/AIC.mmkin.html b/docs/reference/AIC.mmkin.html index 58590f52..26a880e3 100644 --- a/docs/reference/AIC.mmkin.html +++ b/docs/reference/AIC.mmkin.html @@ -73,7 +73,7 @@ same dataset." /> </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> @@ -110,6 +110,9 @@ same dataset." /> <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> @@ -118,7 +121,7 @@ same dataset." /> </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> @@ -137,7 +140,7 @@ same dataset." /> <div class="col-md-9 contents"> <div class="page-header"> <h1>Calculate the AIC for a column of an mmkin object</h1> - <small class="dont-index">Source: <a href='http://github.com/jranke/mkin/blob/master/R/AIC.mmkin.R'><code>R/AIC.mmkin.R</code></a></small> + <small class="dont-index">Source: <a href='https://github.com/jranke/mkin/blob/master/R/AIC.mmkin.R'><code>R/AIC.mmkin.R</code></a></small> <div class="hidden name"><code>AIC.mmkin.Rd</code></div> </div> @@ -147,10 +150,10 @@ same dataset.</p> </div> <pre class="usage"><span class='co'># S3 method for mmkin</span> -<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>object</span>, <span class='no'>...</span>, <span class='kw'>k</span> <span class='kw'>=</span> <span class='fl'>2</span>) +<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>object</span>, <span class='va'>...</span>, k <span class='op'>=</span> <span class='fl'>2</span><span class='op'>)</span> <span class='co'># S3 method for mmkin</span> -<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>object</span>, <span class='no'>...</span>)</pre> +<span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</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"> @@ -174,34 +177,45 @@ column.</p></td> <p>As in the generic method (a numeric value for single fits, or a dataframe if there are several fits in the column).</p> + <h2 class="hasAnchor" id="author"><a class="anchor" href="#author"></a>Author</h2> + + <p>Johannes Ranke</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'> <span class='co'># skip, as it takes > 10 s on winbuilder</span> - <span class='no'>f</span> <span class='kw'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span>), - <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='st'>"FOCUS A"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_A</span>, - <span class='st'>"FOCUS C"</span> <span class='kw'>=</span> <span class='no'>FOCUS_2006_C</span>), <span class='kw'>cores</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>quiet</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> + <span class='va'>f</span> <span class='op'><-</span> <span class='fu'><a href='mmkin.html'>mmkin</a></span><span class='op'>(</span><span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"SFO"</span>, <span class='st'>"FOMC"</span>, <span class='st'>"DFOP"</span><span class='op'>)</span>, + <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"FOCUS A"</span> <span class='op'>=</span> <span class='va'>FOCUS_2006_A</span>, + <span class='st'>"FOCUS C"</span> <span class='op'>=</span> <span class='va'>FOCUS_2006_C</span><span class='op'>)</span>, cores <span class='op'>=</span> <span class='fl'>1</span>, quiet <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span> +</div><div class='output co'>#> <span class='warning'>Warning: Optimisation did not converge:</span> #> <span class='warning'>false convergence (8)</span></div><div class='input'> <span class='co'># We get a warning because the FOMC model does not converge for the</span> <span class='co'># FOCUS A dataset, as it is well described by SFO</span> - <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[<span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span>]) <span class='co'># We get a single number for a single fit</span></div><div class='output co'>#> [1] 55.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span><span class='kw'>[[</span><span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span>]]) <span class='co'># or when extracting an mkinfit object</span></div><div class='output co'>#> [1] 55.28197</div><div class='input'> + <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span><span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># We get a single number for a single fit</span> +</div><div class='output co'>#> [1] 55.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[[</span><span class='st'>"SFO"</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># or when extracting an mkinfit object</span> +</div><div class='output co'>#> [1] 55.28197</div><div class='input'> <span class='co'># For FOCUS A, the models fit almost equally well, so the higher the number</span> <span class='co'># of parameters, the higher (worse) the AIC</span> - <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>])</div><div class='output co'>#> df AIC + <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> df AIC #> SFO 3 55.28197 -#> FOMC 4 57.28202 -#> DFOP 5 59.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>], <span class='kw'>k</span> <span class='kw'>=</span> <span class='fl'>0</span>) <span class='co'># If we do not penalize additional parameters, we get nearly the same</span></div><div class='output co'>#> df AIC +#> FOMC 4 57.28211 +#> DFOP 5 59.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span>, k <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span> <span class='co'># If we do not penalize additional parameters, we get nearly the same</span> +</div><div class='output co'>#> df AIC #> SFO 3 49.28197 -#> FOMC 4 49.28202 -#> DFOP 5 49.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS A"</span>]) <span class='co'># Comparing the BIC gives a very similar picture</span></div><div class='output co'>#> df BIC +#> FOMC 4 49.28211 +#> DFOP 5 49.28197</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS A"</span><span class='op'>]</span><span class='op'>)</span> <span class='co'># Comparing the BIC gives a very similar picture</span> +</div><div class='output co'>#> df BIC #> SFO 3 55.52030 -#> FOMC 4 57.59979 +#> FOMC 4 57.59987 #> DFOP 5 59.67918</div><div class='input'> <span class='co'># For FOCUS C, the more complex models fit better</span> - <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='output co'>#> df AIC + <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>AIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS C"</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> df AIC #> SFO 3 59.29336 #> FOMC 4 44.68652 -#> DFOP 5 29.02372</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span>(<span class='no'>f</span>[, <span class='st'>"FOCUS C"</span>])</div><div class='output co'>#> df BIC +#> DFOP 5 29.02372</div><div class='input'> <span class='fu'><a href='https://rdrr.io/r/stats/AIC.html'>BIC</a></span><span class='op'>(</span><span class='va'>f</span><span class='op'>[</span>, <span class='st'>"FOCUS C"</span><span class='op'>]</span><span class='op'>)</span> +</div><div class='output co'>#> df BIC #> SFO 3 59.88504 #> FOMC 4 45.47542 #> DFOP 5 30.00984</div><div class='input'> @@ -222,7 +236,7 @@ dataframe if there are several fits in the column).</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> |