AIC {rAverage} | R Documentation |
Information Criteria for averaging models
Description
Functions to extract or recalculate the Akaike Information Criterion and the Bayesian Information
Criterion of an averaging model fitted by the rav
function.
Usage
AIC(object, ..., k = 2)
BIC(object, ...)
Arguments
object |
An object of class |
... |
Optionally more fitted model objects (see details). |
k |
Numeric, the penalty per parameter to be used; the default k = 2 is the classical AIC. |
Details
The functions AIC and BIC are used, respectively, to extract the Akaike Information Criterion and the
Bayesian Information Criterion of a model fitted by the function rav
.
AIC is calculated as:
AIC = n \ln \left( \frac{RSS}{n} \right) + k p
where n
is the number of data available, k
is the penalty per parameter ()usually equal to 2),
p
is the number of parameters and RSS
is the residual sum of squares.
BIC is calculated as:
BIC = n \ln \left( \frac{RSS}{n} \right) + \ln(n) p
As default, when n / p < 40
, AIC and BIC are corrected in AICc and BICc:
AICc = AIC + \frac{2 (p+1) p}{n-p-1}
BICc = BIC + \frac{\ln(n) (p+1) p}{n-p-1}
to avoid the correction, set correct = FALSE
. On the contrary, if you want the correction, set
correct = TRUE
. When the argument correct
is not specified, the rule n / p < 40
is
applied.
As default, the functions extract the indices of the (first) best model. The optional argument
whichModel
can be specified to extract the indices of another model. Options are:
-
"null"
: null model -
"ESM"
: equal scale values model -
"SAM"
: simple averaging model -
"EAM"
: equal-weights averaging model -
"DAM"
: differential-weight averaging model -
"IC"
: information criteria model
Value
A numeric value representing the information criterion of the selected model.
See Also
rav
,
rAverage-package
AIC
,
BIC
Examples
## Not run:
data(fmdata1)
fm1 <- rav(fmdata1, lev=c(3,3))
AIC(fm1)
BIC(fm1)
## End(Not run)