怎么用SAS编写ADF单位根检验,
来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/07/18 04:44:50
怎么用SAS编写ADF单位根检验,
先对原时间序列数据进行处理,然后利用reg过程求出回归参数t检验对应的t值,然后与ADF检验的临界值(-2.902358,在显著性水平为0.05的情况下)进行比较.示例程序如下:
data simulation;
do i=1 to 100;
x=rannor(1234);
output;
end;
run;
data timeseries;
set simulation;
x_1st_lag= lag1(x);
x_1st_diff= dif1(x);
x_1st_diff_1st_lag= dif1(lag1(x));
x_1st_diff_2nd_lag= dif1(lag2(x));
x_1st_diff_3rd_lag= dif1(lag3(x));
x_1st_diff_4th_lag= dif1(lag4(x));
x_1st_diff_5th_lag= dif1(lag5(x));
run;
ods output parameterestimates=est(where=(variable="x_1st_lag") keep=variable tvalue);
ods select none;
proc reg data=timeseries;
model x_1st_diff= x_1st_lag
x_1st_diff_1st_lag
x_1st_diff_2nd_lag
x_1st_diff_3rd_lag
x_1st_diff_4th_lag
x_1st_diff_5th_lag;
run;
quit;
ods select all;
ods output close;
data _null_;
file print;
if _n_=1 then do;
put @20"Augmented Dickey-Fuller(ADF) Test for Stationary at level 5%";
put @20"5% level Critical Values = -2.902358 ,level with 5 lags";
end;
set est;
if tvalue gt -2.902358 then
put / @20 "The x series is a non-stationary process when tested at level 5%";
else
put / @20 "The x series is a stationary process when tested at level 5%";
run;
data simulation;
do i=1 to 100;
x=rannor(1234);
output;
end;
run;
data timeseries;
set simulation;
x_1st_lag= lag1(x);
x_1st_diff= dif1(x);
x_1st_diff_1st_lag= dif1(lag1(x));
x_1st_diff_2nd_lag= dif1(lag2(x));
x_1st_diff_3rd_lag= dif1(lag3(x));
x_1st_diff_4th_lag= dif1(lag4(x));
x_1st_diff_5th_lag= dif1(lag5(x));
run;
ods output parameterestimates=est(where=(variable="x_1st_lag") keep=variable tvalue);
ods select none;
proc reg data=timeseries;
model x_1st_diff= x_1st_lag
x_1st_diff_1st_lag
x_1st_diff_2nd_lag
x_1st_diff_3rd_lag
x_1st_diff_4th_lag
x_1st_diff_5th_lag;
run;
quit;
ods select all;
ods output close;
data _null_;
file print;
if _n_=1 then do;
put @20"Augmented Dickey-Fuller(ADF) Test for Stationary at level 5%";
put @20"5% level Critical Values = -2.902358 ,level with 5 lags";
end;
set est;
if tvalue gt -2.902358 then
put / @20 "The x series is a non-stationary process when tested at level 5%";
else
put / @20 "The x series is a stationary process when tested at level 5%";
run;
怎么用SAS编写ADF单位根检验,
什么是ADF单位根检验
怎么看ADF单位根检验的结果?
ADF检验怎么做用eviews
eviews 单位根检验,得出这个结果,ADF值大于零,又大于临界值,是不是就存在单位根,要做差分,用EVIEWS怎么做
Eviews6怎么进行ADF检验
用Eviews做ADF单位根检验时原始数据不平稳,一阶差分平稳,但滞后期改变了,可以做协整检验吗?
怎么用EVIEWS做单位根检验
ADF检验在eviews中怎么操作?
eviews 的ADF检验 临界值是多少啊?一般概率要小于多少才不存在单位根啊?
用Eviews做ADF检验和协整检验
eviews中做ADF检验统计值为正数:2.99,而5%显著水平值为负数:-1.97,请问是否通过单位根检验?