Tom
Tom

Reputation: 243

Cox Model Hazard Ratio Confidence Interval

I imputed data using MICE and ran a Cox Model using survival.

Output is:

>                        est        se         t        df     Pr(>|t|)  
   factor(ss748)Varian 0.78109445 0.1399757 5.5802158  254.8814 6.130658e-08    
   factor(ss749)Variant 0.43698935 0.2145538 2.0367359  213.579 4.291038e-02  
   factor(ss750)Variant 0.07076991 0.1757233 0.4027350  123.730 6.878381e-01      
   factor(ss751)Variant 0.09796057 0.1304451 0.7509714 4560.5547 4.52786e-01 

>                        lo 95     hi 95      nmis        fmi     lambda  
   factor(ss748)Variant  0.50543827 1.0567506   NA 0.13203983 0.12525575              
   factor(ss749)Variant  0.01407524 0.8599035   NA 0.14480694 0.136835
   factor(ss750)Variant -0.27704297 0.4185828   NA 0.19272691 0.17978321
   factor(ss751)Variant -0.15777509 0.3536962   NA 0.02997128 0.02954597

I understand that the SE relates to the est, so I know to get the CI for the estimates I would do:

(est - 1.96 X se, est + 1.96 x se). 

(which is what the lo 95 and hi 95 columns are). what specific calculation can I do to get the CI for the HR (which is exp(est))?

Can i just do:

(exp(est) -1.96 X se, exp(est) + 1.96 X se) to get CI for HR instead of est?

More plainly, if I wanted to use this table to publish the result (HR=X, 95% CI=X, P Val=X), how do I go about it from the table above?

Thanks

Upvotes: 0

Views: 3088

Answers (1)

Ben Bolker
Ben Bolker

Reputation: 226097

To get the CI for the hazard ratio you should exponentiate the limits, not the base value, i.e.

exp(c(est - 1.96*se, est + 1.96* se))

or

 exp(est+c(-1.96,1.96)*se)

(for a single CI; if est and se are vectors then the latter approach will not work)

For the output table, something like:

with(output,
   data.frame(HR=exp(est),lwr=exp(est-1.96*se),upr=exp(est+1.96*se),
              pval=`Pr(>|t|)`))

(I'm not 100% sure what you want.) Note these are Normal (not Student-t-based) confidence intervals, but with df>100 it will make only a very tiny difference.

Upvotes: 2

Related Questions