function [h,pValue,stat,cValue,reg] = adftest(y,varargin)
%ADFTEST Augmented Dickey-Fuller test for a unit root
%
% Syntax:
%
% [h,pValue,stat,cValue,reg] = adftest(y)
% [h,pValue,stat,cValue,reg] = adftest(y,param1,val1,param2,val2,...)
%
% Description:
%
% Dickey-Fuller tests assess the null hypothesis of a unit root in a
% univariate time series y. All tests use the model
%
% y(t) = c + d*t + a*y(t-1) + b1*(1-L)y(t-1)
% + b2*(1-L)y(t-2)
% + ...
% + bp*(1-L)y(t-p)
% + e(t),
%
% where L is the lag operator Ly(t) = y(t-1). The null hypothesis
% restricts a = 1. Variants of the test, appropriate for series with
% different growth characteristics, restrict the drift and deterministic
% trend coefficients, c and d, respectively, to be 0. Lagged differences
% bk*(1-L)y(t-k), k = 1, ..., p, "augment" the test to account for serial
% correlations in the innovations process e(t).
%
% Input Arguments:
%
% y - Vector of time-series data. The last element is the most recent
% observation. NaNs indicating missing values are removed.
%
% Optional Input Parameter Name/Value Pairs:
%
% NAME VALUE
%
% 'lags' Scalar or vector of nonnegative integers indicating the
% number p of lagged changes of y to include in the model.
% The default value is 0.
%
% 'model' String or cell vector of strings indicating the model
% variant. Values are 'AR' (autoregressive), 'ARD'
% (autoregressive with drift), or 'TS' (trend stationary).
% The default value is 'AR'.
%
% o When the value is 'AR', the null model
%
% y(t) = y(t-1) + b1*(1-L)y(t-1)
% + b2*(1-L)y(t-2)
% + ...
% + bp*(1-L)y(t-p)
% + e(t)
%
% is tested against the alternative model
%
% y(t) = a*y(t-1) + b1*(1-L)y(t-1)
% + b2*(1-L)y(t-2)
% + ...
% + bp*(1-L)y(t-p)
% + e(t)
%
% with AR(1) coefficient a < 1.
%
% o When the value is 'ARD', the null model
%
% y(t) = y(t-1) + b1*(1-L)y(t-1)
% + b2*(1-L)y(t-2)
% + ...
% + bp*(1-L)y(t-p)
% + e(t)
%
% is tested against the alternative model
%
% y(t) = c + a*y(t-1) + b1*(1-L)y(t-1)
% + b2*(1-L)y(t-2)
% + ...
% + bp*(1-L)y(t-p)
% + e(t)
%
% with drift coefficient c and AR(1) coefficient a < 1.
%
% o When the value is 'TS', the null model
%
% y(t) = c + y(t-1) + b1*(1-L)y(t-1)
% + b2*(1-L)y(t-2)
% + ...
% + bp*(1-L)y(t-p)
% + e(t)
%
% is tested against the alternative model
%
% y(t) = c + d*t + a*y(t-1) + b1*(1-L)y(t-1)
% + b2*(1-L)y(t-2)
% + ...
% + bp*(1-L)y(t-p)
% + e(t)
%
% with drift coefficient c, deterministic trend coefficient
% d, and AR(1) coefficient a < 1.
%
% 'test' String or cell vector of strings indicating the type of
% test statistic. Values are 't1', 't2', or 'F'. The default
% value is 't1'.
%
% o When the value is 't1', a standard t statistic
%
% t1 = (a-l)/se
%
% is computed from OLS estimates of the AR(1) coefficient a
% and its standard error se in the alternative model. The
% test assesses the significance of the restriction a = 1.
%
% o When the value is 't2', a lag-adjusted, "unstudentized" t
% statistic
%
% t2 = T*(a-1)/(1-b1-...-bp)
%
% is computed from OLS estimates of the AR(1) coefficient a
% and the stationary coefficients b1, ..., bp in the
% alternative model. T is the effective sample size,
% adjusted for lags and missing values. The test assesses
% the significance of the restriction a = 1.
%
% o When the value is 'F', an F statistic is computed to
% assess the significance of a joint restriction on the
% alternative model. If the value of 'model' is 'ARD', the
% restriction is a = 1 and c = 0. If the value of 'model'
% is 'TS', the restriction is a = 1 and d = 0. An F test is
% invalid when the value of 'model' is 'AR'.
%
% 'alpha' Scalar or vector of nominal significance levels for the
% tests. Values must be between 0.001 and 0.999. The default
% value is 0.05.
%
% Scalar or single string parameter values are expanded to the length of
% any vector value (the number of tests). Vector values must have equal
% length. If any value is a row vector, all outputs are row vectors.
%
% Output Arguments:
%
% h - Vector of Boolean decisions for the tests, with length equal to the
% number of tests. Values of h equal to 1 indicate rejection of the
% unit-root null in favor of the alternative model. Values of h equal
% to 0 indicate a failure to reject the unit-root null.
%
% pValue - Vector of p-values of the test statistics, with length equal
% to the number of tests. When the value of 'test' is 't1' or 't2',
% p-values are left-tail probabilities. When the value of 'test' is
% 'F', p-values are right-tail probabilities.
%
% stat - Vector of test statistics, with length equal to the number of
% tests. Statistics are computed using OLS estimates of the
% coefficients in the alternative model.
%
% cValue - Vector of critical values for the tests, with length equal to
% the number of tests. When the value of 'test' is 't1' or 't2',
% critical values are for left-tail probabilities. When the value of
% 'test' is 'F', critical values are for right-tail probabilities.
%
% reg - Structure of regression statistics from the OLS estimation of
% coefficients in the alternative model. The number of records is
% equal to the number of tests. Each record has the following fields:
%
% num Length of the input series y, with NaNs removed
% size Effective sample size, adjusted for lags, difference*
% names Regression coefficient names
% coeff Estimated coefficient values
% se Estimated coefficient standard errors
% Cov Estimated coefficient covariance matrix
% tStats t statistics of coefficients and p-values
% FStat F statistic and p-value
% yMu Mean of y, adjusted for lags, difference*
% ySigma Standard deviation of y, adjusted for lags, difference*
% yHat Fitted values of y, adjusted for lags, difference*
% res Regression residuals
% DWStat Durbin-Watson statistic
% SSR Regression sum of squares
% SSE Error sum of squares
% SST Total sum of squares
% MSE Mean squared error
%
没有合适的资源?快使用搜索试试~ 我知道了~
基于bootstrap的格兰杰检验
共14个文件
m:8个
asv:3个
mat:3个
需积分: 9 14 下载量 201 浏览量
2015-09-15
11:46:37
上传
评论 1
收藏 6.18MB ZIP 举报
温馨提示
Bootstrap方法是完全依赖样本的重复抽样检验的蒙特卡洛模拟非参数方法,因此无需预先对面板单位根和协整进行检验
资源推荐
资源详情
资源评论
收起资源包目录
bootstrap.zip (14个子文件)
bootstrap
bootsurwald.m 1KB
chis_cdf.m 912B
bootstrapM2.asv 2KB
bootrsp.m 2KB
bootsurwald.asv 1KB
bootstrapWald.m 2KB
bootstrapE.m 182B
cgx2012.mat 3.07MB
adftest.m 99KB
bootstrapWald.asv 2KB
cxg2012.mat 3.08MB
a.mat 681B
bootstrapM2.m 2KB
bootstrapM.m 2KB
共 14 条
- 1
资源评论
木瓜牛奶
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功