I have a fairly simple question. I am using proc glimmix to compare the odds of death (binary outcome) of across several different levels a categorical variable ( call it cat with 4 levels 1, 2, 3, 4), adjusting for several clinical variables (var1-var4) and clustering by hospital. In the class statement, i can specify the reference level for cat (e.g., level 1) which will lead to estimates for 2 v 1, 3 v 1, and 4 v 1 which can be converted to odds ratios (the primary outcome we want to publish). proc glimmix data=model; class hospital cat (ref=first); model death (event='1') = cat var1 var2 var3 var4 / dist=binary link=logit solution; random intercept /subject=hospital; run; However, we are interested in a variety of comparisons (e.g. 3 v 2, 3 v 4, 1 v 3, etc.). Again, we ideally want exponentiated values (odds ratios) and we do not want to have to run the model multiple times with different reference levels. I think the estimate statement could get me where i want to go but I am having trouble coding it properly as I am not so sure of the order of the categories when i define a reference level or when i dont define a reference level. would the following estimate statements generate the correct comparisons: estimate '3 v 2' cat 0 -1 1 0/exp cl; estimate '3 v 4' cat 0 0 1 -1/exp cl; estimate '1 v 3' cat 1 0 -1 0/exp cl; Also, when using estimate statements does defining a reference level in the class statement (i.e., class hospital cat (ref=first)) impact the estimate statements? Thanks for thinking about what i hope is a simple question.
... View more