From 2bb59c88d49b193f278916ad9cc4de83c0de9604 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 2 Mar 2022 18:03:54 +0100 Subject: Make tests more platform independent, update docs --- docs/reference/AIC.mmkin.html | 252 ++++++++++++++++-------------------------- 1 file changed, 96 insertions(+), 156 deletions(-) (limited to 'docs/reference/AIC.mmkin.html') diff --git a/docs/reference/AIC.mmkin.html b/docs/reference/AIC.mmkin.html index fbc90802..35becede 100644 --- a/docs/reference/AIC.mmkin.html +++ b/docs/reference/AIC.mmkin.html @@ -1,68 +1,13 @@ - - - - - - - -Calculate the AIC for a column of an mmkin object — AIC.mmkin • mkin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calculate the AIC for a column of an mmkin object — AIC.mmkin • mkin - - + + - - -
-
- -
- -
+
@@ -149,102 +88,103 @@ same dataset." /> same dataset.

-
# S3 method for mmkin
-AIC(object, ..., k = 2)
-
-# S3 method for mmkin
-BIC(object, ...)
- -

Arguments

- - - - - - - - - - - - - - -
object

An object of class mmkin, containing only one -column.

...

For compatibility with the generic method

k

As in the generic method

- -

Value

+
+
# S3 method for mmkin
+AIC(object, ..., k = 2)
+
+# S3 method for mmkin
+BIC(object, ...)
+
+
+

Arguments

+
object
+

An object of class mmkin, containing only one +column.

+
...
+

For compatibility with the generic method

+
k
+

As in the generic method

+
+
+

Value

As in the generic method (a numeric value for single fits, or a dataframe if there are several fits in the column).

-

Author

- +
+
+

Author

Johannes Ranke

+
-

Examples

-
- # skip, as it takes > 10 s on winbuilder - f <- mmkin(c("SFO", "FOMC", "DFOP"), - list("FOCUS A" = FOCUS_2006_A, - "FOCUS C" = FOCUS_2006_C), cores = 1, quiet = TRUE) - # We get a warning because the FOMC model does not converge for the - # FOCUS A dataset, as it is well described by SFO - - AIC(f["SFO", "FOCUS A"]) # We get a single number for a single fit -
#> [1] 55.28197
AIC(f[["SFO", "FOCUS A"]]) # or when extracting an mkinfit object -
#> [1] 55.28197
- # For FOCUS A, the models fit almost equally well, so the higher the number - # of parameters, the higher (worse) the AIC - AIC(f[, "FOCUS A"]) -
#> df AIC -#> SFO 3 55.28197 -#> FOMC 4 57.28222 -#> DFOP 5 59.28197
AIC(f[, "FOCUS A"], k = 0) # If we do not penalize additional parameters, we get nearly the same -
#> df AIC -#> SFO 3 49.28197 -#> FOMC 4 49.28222 -#> DFOP 5 49.28197
BIC(f[, "FOCUS A"]) # Comparing the BIC gives a very similar picture -
#> df BIC -#> SFO 3 55.52030 -#> FOMC 4 57.59999 -#> DFOP 5 59.67918
- # For FOCUS C, the more complex models fit better - AIC(f[, "FOCUS C"]) -
#> df AIC -#> SFO 3 59.29336 -#> FOMC 4 44.68652 -#> DFOP 5 29.02372
BIC(f[, "FOCUS C"]) -
#> df BIC -#> SFO 3 59.88504 -#> FOMC 4 45.47542 -#> DFOP 5 30.00984
- -
+
+

Examples

+

+   # skip, as it takes > 10 s on winbuilder
+  f <- mmkin(c("SFO", "FOMC", "DFOP"),
+    list("FOCUS A" = FOCUS_2006_A,
+         "FOCUS C" = FOCUS_2006_C), cores = 1, quiet = TRUE)
+  # We get a warning because the FOMC model does not converge for the
+  # FOCUS A dataset, as it is well described by SFO
+
+  AIC(f["SFO", "FOCUS A"]) # We get a single number for a single fit
+#> [1] 55.28197
+  AIC(f[["SFO", "FOCUS A"]]) # or when extracting an mkinfit object
+#> [1] 55.28197
+
+  # For FOCUS A, the models fit almost equally well, so the higher the number
+  # of parameters, the higher (worse) the AIC
+  AIC(f[, "FOCUS A"])
+#>      df      AIC
+#> SFO   3 55.28197
+#> FOMC  4 57.28222
+#> DFOP  5 59.28197
+  AIC(f[, "FOCUS A"], k = 0) # If we do not penalize additional parameters, we get nearly the same
+#>      df      AIC
+#> SFO   3 49.28197
+#> FOMC  4 49.28222
+#> DFOP  5 49.28197
+  BIC(f[, "FOCUS A"])        # Comparing the BIC gives a very similar picture
+#>      df      BIC
+#> SFO   3 55.52030
+#> FOMC  4 57.59999
+#> DFOP  5 59.67918
+
+  # For FOCUS C, the more complex models fit better
+  AIC(f[, "FOCUS C"])
+#>      df      AIC
+#> SFO   3 59.29336
+#> FOMC  4 44.68652
+#> DFOP  5 29.02372
+  BIC(f[, "FOCUS C"])
+#>      df      BIC
+#> SFO   3 59.88504
+#> FOMC  4 45.47542
+#> DFOP  5 30.00984
+  
+
+
+
+
- - - + + -- cgit v1.2.1