I'm using a dataset of n=830 patients, and several of the key variables have missing data.
I've created the imputation:
then tried to create a new variable based on the imputed variables:
It gives no errors, but when I run
I get the mean, std error and 95% CI, but the Number of obs is shown as 548. The original dataset has 830 patients.
Am I missing something obvious? Should the number of obs not also be 830? Using mi describe gives 'Complete 216', 'Incomplete 614' 'Total 830'.
Thank you for your help.
(Once I've figured this out, the real calculation involves more variables and more imputed variables, but I wanted to get this right first!)
I've created the imputation:
Code:
mi set mlong mi register imputed class score1 score2 score3 score4 mi register regular ethnicgroup gender age mi impute chained (regress) score1-score4 (mlogit) class = ethnicgroup gender age, add(20 rseed(999) augment mi update
Code:
mi passive: gen test = score1 + score2
Code:
mi estimate: mean test
Am I missing something obvious? Should the number of obs not also be 830? Using mi describe gives 'Complete 216', 'Incomplete 614' 'Total 830'.
Thank you for your help.
(Once I've figured this out, the real calculation involves more variables and more imputed variables, but I wanted to get this right first!)
Comment