Professional Documents
Culture Documents
Akaike or Bayesian Information Criteria - MATLAB Aicbic
Akaike or Bayesian Information Criteria - MATLAB Aicbic
aicbic
Akaike or Bayesian information criteria
Syntax
aic = aicbic(logL,numParam)
[aic,bic] = aicbic(logL,numParam,numObs)
Description
aic = aicbic(logL,numParam) returns Akaike information criteria (AIC) corresponding to optimized example
loglikelihood function values (logL), as returned by estimate, and the model parameters, numParam.
example
[aic,bic] = aicbic(logL,numParam,numObs) additionally returns Bayesian information criteria (BIC)
corresponding to logL, numParam, and the sample sizes associated with each logL value.
logL1 = -681.4724;
logL2 = -632.3158;
logL3 = -663.4615;
logL4 = -605.9439;
numParam1 = 12;
numParam2 = 27;
numParam3 = 18;
numParam4 = 45;
aic = 1×4
103 ×
The model with the lowest AIC has the best fit. Therefore, the fourth model fits best.
1
Akaike or Bayesian information criteria - MATLAB aicbic
EstMdl1 = arima('ARLags',1);
EstMdl2 = arima('ARLags',1:2);
EstMdl3 = arima('ARLags',1:3);
aic = 3×1
381.7732
358.2422
358.8479
bic = 3×1
389.5887
368.6629
371.8737
The model containing two autoregressive lag parameters fits best since it yields the lowest information criteria. The
structure of the best fitting model matches the model structure that simulated the data.
Input Arguments
2
Akaike or Bayesian information criteria - MATLAB aicbic
Optimized loglikelihood objective function values associated with various model fits, specified as a scalar or vector.
Obtain an optimized loglikelihood value using estimate, infer, estimate, or an Optimization Toolbox™ function
such as fmincon or fminunc.
Number of estimated parameters associated with each corresponding fitted model in logL, specified as a positive
integer, or a vector of positive integers having the same length as logL.
For univariate time series models, use length(info.X) to obtain numParam from a fitted model returned by
estimate.
For VAR models, obtain numParam using summarize from an estimated varm model object.
Sample sizes of the observed series associated with each corresponding fitted model in logL, specified as a
positive integer, or a vector of positive integers having the same length as logL.
AIC statistics associated with each corresponding fitted model in logL, returned as a vector with the same length
as logL.
3
Akaike or Bayesian information criteria - MATLAB aicbic
scalar | vector
BIC statistics associated with each corresponding fitted model in logL, returned as a vector with the same length
as logL.
When comparing multiple model fits, additional model parameters often yield larger, optimized loglikelihood values.
Unlike the optimized loglikelihood value, AIC penalizes for more complex models, i.e., models with additional
parameters.
The formula for AIC, which provides insight into its relationship to the optimized loglikelihood and its penalty for
complexity, is:
Like AIC, BIC uses the optimal loglikelihood function value and penalizes for more complex models, i.e., models
with additional parameters. The penalty of BIC is a function of the sample size, and so is typically more severe than
that of AIC.
References
[1] Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. Time Series Analysis: Forecasting and Control. 3rd ed. Englewood
Cliffs, NJ: Prentice Hall, 1994.
See Also
Objects
arima | garch | regARIMA | varm
Functions
estimate | estimate | estimate | estimate | fmincon | fminunc | infer | lmtest | waldtest
Topics
Information Criteria
Time Series Regression V: Predictor Selection
Determine Minimal Number of Lags Using Information Criterion
4
Akaike or Bayesian information criteria - MATLAB aicbic