Skip to content
Prev 156844 / 398503 Next

odds ratio: how to create reference

Hi,
You can state a probability p as odds p/(1-p) and vice versa. To get an 
odds ratio you need actually two odds. Then you can get the odds ration 
of being/having "a" instead of "b" by odds(a)/odds(b), where "b" is the 
reference level.
If you fit a logistic regression model (which means that your outcome is 
dichotomous) then the estimated coefficients are actually 
log(oddsratios) - which you can transform to odds by exp() .
You can use a factor-variable with three levels for race and 
treatment-contrasts to get odds ratios for not being white against being 
white - make sure, that either your factor has "white" as first level or 
specify the contrast with the "base" argument.
If you create 3 dummy variables and involve an intercept in your model 
your model will be perfectly collinear - the so called "dummy variable 
trap" - you can use an intercept and create two dummies for the 
covariate levels you are actually interested in and put this in your 
logistic model - the result will be the same as with the treatment 
contrasts.

hth.

Bunny, lautloscrew.com schrieb: