Skip to content
Prev 156859 / 398503 Next

odds ratio: how to create reference

Philip Twumasi-Ankrah wrote:
These calculations are automatic using the Design package, e.g.

dd <- datadist(d); options(datadist='d')
f <- lrm(y ~ pol(age,2)*sex+rcs(weight,4), data=d)
summary(f, sex='m')   # makes 'm' the reference cell if you don't like 
the default; gives odds ratios

For the sex OR age is set to the median (default; easily changed; 
doesn't matter if interaction term omitted).

Bunny in your original post it would be less confusing if you did not 
call levels of an independent variable the outcomes.  Many people refer 
to the dependent variable as the outcome variable.

Frank