Help using Base SAS procedures

How to use contrast statement in Proc logistic for binary predictor variables

Reply
Contributor
Posts: 58

How to use contrast statement in Proc logistic for binary predictor variables

Hello, I have a model and I'm trying to do contrast statements (i need odds ratios for interaction terms) in PROC LOGISTIC. My response variable is binary, and some predictors are binary while others are continuous.

this is my code. the variables that end with "_0" are binary. as far as race goes, White is my reference group.

So for example. I want to test group_0=1 vs group_0=0 (i.e., treatment group vs. control group). But I think it is wrong Smiley Sad Help?

proc logistic data=biostat.nutdata2 ;

Title1 'Effect of treatment group on breast cancer recurrence, controlling for estrogen status, saturated fat intake,

  nodal status, and race';

class RECU (PARAM=REF REF='No') GROUP_0 (PARAM=REF REF='NIG') nodal_0 (PARAM=REF REF='Negative') er_0 (PARAM=REF REF='Negative')

  black (PARAM=REF REF='0') asian (PARAM=REF REF='0') other (PARAM=REF REF='0');   

model RECU=GROUP_0 age_0 er_0 satfat_0 nodal_0 black asian other satfat_treat / cl;

contrast 'IIG vs NIG | all ref' GROUP_0 1 / estimate = exp;

contrast 'age+1 vs age | all ref' age_0 1 / estimate = exp;

contrast 'er+ vs er- | all ref' er_0 1 / estimate = exp;

contrast 'satfat+1 vs satfat | all ref' satfat_0 1 / estimate = exp;

contrast 'nodal+ vs nodal- | all ref' nodal_0 1 / estimate = exp;

contrast 'black vs white | all ref' black 1 / estimate = exp;

contrast 'asian vs white | all ref' asian 1 / estimate = exp;

contrast 'other vs white | all ref' other 1 / estimate = exp;

contrast 'all+ vs all-' GROUP_0 1 age_0 1 er_0 1 satfat_0 1 nodal_0 1 black 1 asian 1 other 1 satfat_treat 1

  / estimate = exp; *I don't think this tells us anything useful;

contrast 'IIG&satfat+1 vs NIG&satfat' GROUP_0 1 satfat_0 1 satfat_treat 1/ estimate = exp;

run;

Thanks

Ask a Question
Discussion stats
  • 0 replies
  • 152 views
  • 0 likes
  • 1 in conversation