BookmarkSubscribeRSS Feed
bncoxuk
Obsidian | Level 7

Hi,

I used the program below with the purpose of setting age group 15 as the reference group for comparison. But the result shows that age group 9 has been set as the reference group. Don't understand where is the problem?:smileyconfused:

PROC LOGISTIC DATA=work.test;
  CLASS age (PARAM=REF REF='15') sex /param=GLM;
  MODEL score=age sex /AGGREGATE SCALE=NONE;
  OUTPUT OUT=work.test02 pred=pred reschi=reschi;
RUN;

Result:

age1
age10
age11
age2
age3
age4
age5
age6
age7
age8
age9: 0

3 REPLIES 3
data_null__
Jade | Level 19

Do you have an age group 15? 

bncoxuk
Obsidian | Level 7

Hi data_null, there is no age group 15.

Probably the reason why the setting of reference group failed to work is because the GLM? I checked SAS procedure manual, which indicates that when there is /param=GLM, the manual specification of reference group will not work.

Does it mean that if I really prefer the GLM matrix, there is no way that I can choose my preferred reference group?

data_null__
Jade | Level 19

Does it mean that if I really prefer the GLM matrix, there is no way that I can choose my preferred reference group?


The group that comes last when the values of the CLASS variables are ordered, depending on the value of ORDER= class statement option, will be the reference group when PARAM=GLM. 

You can recode or reFORMAT the value to achieve the order you desire.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1496 views
  • 3 likes
  • 2 in conversation