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)
上一篇 2022年5月10日 下午12:20
下一篇 2022年5月10日 下午12:20


相关推荐

  • SPI通讯协议介绍「建议收藏」

    SPI通讯协议介绍「建议收藏」来到SPI通讯协议了。废话两句,“SPI很重要”,这是我在学校时候听那些单片机开发工程师说的。出来实习,到后来工作,确实如此,SPI的使用很常见,那么自然重要咯。  SPI(Serialperipheralinterface)即串行外围设备接口,是由Motorola首先在其MC68HCxx系列单片机上定义的,基于高速全双工总线的通讯协议。(又是高速,而且全双工,确实强大)被广泛应用于ADC、LC

    2022年10月15日
    7
  • Android获取屏幕分辨率及DisplayMetrics简介[通俗易懂]

    Android 可设置为随着窗口大小调整缩放比例,但即便如此,手机程序设计人员还是必须知道手机屏幕的边界,以避免缩放造成的布局变形问题。手机的分辨率信息是手机的一项重要信息,很好的是,Android 已经提供DisplayMetircs 类可以很方便的获取分辨率。下面简要介绍 DisplayMetics 类:Andorid.util 包下的DisplayMetrics 类

    2022年3月9日
    56
  • UVM概述及uvm_component和uvm_object(一)

    UVM概述及uvm_component和uvm_object(一)UVM UniversalVer 通用验证方法学 UVM 是建立在 systemverilo 平台上的一个库 提供了一系列的接口 让我们能够更方便的进行验证 验证平台组成 Driver 用来把不同的激励施加给 DUT Monitor 用来检测 DUT 的输出 Scoreboard 专门用来比较期望值与 monitor 检测到的 DUT 输出 Refer

    2025年7月14日
    6
  • mac 安装ll命令[通俗易懂]

    mac 安装ll命令[通俗易懂]mac安装ll命令mac-bash:ll:commandnotfound在linux系统下我们经常使用ll、la命令。但在mac系统时缺没有。提示:-bash:ll:commandnotfound。这是因为ll、la不是真的命令,而是一些常用命令和参数搭配的别名。所以我们在MacOS下配置下就好了。1、跳到个人目录下面localhost:~huangfy20$cdlocalhost:~huangfy20$pwd/Users/huangfy202、打开.bash

    2025年12月1日
    7
  • idea2019.3激活码永久_通用破解码

    idea2019.3激活码永久_通用破解码,https://javaforall.net/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

    2022年3月17日
    2.4K
  • Windsurf如何设置中文界面及启用中文回复功能?

    Windsurf如何设置中文界面及启用中文回复功能?

    2026年3月14日
    7

发表回复

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

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