PROC AUTOREG

noetsi

Fortran must die
#1
This is really a time series regression question. But I do all such analysis in SAS so I put it here.

There are two primary issues in time series I deal with. One is autocorrelation (which influences on the standard error) and the other is assuming that lags of Y or an X influence Y (this would lead to bias not just problems with the SE I think).

One way to address first order autocorrelation (the most common type in social science analysis) is to specify an autoregressive model of order 1 to the residuals, this is then used in the estimation process.

In sas this is:

PROC AUTOREG DATA=somefilename PLOTS =(ALL);
MODEL Y X1 X2 X3/ NLAG=1 METHOD=ML;
RUN;

where Y is the dependent variable and X1 through X3 are various predictor variables.

Say that you think that Xt influences Yt+1 (Y at a later data than t). Would the code above address the issues or do you actually have to add a new variable to the model that is X a period before Y (I think that the above code is already doing this, but obviously this is unclear to me).
 

noetsi

Fortran must die
#2
Actually reading forward in a book they suggest (I think) that you have to actually specify an Xt as a predictor when you think Xt influences Yt+1. Specifying a lag as I did above will not deal with this.
 

noetsi

Fortran must die
#3
While I am asking questions, does anyone know how specify the number of lags the Godfrey test uses to detect autocorrelation.