楼主: gengliyan
16947 9

AIC信息准则的编程 [推广有奖]

  • 0关注
  • 1粉丝

高级会员

tamila

博士生

29%

还不是VIP/贵宾

-

威望
0
论坛币
1973 个
通用积分
0
学术水平
1 点
热心指数
0 点
信用等级
0 点
经验
23123 点
帖子
139
精华
0
在线时间
345 小时
注册时间
2006-4-19
最后登录
2023-5-23

楼主
gengliyan 发表于 2006-12-1 12:10:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

哪里可以找到AIC信息准则的源程序,最好是用MATLAB 或别的统计软件编的。我想看看AIC信息准则的原理。

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:AIC MATLAB matla atlab 统计软件 AIC 准则

本帖被以下文库推荐

沙发
yiyo900 发表于 2006-12-1 18:08:00

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]

已有 1 人评分学术水平 热心指数 信用等级 收起 理由
日新少年 + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

藤椅
hkswen 发表于 2006-12-1 21:02:00

在rats里很简单:

compute aic = T*log(rss) + 2*n

compute aic = %nobs*log(%rss)+2*%nreg

板凳
陈彦达 发表于 2006-12-2 08:04:00
这不弄麻烦了吗,要想看原理,看看公式来源就可以了

报纸
蓝色 发表于 2006-12-2 08:50:00
只要知道公式就简单了,都可以手动计算,这样能够更好理解aic等等

地板
xiangyu71 发表于 2006-12-4 14:03:00
thanks

7
momoqingqing 发表于 2010-7-10 15:08:10
谢谢LS的童鞋们

8
jzbd 发表于 2010-7-18 02:54:22
高手。厉害。

9
tclinny 发表于 2012-3-11 22:41:13
c=(n/2)*(1+log(2*pi))
aic=c+(n/2)*log(rss/n)+k
bic=c+(n/2)*log(rss/n)+(log(n)/2)*k

10
涅槃尼释 在职认证  发表于 2014-6-4 23:45:46
大神!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-8 15:42