logo资料库

Matlab的AIC和BIC的计算方法-关于AIC.doc

第1页 / 共5页
第2页 / 共5页
第3页 / 共5页
第4页 / 共5页
第5页 / 共5页
资料共5页,全文预览结束
aic - Akaike Information Criterion for estimated m
Syntax
Arguments
Description
Remarks
References
See Also
1.AIC 只需两个 inputs ( LLF , numParams) 2.BIC 需要三个 inputs (LLF , numParams , numObs) 3.aicbic.m 在 garch toolbox 工具箱,AIC,BIC 都容易计算,重点是求 LLF. ******************* function [AIC , BIC] = aicbic(LLF , numParams , numObs) %AICBIC Akaike and Bayesian information criteria for model order selection. % Given optimized log-likelihood function (LLF) values obtained by fitting % models of the conditional mean and variance to a univariate return series, % compute the Akaike (AIC) and Bayesian (BIC) information criteria. Since % information criteria penalize models with additional parameters, AIC and % BIC are model order selection criteria based on parsimony. When using % either AIC or BIC, models that minimize the criteria are preferred. % % [AIC , BIC] = aicbic(LLF , NumParams , NumObs) % % Optional Inputs: NumObs % % Inputs: % LLF - Vector of optimized log-likelihood objective function (LLF) % values associated with parameter estimates of various models. The LLF % values are assumed to be obtained from the estimation function GARCHFIT, % or the inference function GARCHINFER. Type "help garchfit" or "help
% garchinfer" for details. % % NumParams - Number of estimated parameters associated with each value % in LLF. NumParams may be a scalar applied to all values in LLF, or a % vector the same length as LLF. All elements of NumParams must be % positive integers. NumParams may be obtained from the function % GARCHCOUNT. Type "help garchcount" for details. % % Optional Input: % NumObs - Sample sizes of the observed return series associated with each % value of LLF. NumObs is required for computing BIC, but is not needed % for AIC. NumObs may be a scalar applied to all values in LLF, or a % vector the same length as LLF. All elements NumObs must be positive % integers. % % Outputs: % AIC - Vector of AIC statistics associated with each LLF objective % function value. The AIC statistic is defined as: % % AIC = -2*LLF + 2*NumParams % % BIC - Vector of BIC statistics associated with each LLF objective
% function value. The BIC statistic is defined as: % % BIC = -2*LLF + NumParams*Log(NumObs) % %example %garch.pdf page 8-2. load garchdata dem2gbp = price2ret(DEM2GBP); [m,n]=size(dem2gbp); %[1974,1] NumObs=m; %NumObs=1974 spec11 = garchset('P',1,'Q',1,'Display','off'); [coeff11,errors11,LLF11] = garchfit(spec11,dem2gbp); garchdisp(coeff11,errors11) NumParams = garchcount(coeff11); %NumParams=4 format long [AIC,BIC] = aicbic(LLF11,NumParams,NumObs); [AIC,BIC] ----------------------------------------------------------------- Matlab 中的帮助文档 aic - Akaike Information Criterion for estimated model Syntax am = aic(model) am = aic(model1,model2,...) Arguments
model Name of an idarx, idgrey, idpoly, idproc, idss, idnlarx, idnlhw, or idnlgrey model object. Description am = aic(model) returns a scalar value of the Akaike's Information Criterion (AIC) for the estimated model. am = aic(model1,model2,...) returns a row vector containing AIC values for the estimated models model1,model2,.... Remarks Akaike's Information Criterion (AIC) provides a measure of model quality by simulating the situation where the model is tested on a different data set. After computing several different models, you can compare them using this criterion. According to Akaike's theory, the most accurate model has the smallest AIC. Note If you use the same data set for both model estimation and validation, the fit always improves as you increase the model order and, therefore, the flexibility of the model structure. Akaike's Information Criterion (AIC) is defined by the following equation: where V is the loss function, d is the number of estimated parameters, and N is the number of values in the estimation data set. The loss function V is defined by the following equation: where represents the estimated parameters. For d<
If the disturbance source is Gaussian with the covariance matrix function is , the logarithm of the likelihood Maximizing this analytically with respect to gives , and then maximizing the result with respect to , where p is the number of outputs. References Ljung, L. System Identification: Theory for the User, Upper Saddle River, NJ, Prentice-Hal PTR, 1999. See sections about the statistical framework for parameter estimation and maximum likelihood method and comparing model structures. See Also EstimationInfo fpe
分享到:
收藏