From c3700bec3a704660d3ade7a54c56b7084beb02b4 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 13 Nov 2019 21:15:35 +0100 Subject: Calculate Akaike weights --- docs/reference/aw.html | 214 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 docs/reference/aw.html (limited to 'docs/reference/aw.html') diff --git a/docs/reference/aw.html b/docs/reference/aw.html new file mode 100644 index 00000000..b6f3ce48 --- /dev/null +++ b/docs/reference/aw.html @@ -0,0 +1,214 @@ + + + + + + + + +Calculate Akaike weights for model averaging — aw • mkin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +
+

Akaike weights are calculated based on the relative +expected Kullback-Leibler information as specified +by Burnham and Anderson (2004).

+
+ +
aw(object, ...)
+
+# S3 method for mkinfit
+aw(object, ...)
+
+# S3 method for mmkin
+aw(object, ...)
+ +

Arguments

+ + + + + + + + + + +
object

An mmkin column object, containing two or more +mkinfit models that have been fitted to the same data, +or an mkinfit object. In the latter case, further mkinfit +objects fitted to the same data should be specified +as dots arguments.

...

Not used in the method for mmkin column objects, +further mkinfit objects in the method for mkinfit objects.

+ +

References

+ +

Burnham KP and Anderson DR (2004) Multimodel + Inference: Understanding AIC and BIC in Model Selection + Sociological Methods & Research 33(2) 261-304

+ +

Examples

+
# \dontrun{ +f_sfo <- mkinfit("SFO", FOCUS_2006_D, quiet = TRUE) +f_dfop <- mkinfit("DFOP", FOCUS_2006_D, quiet = TRUE) +aw_sfo_dfop <- aw(f_sfo, f_dfop) +sum(aw_sfo_dfop)
#> [1] 1
aw_sfo_dfop # SFO gets more weight as it has less parameters and a similar fit
#> [1] 0.5970258 0.4029742
f <- mmkin(c("SFO", "FOMC", "DFOP"), list("FOCUS D" = FOCUS_2006_D), cores = 1, quiet = TRUE) +aw(f)
#> [1] 0.4808722 0.1945539 0.3245740
sum(aw(f))
#> [1] 1
aw(f[c("SFO", "DFOP")])
#> [1] 0.5970258 0.4029742
# } +
+
+ +
+ + +
+ + +
+

Site built with pkgdown 1.4.1.

+
+ +
+
+ + + + + + + + -- cgit v1.2.3 From 51535c943d2846bc73ad69a11909aac606996b7d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 13 Nov 2019 22:16:43 +0100 Subject: Improve formatting using markdown --- R/aw.R | 16 +++++++--------- docs/reference/aw.html | 12 ++++++------ man/aw.Rd | 12 ++++++------ 3 files changed, 19 insertions(+), 21 deletions(-) (limited to 'docs/reference/aw.html') diff --git a/R/aw.R b/R/aw.R index 24078f38..f46b20ec 100644 --- a/R/aw.R +++ b/R/aw.R @@ -4,16 +4,17 @@ #' expected Kullback-Leibler information as specified #' by Burnham and Anderson (2004). #' -#' @param object An mmkin column object, containing two or more -#' \code{\link{mkinfit}} models that have been fitted to the same data, +#' @param object An [mmkin] column object, containing two or more +#' [mkinfit] models that have been fitted to the same data, #' or an mkinfit object. In the latter case, further mkinfit #' objects fitted to the same data should be specified #' as dots arguments. -#' @param \dots Not used in the method for mmkin column objects, -#' further mkinfit objects in the method for mkinfit objects. +#' @param \dots Not used in the method for [mmkin] column objects, +#' further [mkinfit] objects in the method for mkinfit objects. #' @references Burnham KP and Anderson DR (2004) Multimodel -#' Inference: Understanding AIC and BIC in Model Selection -#' Sociological Methods & Research 33(2) 261-304 +#' Inference: Understanding AIC and BIC in Model Selection. +#' *Sociological Methods & Research* **33**(2) 261-304 +#' @md #' @examples #' \dontrun{ #' f_sfo <- mkinfit("SFO", FOCUS_2006_D, quiet = TRUE) @@ -55,6 +56,3 @@ aw.mmkin <- function(object, ...) { if (ncol(object) > 1) stop("Please supply an mmkin column object") do.call(aw, object) } - - - diff --git a/docs/reference/aw.html b/docs/reference/aw.html index b6f3ce48..22201229 100644 --- a/docs/reference/aw.html +++ b/docs/reference/aw.html @@ -153,24 +153,24 @@ by Burnham and Anderson (2004).

object -

An mmkin column object, containing two or more -mkinfit models that have been fitted to the same data, +

An mmkin column object, containing two or more +mkinfit models that have been fitted to the same data, or an mkinfit object. In the latter case, further mkinfit objects fitted to the same data should be specified as dots arguments.

... -

Not used in the method for mmkin column objects, -further mkinfit objects in the method for mkinfit objects.

+

Not used in the method for mmkin column objects, +further mkinfit objects in the method for mkinfit objects.

References

Burnham KP and Anderson DR (2004) Multimodel - Inference: Understanding AIC and BIC in Model Selection - Sociological Methods & Research 33(2) 261-304

+Inference: Understanding AIC and BIC in Model Selection. +Sociological Methods & Research 33(2) 261-304

Examples

# \dontrun{ diff --git a/man/aw.Rd b/man/aw.Rd index f0994b94..40676716 100644 --- a/man/aw.Rd +++ b/man/aw.Rd @@ -13,14 +13,14 @@ aw(object, ...) \method{aw}{mmkin}(object, ...) } \arguments{ -\item{object}{An mmkin column object, containing two or more -\code{\link{mkinfit}} models that have been fitted to the same data, +\item{object}{An \link{mmkin} column object, containing two or more +\link{mkinfit} models that have been fitted to the same data, or an mkinfit object. In the latter case, further mkinfit objects fitted to the same data should be specified as dots arguments.} -\item{\dots}{Not used in the method for mmkin column objects, -further mkinfit objects in the method for mkinfit objects.} +\item{\dots}{Not used in the method for \link{mmkin} column objects, +further \link{mkinfit} objects in the method for mkinfit objects.} } \description{ Akaike weights are calculated based on the relative @@ -42,6 +42,6 @@ aw(f[c("SFO", "DFOP")]) } \references{ Burnham KP and Anderson DR (2004) Multimodel - Inference: Understanding AIC and BIC in Model Selection - Sociological Methods & Research 33(2) 261-304 +Inference: Understanding AIC and BIC in Model Selection. +\emph{Sociological Methods & Research} \strong{33}(2) 261-304 } -- cgit v1.2.3