Programming the statistical procedures from SAS

Regression using maximum likelihood estimation

Reply
New Contributor
Posts: 2

Regression using maximum likelihood estimation

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?

Super User
Posts: 9,766

Re: Regression using maximum likelihood estimation

Use PROC GENMOD :

 

 

proc genmod data=sashelp.class;
model weight=age height/dist=normal link=identity noscale;
run;
Trusted Advisor
Posts: 1,218

Re: Regression using maximum likelihood estimation

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.

Super User
Posts: 9,766

Re: Regression using maximum likelihood estimation

It is ARIMA Model. Check ARIMA Procedure .

New Contributor
Posts: 2

Re: Regression using maximum likelihood estimation

[ Edited ]

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?

Respected Advisor
Posts: 2,655

Re: Regression using maximum likelihood estimation

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

Super User
Posts: 9,766

Re: Regression using maximum likelihood estimation

If you need constrain the coefficients sum to 1, I think you need PROC GENMOD + offset= option. PROC ARIMA can't do that.
Ask a Question
Discussion stats
  • 6 replies
  • 291 views
  • 2 likes
  • 4 in conversation