I am analyzing observational study data. My predictor variable is tg4
with 4 categories (0,1,2,3) and my response variable is dm
(0,1).
my analysis step as follow:
- I use mice package to impute missing data as follow
chi<-chi %>% mice(seed = 123, print = FALSE, m=5)
- Covariate balance assessment using standardized mean differences (SMD) (I tried to use
tableone
package) but it does not work because I have 5 imputed datasets. - calculating propensity score using multinomial logistic regression.
- calculating weight
- calculating pooled hazard ratio for all dataset
suvtime<-Surv(time=chi$time,event = chi$dm)
fit<- coxph(suvtime~tg4,data=chi, weights =weights)
Thank you for your help.