Learn R Programming

MSGARCH (version 0.17.7)

AIC: Compute Akaike information criterion (AIC).

Description

Compute Akaike information criterion (AIC).

Usage

AIC(fit)

Arguments

fit
Fit object of type MSGARCH_MLE_FIT created with fit.mle or MSGARCH_BAY_FIT created with fit.bayes.

Value

AIC value.

Details

If a matrix of MCMC posterior draws estimates is given, the AIC on the posterior mean is calculated.

References

Akaike, H. (1974). A New Look at the Statistical Model Identification. IEEE Transactions on Automatic Control, 19, pp. 716-723.

Examples

Run this code
# load data
data("sp500")
sp500 = sp500[1:1000]

# create model specification
spec = MSGARCH::create.spec() 

# fit the model by MLE                                                         
fit = MSGARCH::fit.mle(spec = spec, y = sp500, ctr = list(do.init = FALSE))

# compute AIC
AIC = MSGARCH::AIC(fit)

Run the code above in your browser using DataLab