I confused between PROC GLM and REG, I read about the difference but still don't have the ability to answer a question like:
Q: A linear model has the following characteristics:
- A dependent variable (y)
- Three continuous predictor variables (x1-x3)
- One categorical predictor variable (c1with 3 levels)
Which SAS program fits this model?
My answer is C, but I the right answer is D. Why?
Because, as you can see from the Syntax page of the PROC REG Documentation, PROC REG does not support a class statement.
Because, as you can see from the Syntax page of the PROC REG Documentation, PROC REG does not support a class statement.
@tam_el wrote:
Thank you, Understood now, I should explicitly create a dummy variable for categorical predictor before applying PROC REG.
No.
You should use PROC GLM. Much simpler, you do not have to create dummy variables when you use PROC GLM, and you get the exact same answer as if you created the dummy variable and then ran PROC REG.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.