Functions to extract or recalculate the Akaike Information Criterion and the Bayesian Information Criterion of an averaging model fitted by the rav function.
AIC(object,..., k =2)BIC(object,...)
Arguments
object: An object of class rav containing an estimated averaging model.
...: 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=nln(nRSS)+kp
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=nln(nRSS)+ln(n)p
As default, when n/p<40, AIC and BIC are corrected in AICc and BICc:
AICc=AIC+n−p−12(p+1)pBICc=BIC+n−p−1ln(n)(p+1)p
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
Returns
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)