Create a column includes all confidence intervals

165 Views Asked by At

I have a code like that :

library("survival")
library("survminer")

data("lung")

res.cox <- coxph(Surv(time, status) ~ sex, data = lung)

x<-confint(res.cox)

I am looking to get all the confidence intervals, not only the upper and lower bands. So I will have a confidence interval for each participant (N=228). Actually, I need to plot the confidence intervals with their distributions.

1

There are 1 best solutions below

0
On BEST ANSWER

If you want it to assign it to the data is :


lung$CI<- predict(res.cox)