hello everyone ,
i m a student in master 2 degree working on a project where i need to compare the duration of hospital stay according to the treatment received ,
since my dataset has missing values i ve started with a multiple imputation , then i have generated a propensity score on each imputed data set by IPTW
now i want to compare the mean of the duration of hosp. in each treatment group while using the weights of the propensity score
so i took the weighted means and sd
mi xeq : sum duration if treatvar==1 [aw=w]
mi xeq : sum duration if treatvar==0 [aw=w]
where w is the stabilized weight created by propensity score
i recorded the weighted mean, sd and the weighted N in each imputed data set
and i made a weighted student test on each imputed dataset manually with this command ,
ttesti #obs1 #mean1 #sd1 #obs2 #mean2 #sd2
ex : ttesti 998 6.88 6.62 702 7.98 7.0084
where obs1 and obs 2 are the N of weighted population (ex if i have 1000 subjects in reality, by applying the weights my pseudopopulation equals= 998]
my question is : is that the right N to use ??? or should i use the originale number of observations N1=1000 for treat1 and N2= 700 for treat2 before applying weights
is there a way to have an overall result among the 10 imputed datasets , like we do when we use the mi estimate command
is it right if i take the average value of mean , sd , N and redo this test ttesti #obs1 #mean1 #sd1 #obs2 #mean2 #sd2 ??
thanks a lot for the help
i m a student in master 2 degree working on a project where i need to compare the duration of hospital stay according to the treatment received ,
since my dataset has missing values i ve started with a multiple imputation , then i have generated a propensity score on each imputed data set by IPTW
now i want to compare the mean of the duration of hosp. in each treatment group while using the weights of the propensity score
so i took the weighted means and sd
mi xeq : sum duration if treatvar==1 [aw=w]
mi xeq : sum duration if treatvar==0 [aw=w]
where w is the stabilized weight created by propensity score
i recorded the weighted mean, sd and the weighted N in each imputed data set
and i made a weighted student test on each imputed dataset manually with this command ,
ttesti #obs1 #mean1 #sd1 #obs2 #mean2 #sd2
ex : ttesti 998 6.88 6.62 702 7.98 7.0084
where obs1 and obs 2 are the N of weighted population (ex if i have 1000 subjects in reality, by applying the weights my pseudopopulation equals= 998]
my question is : is that the right N to use ??? or should i use the originale number of observations N1=1000 for treat1 and N2= 700 for treat2 before applying weights
is there a way to have an overall result among the 10 imputed datasets , like we do when we use the mi estimate command
is it right if i take the average value of mean , sd , N and redo this test ttesti #obs1 #mean1 #sd1 #obs2 #mean2 #sd2 ??
thanks a lot for the help