Hi guys,
Can you please help me in running my regression equation with industry and year fixed effects. I tried looking at the other posts, but could not gather much about the same. I have two independent variables and want to append industry and year fixed effects in the regression model:
Dependent variable: Y
Independent variables: X1 and X2
Fixed Effects: Industry and Year fixed effects
Regards
Aman
I assume that X1 and X2 are also fixed effects, but Industry and Year are categorical variables? If so, try using PROC GLM like this
proc glm data=Have;
class Industry Year;
model Y = X1 X2 Industry Year / solution;
run;
quit;
If you want to discuss details, we can use one of the data sets that SAS distributes:
proc glm data=Sashelp.Cars(where=(Type^='Hybrid'));
class Origin Type;
model MPG_City = Horsepower EngineSize Origin Type / solution;
run;
Please post the exact code you submitted and also the SAS log. My guess is that you have a syntax error.
That code will work if your data set is named HAVE and it contains variables named Y, X1, X2, Industry, and Year. (And Industry and Year have a relatively small number of levels.) Unless you are excluding the ODS output, the procedure will display tables.
If your data set or variables have a different name, there will be an error message in the SAS log, so please post the entire SAS log, as requested previously, so that we can see the exact code you submitted and the SAS notes, warnings, and errors.
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 25. 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.