Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
grtlzy163
Calcite | Level 5

Hi all,

 

I was trying to do a feasible generalized least square (FGLS) in SAS 9.2 to adjust for heteroscedasticity. The form of the variance is unknown. I am just trying to use the residuals to estimate the variance and then do an iterative reweighting (I think this is what FGLS is).

 

I googled it and found the SAS documentation here. But the documentation didn't explain very clearly how to implement FGLS in proc model. It only says using H.var. I tried the following code,

 

proc model data=temp ;
y=b0+b1*x1+b2*x2;
h.y=resid.y**2;
fit y /itprint ;
run;

 

 

 

but SAS says:

 

WARNING: Can only do FIML or GMM estimation when parameters are shared by the mean model and the variance model. The estimation requested will ignore the variance model.

 

So I assume the code is not doing FGLS. Can anyone provide an example code that will do a FGLS? I am OK with either proc model or any other procedures that will do the job.

 

Thank you all so much.

2 REPLIES 2
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

You might be better putting this post in the Forecasting and Econometrics community since PROC MODEL is part of SAS/ETS. I am not too familiar with PROC MODEL for this application, but your syntax does not agree with the examples in the documentation you cite. Because your resid.y variable involves the b0, b1, b2 parameters, by definition (since y^ can only be determined if one has the parameters), your variance function shares parameters with the model for y. The documentation says that you can't do that for FGLS.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 2 replies
  • 2347 views
  • 1 like
  • 2 in conversation