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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 八年phper的高级工程师面试之路八年phper的高级工程师面试之路

    八年phper的高级工程师面试之路八年phper的高级工程师面试之路

    2022年2月15日
  • 带你了解软件系统架构的演变

    带你了解软件系统架构的演变一个成熟的系统,并不是一开始就做到方方面面都完美,也不会去考虑什么高并发,高可用问题,但随着时间的推移,现有架构的问题就会慢慢的显现。比如用户激增,访问量不断增大,在这过程中,会不断的出现新的问题,而为了解决这些问题,软件技术架构都会发生重大变化,而针对不同业务特征的系统会有各自的侧重点,像淘宝这类网站要解决的事海量商品搜索下单支付等问题。像腾讯要解决数亿级别用户的实施消息传输等。每种业务都有自己不同的系统架构。以JavaWeb为例搭建简单的电商系统这个电商系统有多个业务模块,假设现在有:.

    2022年6月17日
  • Java中的八种基本数据类型「建议收藏」

    Java中的八种基本数据类型「建议收藏」Java中主要有八种基本数据类型:byte、short、int、long、float、double、boolean、char。各种数据类型作用:1、byte:8位、有符号的以二进制补码表示的整数。min:-128(-2^7)。max:127(2^7-1)。default:0。对应包装类:Byte。2、short:16位…

    2022年7月7日
  • 进程和线程的深入理解

    进程和线程的深入理解进程和线程的深入理解,从抽象类比到与原理,阐述了两者的区别

    2022年7月25日
  • 标志位「建议收藏」

    标志位「建议收藏」例二:例子

    2022年6月30日
  • JAVA中的数组插入与删除指定元素

    JAVA中的数组插入与删除指定元素今天学了Java的数组,写了数组的插入和删除,本人小白,写给不会的小白看,大神请忽略,有错请大家指出来;/**给数组指定位置数组的插入*/importjava.util.*;publicclassArrayInsert{publicstaticvoidmain(String[]args){System.out.println(“请用键

    2022年6月26日

发表回复

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

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