wald检验matlab,Conduct Wald Test

Compute Unrestricted MLE

Obtain the unrestricted MLEs by fitting an AR(2) model (with a Gaussian innovation distribution) to the given data. Assume you have presample observations (y-1,y0) = (9.6249,9.6396)

Y = [10.1591; 10.1675; 10.1957; 10.6558; 10.2243; 10.4429;

10.5965; 10.3848; 10.3972; 9.9478; 9.6402; 9.7761;

10.0357; 10.8202; 10.3668; 10.3980; 10.2892; 9.6310;

9.6318; 9.1378; 9.6318; 9.1378];

Y0 = [9.6249; 9.6396];

Mdl = arima(2,0,0);

[EstMdl,V] = estimate(Mdl,Y,'Y0',Y0);

ARIMA(2,0,0) Model (Gaussian Distribution):

Value StandardError TStatistic PValue

_______ _____________ __________ _________

Constant 2.8802 2.5239 1.1412 0.25379

AR{1} 0.60623 0.40372 1.5016 0.1332

AR{2} 0.10631 0.29283 0.36303 0.71658

Variance 0.12386 0.042598 2.9076 0.0036425

When conducting a Wald test, only the unrestricted model needs to be fit. estimate returns the estimated variance-covariance matrix as an optional output.

Compute Jacobian Matrix

Define the restriction function, and calculate its Jacobian matrix.

For comparing an AR(1) model to an AR(2) model, the restriction function is

r(c,ϕ1,ϕ2,σε2)=ϕ2-0=0.

The Jacobian of the restriction function is

[∂r∂c∂r∂ϕ1∂r∂ϕ2∂r∂σε2]=[0010]

Evaluate the restriction function and Jacobian at the unrestricted MLEs.

r = EstMdl.AR{2};

R = [0 0 1 0];

Conduct Wald Test

Conduct a Wald test to compare the restricted AR(1) model against the unrestricted AR(2) model.

[h,p,Wstat,crit] = waldtest(r,R,V)

h = logical

0

p = 0.7166

Wstat = 0.1318

crit = 3.8415

The restricted AR(1) model is not rejected in favor of the AR(2) model (h = 0).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值