BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tam_el
Calcite | Level 5

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?

 

240-Q49

 

My answer is C, but I the right answer is D. Why?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

Because, as you can see from the Syntax page of the PROC REG Documentation, PROC REG does not support a class statement.

View solution in original post

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

Because, as you can see from the Syntax page of the PROC REG Documentation, PROC REG does not support a class statement.

tam_el
Calcite | Level 5
Thank you, Understood now, I should explicitly create a dummy variable for categorical predictor before applying PROC REG.
PaigeMiller
Diamond | Level 26

@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.

--
Paige Miller

sas-innovate-2024.png

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.

 

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
  • 3 replies
  • 7367 views
  • 0 likes
  • 3 in conversation