BookmarkSubscribeRSS Feed
Phil_NZ
Barite | Level 11

Hi SAS Users,

 

I am converting from regressing in STATA to SAS, and I am quite surprise regarding the wide variety of SAS  procedure.

 

In STATA, we just use

reg y x

then we add "fixed effect" or "cluster" at the end of such code to do further research.

 

However, in SAS, in the standard OLS regression, we use PROC REG, if we want to add fixed effects, we must use PROC GLM, and if we want to do clustered standard errors, we must do PROC GENMOD. I am wondering if my explanation about the series of SAS PROC is properly. And whether PROC GLM already has contained fixed effect?

 

I follow the link here to make this assumption:

https://host.kelley.iu.edu/nstoffma/fe.html

Please correct me if I fall into any fallacy.

Many thanks and warm regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
4 REPLIES 4
STAT_Kathleen
SAS Employee

The question of how to model one-way and two-way fixed effects with clustered standard errors in SAS has become common in recent years. Before proceeding with the analysis, some preliminary questions need to be addressed:

  • Are the clusters randomly selected, as in a complex survey design?
  • Do you have cluster-correlated observational data or experimental data?
  • Do you have panel data, which assumes correlated cross-sections?

For survey data, you can use the SURVEYREG or SURVEYLOGISTIC procedures in SAS/STAT® software. If you do not have survey data, the GENMOD, GLIMMIX, MIXED procedures in SAS/STAT or the PANEL procedure in SAS/ETS® software would be the better choices to use for fixed effects with clustered standard errors.

MichaelL_SAS
SAS Employee

I believe @STAT_Kathleen has answered your immediate question. 

 

I'll just add that if you are looking to familiarize yourself with some of the capabilities in SAS/STAT software, the SAS/STAT Topics page might be useful. The links on the page describe focus areas and each link provides a high-level overview of relevant procedures, their features, and links for more information. There will be cases where a procedure might serve multiple purposes and could be placed in multiple groupings, but I think the page can be a helpful quick reference. 

Phil_NZ
Barite | Level 11

Hi @MichaelL_SAS and @STAT_Kathleen 

Thank you for your replying and about the link, but I am quite new to SAS regression so I want to ask further.

So, from the link you gave me, could you please tell me how come I search for the information and examples for regression with fixed effects (PROC GLM)?

 

Warmest regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 505 views
  • 2 likes
  • 4 in conversation