I want use rms package to build the logistic model, but how can I get the 95%CI of OR from lrm()? I only know how to get value of OR.
My code as below:
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
y <- rep(0:1, 500)
age <- rnorm(n, 50, 10)
sex <- factor(sample(c('female','male'), n,TRUE))
label(age) <- 'Age'
label(sex) <- 'Sex'
f <- lrm(y ~ age + sex, x=TRUE, y=TRUE)
f
# OR
exp(coef(f))