Compute Akaike information criterion (AIC).

Description

Compute Akaike information criterion (AIC).

Usage

1
AIC(fit)

Arguments

fit

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

Details

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

Value

AIC value.

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)