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
Do you have an age group 15?
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?
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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.