BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
bhr-q
Pyrite | Level 9

When we perform regression analysis with categorical independent variables in SAS, if I let SAS choose the reference group, what is the default setting for that? 

 

I know the sas code

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26


Example:

proc glm data=sashelp.class;
class sex(ref='F');
model height=sex weight age;
run; quit;

 

 

Documentation for the CLASS statement in PROC GLM

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glm_syntax04.htm

--
Paige Miller

View solution in original post

4 REPLIES 4
StatDave
SAS Super FREQ
It uses the last level when internally sorted in alphanumeric order. So, with levels A, B, and C, it will use C as the reference level.
bhr-q
Pyrite | Level 9
Thanks so much for your answer, is there any way to set the reference category in proc GLM by ourselves?
PaigeMiller
Diamond | Level 26


Example:

proc glm data=sashelp.class;
class sex(ref='F');
model height=sex weight age;
run; quit;

 

 

Documentation for the CLASS statement in PROC GLM

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glm_syntax04.htm

--
Paige Miller

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 4 replies
  • 1930 views
  • 8 likes
  • 3 in conversation