LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 16 Apr 2008 13:16:04 -0400
Reply-To:   Peter Flom <peterflomconsulting@mindspring.com>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Peter Flom <peterflomconsulting@MINDSPRING.COM>
Subject:   Re: Getting odds ratios
Comments:   To: Howard Alper <halper@HEALTH.NYC.GOV>
Content-Type:   text/plain; charset=UTF-8

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


Back to: Top of message | Previous page | Main SAS-L page