BookmarkSubscribeRSS Feed
bwar88
Calcite | Level 5

I need to run a distributed lag regression with a lagged dependent variable of the form:

 

St = µ + βAt + λSt−1 + v

 

where v = et - λet-1

 

According to the literature this needs to be computed using MLE rather than OLS. Proc reg obviously uses OLS, so what PROC do I need to run?

6 REPLIES 6
Ksharp
Super User

Use PROC GENMOD :

 

 

proc genmod data=sashelp.class;
model weight=age height/dist=normal link=identity noscale;
run;
stat_sas
Ammonite | Level 13

Hi,

 

This is a time series data. One key assumption in OLS is that the errors are independent of each other. In your model residuals seem to be correlated which is not desirable to use OLS for time series data since the assumptions on which the classical linear regression model is based will be violated. Try looking into SAS procedures for time series analysis. This requires SAS ETS.

Ksharp
Super User

It is ARIMA Model. Check ARIMA Procedure .

bwar88
Calcite | Level 5

It needs to be a regression model as I need to see the coefficients rather than just forecast the future. So is PROC GENMOD what I need?

SteveDenham
Jade | Level 19

You can get "regression" coefficients from time series analysis--what @stat_sas says about the errors is absolutely correct.  You could use @Ksharp's suggestion of PROC ARIMA, or look at PROC MODEL.  If you do not have access to SAS/ETS, then fitting this sort of model is going to require a fair amount of macro code, as you will have to iteratively refit the data using one of the procedures that allow you to specify a time-dependent error structure--going back and forth between the original data and the lagged data.

 

Steve Denham

Ksharp
Super User
If you need constrain the coefficients sum to 1, I think you need PROC GENMOD + offset= option. PROC ARIMA can't do that.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2507 views
  • 2 likes
  • 4 in conversation