I am running a series of bivariate log binomial regressions in PROC GENMOD, using the same outcome and one binary (1/0) predictor per model. I use the exact same syntax, swapping out only the predictor variable, and in one of the models, the regression is for predictor category 1 vs. predictor category 0, while in the other model, it does the opposite. What could be going on?
My predictor variables are:
Housing_Insecure_Dich_BL: 0 = No, 1 = Yes
PrEP_Effic_Risk_Red_binary_BL: 0 = Below 90%, 1 = 90%+
Model 1:
proc genmod data=full3 descending;
class Housing_Insecure_Dich_BL (ref=first);
model Almost_Always_Take_3m = Housing_Insecure_Dich_BL / dist=bin link=log waldci ;
estimate 'Housing_Insecure_Dich_BL' Housing_Insecure_Dich_BL 1 -1/exp;
run;
Results: Class Level Information table lists the values as "Yes No" - meaning that it is comparing Yes vs. No, i.e., 1 vs 0. The prevalence ratio makes sense given the raw percentages.
Model 2:
proc genmod data=full3 descending;
class PrEP_Effic_Risk_Red_binary_BL (ref=first);
model Almost_Always_Take_3m = PrEP_Effic_Risk_Red_binary_BL / dist=bin link=log waldci ;
estimate 'PrEP_Effic_Risk_Red_binary_BL' PrEP_Effic_Risk_Red_binary_BL 1 -1/exp;
run;
Results: Class Level Information table lists the values as "Below 90% 90%+" - meaning that it is comparing ZERO to ONE - why is it doing this, when I've specified ref=first, and the exact same syntax with a different 1-0 coded variable produces the expected reference category coding? The prevalence ratio matches what is expected for Zero vs One, but that is not what I want.
I can just change the syntax for Model 2 to say ref=last, or ref="Below 90%", but I would rather understand what is going on and be able to use uniform syntax since all my predictors are coded the same.
Can anyone help?