|
Howard Alper <halper@HEALTH.NYC.GOV> wrote
>
> I'm doing a logistic regression where some of the independent variables
>are yes/no-1/0 indicator variables (numerical), but other independent
>variables are left as categorical (age, race, etc.)
>
> I'm interested in the odds ratios and confidence intervals. For the
>indicator variables, the odds ratio is the exponential of the regression
>coefficient, which is as it should be. But for the categorical variables,
>the odds ratio is NOT equal to the exponential of the regression
>coefficient. Can anyone explain this?
>
Yes. SAS, perversely, has weird defaults for PROC LOGISTIC with categorical variables. They use dummy coding for the parameter estimates, and effect coding for the odds ratios. To fix this, make your CLASS statement something like this:
CLASS mycatvar (param = ref ref = base)
for more help, look in the LOGISTIC documentation, in the section marked SYNTAX, subsection marked CLASS and sub-subection marked PARAM = keyword
> Also, if I include interaction terms among the categorical variables,
>such as age|sex, then NO information about the odds ratios for the
>categorical variables appears at all (either the main terms or the
>interaction.) How can I obtain this information (again, I wonder if
>exponentiating the regression coefficients will give me the right answer.)
>
Well, it will give AN answer, but the question is complex. I brought up this same issue a little while ago on SAS-L, but I can't find the thread. Essentially, ORs for logistic models with interactions only make sense for specific contrasts.
HTH
Peter
Statistical Consultant
www DOT peterflom DOT com
|