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

matlab aic怎么用,AIC信息准则的编程1.AIC只需两个inputs(LLF,numParams)2.BIC需要三个inputs(LLF,numParams,numObs)3.aicbic.m在garchtoolbox工具箱,AIC,BIC都容易计算,重点是求LLF.*******************function[AIC,BIC]=aicbic(LLF,numParams,numObs)%…

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

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]

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • 最新超详细VMware虚拟机下载与安装[通俗易懂]

    最新超详细VMware虚拟机下载与安装[通俗易懂]作者:seriouszyx独立博客记录了日常学习总结代码均可在Github上找到(求Star)VMware下载与安装一、虚拟机的下载1.进入VMware官网,点击左侧导航栏中的下载,再点击图中标记的WorkstationPro,如下图所示。2.根据操作系统选择合适的产品,在这里以Windows系统为例,点击转至下载,如下图所示。3.在1处可以选…

  • Python wxPython基本教程「建议收藏」

    Python wxPython基本教程「建议收藏」PythonwxPython在资源上比较小,而且官方文档也不好找,wxPython在python2.x和python3.x安装上有区别:以下为python3.x安装为例:1.网上下载whl文件安装:路径:https://wxpython.org/Phoenix/snapshot-builds/文件名解释:wxPython_Phoenix-3.0.3.dev2812+b3485d4-c…

  • 数据结构中 ElemType

    数据结构中 ElemType前段时间,我带了大一的上机课,有好多同学问我,数据结构的struct中,ElemType是什么意思。我当时就操了,尼玛这不就是数据类型嘛!智商啊。后来我就慢慢想了,为什么用ElemType然后#defineElemTypeint来定义奥原来是为了好扩展,如果代码出现变化,我们可以修改最少的代码部分,是他符合你的要求。

  • php curl用法_php项目实战

    php curl用法_php项目实战例1,curl扩展开启的步骤:1、将PHP文件夹下的三个文件php_curl.dll,libeay32.dll,ssleay32.dll复制到system32下;2、将php.ini(c:WINDOWS目录下)中的;extension=php_curl.dll中的分号去掉;3、重启apache或者IIS。例2,PHP开启curl_init在测试模拟登录时,出现“Calltoundefined…

  • 西瓜视频地址解析_西瓜去水印免费

    西瓜视频地址解析_西瓜去水印免费json解析工具:https://www.json.cn/base64解析工具:https://www.sojson.com/base64.html1.先获取videoid2.通过videoid

  • idea 2021.3.7激活 3月最新注册码

    idea 2021.3.7激活 3月最新注册码,https://javaforall.cn/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号