Hi Everyone,
How can I modify PHREG statement to run for a multilevel response variable (stm= 0, 1, 2). The following statement yield one HR, I need to get two HR for stm(1 vs. 0 and 2 vs. 0)
proc phreg data=s ;
class drug (ref='1') stm (ref='0') / param=ref;
model period1*stm(0)= drug year/ risklimits;
run;
any help is appreciated
If the response that you want to model is multinomial (either ordinal or nominal), then you should be using PROC LOGISTIC, not PROC PHREG. You can find examples of both in the Examples section of the LOGISTIC documentation. From your description, it sounds like you want to treat the response levels as nominal. The comparisons you mention will be obtained if you use the LINK=GLOGIT option in the MODEL statement and the DESCENDING response variable option:
model stm(descending) = drug year / link=glogit;
Try adding a HAZARDRATIO statement, such as:
hazardratio stm/diff=ref;
SteveDenham
Thank you for the response! I tried the statement but I received the following error, the variable specified in the hazardratio statement must be in the model.
If the response that you want to model is multinomial (either ordinal or nominal), then you should be using PROC LOGISTIC, not PROC PHREG. You can find examples of both in the Examples section of the LOGISTIC documentation. From your description, it sounds like you want to treat the response levels as nominal. The comparisons you mention will be obtained if you use the LINK=GLOGIT option in the MODEL statement and the DESCENDING response variable option:
model stm(descending) = drug year / link=glogit;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.