I am running OLS regressions using proc reg and have created dummy variables for years in order to implement a year fixed effect in my model. I do NOT want to use proc glm to run my fixed effects regressions because proc glm requires suppressing the intercept. Since some of my fixed effects involve variables that range in the upper hundreds, I would like to keep using proc reg, and report the parameter estimates of the independent variables, but suppress those variables used as fixed effects in the print out of the results.
For example, if my model looked like the following:
ods select NObs ANOVA FitStatistics ParameterEstimates;
proc reg
data = testdata; model dv = IV1 IV2 IV3 IV4 y2000--y2020;
run; quit;
The parameter estimates will include all of y2000--y2020, but I would rather suppress them.
Is this possible?
because proc glm requires suppressing the intercept
No it doesn't require you to do that — you have an option to suppress the intercept, or not. And regardless of whether or not you suppress the intercept, the model does not change. Same model, either way. And same model from GLM or REG, no difference. Just different parameterization of the coefficients.
You can suppress the parameter estimates only if you create an output data set of the estimates, and then remove the rows from the data set, and then print the data set. The standard HTML output does not give you the option to exclude some model terms.
@ericdrosano wrote:
Thank you for your feeback. 🙂
Another reason I avoid GLM is because it causes problems with some of the IVs that I'm using as fixed effects. Maybe it's because I'm not running GLM correctly, or with the right options, but I'll get '0.000000000' and 'B' for my main variables of interest depending upon certain FE variables.
I was trying to avoid what you're saying, in terms of creating additional data sets, but it's possible that may be the best solution.
You say it causes problems, but apparently you misinterpret the zeros. These are not problems, but you have to learn to interpret the zeros properly. And again, the model is the same between REG and GLM, no difference in predicted values, no difference in R-squared.
Here is an explanation of why GLM produces zeros for some levels of the class variables. https://communities.sas.com/t5/Statistical-Procedures/Interpreting-Multivariate-Linear-Regression-wi...
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.