hello everyone ,
i m working on stata 13 , i ve started my project by a multiple imputation to fill in missing values , then i ve created a propensity score by IPTW to balance the baseline caracteristics of the patients in the 2 groups of treatment , the problem is that when i implement the weights (psweight) in the command mi stset , i get an error that 478 weights are invalid , after checking those weights i found that those were the patients that had missing data in m=0 , (as the created propensity score has variables among those that were imputed) , thus when i ran the command :
mi stset time [pweight=psweight], failure (outcome_var) id(palu_id_dec) , those patients were excluded from all datasets as in line 10 in the example
here s an example where psweight is the weight and preprob is the prop score
what should i do to avoid that , as i have to run a cox model after and it only consider patients that had weights in m=0
thanks for your help
i m working on stata 13 , i ve started my project by a multiple imputation to fill in missing values , then i ve created a propensity score by IPTW to balance the baseline caracteristics of the patients in the 2 groups of treatment , the problem is that when i implement the weights (psweight) in the command mi stset , i get an error that 478 weights are invalid , after checking those weights i found that those were the patients that had missing data in m=0 , (as the created propensity score has variables among those that were imputed) , thus when i ran the command :
mi stset time [pweight=psweight], failure (outcome_var) id(palu_id_dec) , those patients were excluded from all datasets as in line 10 in the example
here s an example where psweight is the weight and preprob is the prop score
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte TTaccesgraves1 float(psweight preprob) byte(_st _d _t _t0) 0 1.469822 .3196455 1 0 28 0 0 1.660245 .3976792 1 0 28 0 0 1.472123 .3207089 1 0 28 0 0 1.2921615 .2261029 1 0 28 0 0 1.2139688 .17625555 1 0 28 0 0 1.5956647 .37330195 1 0 28 0 1 1.26348 .791465 1 0 28 0 0 4.903548 .796066 1 1 3 0 1 1.1104624 .9005257 1 0 28 0 0 . . 0 . . . end
thanks for your help
Comment