Dear Statalist,
I am trying to run an IPTW propensity score Cox regression following multiple imputation. I am trying to use an MIte approach where the propensity score model is run within each imputed dataset and ultimately combine the results using Rubin's rules1. I have referred to the following post which discusses this however I am having issue with its implementation.
https://www.statalist.org/forums/for...opensity-score
This post suggests uses the following code;
Code:
mi xeq saving(miest) : logit treat_var covariates // However this gives me the error message: invalid numlist r(121) mi predict xb_mi using miest // xb is the default mi xeq: gen preprob =invlogit(xb_mi)
[CODE]
mi estimate, saving (miest, replace): logit treat_var covariates
mi predict xb using miest, xb
mi xeq: gen ps=invlogit(xb)
mi xeq: propwt treat_var, ipt
mi stset death_date [pweight=ipt_wt], failure(death) origin(diagnosis_date) scale(30.4)
mi xeq: stcox treat_var, vce(robust)
[CODE]
works, however there are 2 issues;
1) My dataset contains 12,834 observations, with missing data in 5348 subjects. After running the above code I obtain an estimate of the treatment effect from the Cox model, however this only uses 7486 observations (ie only those with complete data in mi 0).
2) Using mi estimate for the PS estimation model rather than mi xeq does not run the model within each imputed dataset and is therefore not using MIte.
Does anybody have any suggestions?
Thank you
2 Leyrat C, Seaman S, White I, Douglas I, Smeeth L, Kim J, et al. Propensity score analysis with partially observed covariates: how should multiple imputation be used? Stat Methods Med Res. 2017;0(0):1-17.