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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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