楼主: 乱舞&汗寶
8582 3

[问答] SAS 作ADF单位根检验如何根据AIC准则确定最优滞后阶数 [推广有奖]

  • 0关注
  • 0粉丝

初中生

38%

还不是VIP/贵宾

-

威望
0
论坛币
9 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
283 点
帖子
7
精华
0
在线时间
7 小时
注册时间
2013-4-4
最后登录
2014-5-11

楼主
乱舞&汗寶 发表于 2014-4-24 10:54:50 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
SAS作ADF 单位根检验时需要根据AIC准则确定最优滞后阶数,可是网上看到的程序是这样的:
proc arima data=Work.Cybindex;
   identify var=cybindex(1)  stationarity=(adf=1);
run;

这样,滞后阶数被人为定为1了,该如何操作?

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:单位根检验 滞后阶数 滞后阶 AIC ADF 如何

沙发
bakoll 发表于 2015-1-18 21:58:03
sas编写单位根检验程序
先对原时间序列数据进行处理,然后利用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;

eviews进行单位根检验较多,通过AIC SC准则判定

藤椅
无情兽 发表于 2018-9-11 11:24:49
thank you for sharing

板凳
取名让人难过 发表于 2019-3-23 16:47:51
改一下这里:stationarity=(adf=1);
比如改为stationarity=(adf=0 1 2);就有0到2滞后阶数对应的结果啦


您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-24 12:05