单位根检验
SAS支持的单位根检验方法包括DF、ADF、PP、KPSS和RW(检验带漂移项的随机游走)。ADF在应用中最为常见,其SAS程序可如下编写:
proc arima data=one;
identify var=y1 stationarity=(adf=(3));
run;
adf=(3)表示滞后阶为3,这可以根据系数显著性的t检验来确定。
SAS给出的结果非常多,因此,如果只想保留ADF检验的内容,则可以对输出结果进行控制。参考程序如下:
ods listing select ;
'identification 1'.'Augmented Dickey-Fuller Unit Root Tests';
proc arima data=one;
identify var=y1 stationarity=(adf=(3));
run;
quit;
格兰杰因果检验
CAUSAL GROUP1=(
variables) GROUP2=(
variables) ;
A
CAUSAL statement prints the Granger
causality test by fitting the VAR([img=8,10][/img]) model by using all variables defined in GROUP1 and GROUP2. Any number of
CAUSAL statements can be specified. The
CAUSAL statement proceeds with the MODEL statement and uses the variables and the autoregressive order, [img=8,10][/img], specified in the MODEL statement. Variables in the GROUP1= and GROUP2= options should be defined in the MODEL statement. If the P=0 option is specified in the MODEL statement, the
CAUSAL statement is not applicable.
The null hypothesis of the Granger
causality test is that GROUP1 is influenced only by itself, and not by GROUP2. If the hypothesis test fails to reject the null, then the variables listed in GROUP1 might be considered as independent variables.
See the section
VAR and VARX Modeling for details.
The following is an example of the
CAUSAL statement. You specify the
CAUSAL statement with the GROUP1= and GROUP2= options.
proc varmax data=one; model y1-y3 = x1 / p=1;
causal group1=(x1) group2=(y1-y3);
causal group1=(y2) group2=(y1 y3);
run;