Solved – Get standard error of exponentiated coefficient in cox regression

cox-modelrsurvivalvariance

When I run coxph, R supplies me with the coefficients, exponentiated coefficient, and standard error. The standard error is for the regression coefficient, $\beta$. How can I get the standard error of the exponentiaed regression coefficient, $exp(\beta)$?

R code:

library("survival")
data("lung") #From the survival package
res.cox <- coxph(Surv(time, status) ~ sex, data = lung)
summary(res.cox)

Which gives me (sorry for the horrible formatting):

Call:
coxph(formula = Surv(time, status) ~ sex, data = lung)

n= 228, number of events= 165

coef exp(coef) se(coef) z Pr(>|z|)
sex -0.5310 0.5880 0.1672 -3.176 0.00149 **

se(coef) is giving me the standard error of "sex". I would like the standard error of exp("sex").

I can find the variance using the delta method, but can R give me the results without doing the calculations myself?

Best Answer

You can do it manually by calculating $se(sex) \cdot \exp(sex)=0.1672 \cdot 0.5880=.0983136$ since the derivative of $\exp{}$ is $\exp{}$ itself, or like this using svycontrast() in the survey package:

library("survival")
library("survey")
data("lung") #From the survival package
res.cox <- coxph(Surv(time, status) ~ sex, data = lung)
summary(res.cox)
svycontrast(res.cox, quote(exp(sex)))

which yields

         nlcon     SE
contrast 0.588 0.0983
Related Question