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]

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

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

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • rinetd双网卡端口转发(java请求转发)

    目前云数据库Redis版需要通过ECS进行内网连接访问。如果您本地需要通过公网访问云数据库Redis,可以在ECSLinux云服务器中安装rinetd进行转发实现。在云服务器ECSLinux中安装rinetd。wgethttp://www.boutell.com/rinetd/http/rinetd.tar.gz&&tar-…

    2022年4月17日
    86
  • java callable接口和runnable(show indicate区别)

    点击Runnable与Callable的详细区别和对比

    2022年4月17日
    48
  • 解决WinHTTP Web Proxy Auto-Discovery Service无法启动问题

    解决WinHTTP Web Proxy Auto-Discovery Service无法启动问题需要启动该服务的起因是需要抓包,所以下载了charles,但无任何抓包信息,也没有错误提示,未查到原因。遂又下载了fiddler,此时启动会提示“FailedtoregisterFiddlersasthesystemproxy”,上网查原因是WinHTTPWebProxyAuto-DiscoveryService该服务没有启动,到服务中查询确实如此。解决方案(此为对我生效的解决方案,关联服务未启动等其他问题导致也是有可能的):win+Rregedit打开注册表,找到\HK

    2022年6月21日
    910
  • httprunner(4)录制生成测试用例[通俗易懂]

    httprunner(4)录制生成测试用例[通俗易懂]前言写用例之前,我们应该熟悉API的详细信息。建议使用抓包工具Charles或AnyProxy进行抓包。har2case我们先来了解一下另一个项目har2case他的工作原理就是将当前主流的抓

    2022年7月29日
    16
  • pycharm配置运行环境_服务器运行失败怎么办

    pycharm配置运行环境_服务器运行失败怎么办今天讲一下,如何使用pycharm关联服务器代码,以及使用本地文件启动,服务器环境。1、设置连接填写服务器信息,ip地址,端口号,登录用户,密码,选择好服务器项目的路径。配置服务器同步运行环境输入密码设置路径,选择python路径,和你同步路径设置好以后,完成。然后启动,本地项目设置。设置好以后,启动本地项目。然后使用服务器地址,访问8000端口。在浏览器,使服务器的ip+8000端口,访问。即可。且,在本地修改代码,会时时同步

    2022年8月26日
    4
  • DNS工作原理

    DNS工作原理

    2021年11月12日
    55

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

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