0
$\begingroup$

Now I am struggling with obtaining standard error of hazard ratio.

There are some missing values, so that I am trying to use Hmisc::fit.mult.impute to perform multiple imputations.

Here you can see the sample codes.

#mice::nhanes2
#load package and data  
library(survival)
library(mice)
library(tidyverse)
library(Hmisc)
library(rms)
data(nhanes) 
set.seed(42)

#Create dummy data /  "time to death" and "death" category to apply coxph 
time_death<- as.integer(runif(nrow(nhanes), min = 100, max = 1000))
death  <- as.integer((runif(nrow(nhanes), min = 0, max = 2)))
nhanes <- nhanes %>% mutate(death=death , time_death=time_death)


imp <- mice(nhanes, m = 10, seed = 1, print = FALSE)

coximp <- fit.mult.impute (Surv(time_death,death)~age+bmi+chl,cph, 
                           xtrans=imp , x=TRUE, y=TRUE, surv=TRUE, data = nhanes)

coximp

> coximp
Cox Proportional Hazards Model
 
 fit.mult.impute(formula = Surv(time_death, death) ~ age + bmi + 
     chl, fitter = cph, xtrans = imp, data = nhanes, x = TRUE, 
     y = TRUE, surv = TRUE)
 
                        Model Tests    Discrimination    
                                              Indexes    
 Obs        25    LR chi2      5.32    R2       0.202    
 Events     15    d.f.            3    Dxy      0.378    
 Center 1.3391    Pr(> chi2) 0.1594    g        0.807    
                  Score chi2   5.56    gr       2.248    
                  Pr(> chi2) 0.1516                      
 
     Coef    S.E.   Wald Z Pr(>|Z|)
 age -0.6621 0.6167 -1.07  0.2830  
 bmi  0.0694 0.1100  0.63  0.5283  
 chl  0.0037 0.0104  0.36  0.7218  

#coximp$coefficients 

Here, we can get coefficients(Coef) of each variable (#coximp$coefficients), however, How can I get standard error (SE)?

Thanks for your help.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.