Hello,
I want to run a simple OLS regression and include fixed effects eg. for country or firm fixed effects.
Is there a way to do this automatically?
Thank you in advance,
@MarinaMag wrote:
Hello,
I want to run a simple OLS regression and include fixed effects eg. for country or firm fixed effects.
Is there a way to do this automatically?
Thank you in advance,
If you need to include "country" or "firm" in the model, these are categorical variables and PROC REG does not directly handle categorical variables. You could use PROC GLM which will do regression and does allow you to include categorical variables (by using the CLASS statement).
proc reg .......
model y=x..... /include= ;
quit;
Thank you for your response.
I tried to use it for country fixed effects and I took this message:
"ERROR 22-322: Expecting an integer constant."
@MarinaMag wrote:
Hello,
I want to run a simple OLS regression and include fixed effects eg. for country or firm fixed effects.
Is there a way to do this automatically?
Thank you in advance,
If you need to include "country" or "firm" in the model, these are categorical variables and PROC REG does not directly handle categorical variables. You could use PROC GLM which will do regression and does allow you to include categorical variables (by using the CLASS statement).
Thank you, it works!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.