前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >matlab aic怎么用,AIC信息准则的编程

matlab aic怎么用,AIC信息准则的编程

作者头像
全栈程序员站长
发布2022-08-25 13:14:36
1.4K0
发布2022-08-25 13:14:36
举报
文章被收录于专栏:全栈程序员必看

大家好,又见面了,我是你们的朋友全栈君。

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]

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/142434.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022年5月1,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档