Hello Stata Forum,
I am conducting a study using complex survey weighted NHANES data to look at weight across age categories. Some NHANES participants did not have a body mass index (BMI) measured so I employing multiple imputation to address this but have run into an estimation error that I believe is unique to running MI on survey data.
After survey setting my data and running multiple imputation with 20 iteration for the missing bmi values, I create a passive variable for bmi cut off based on the imputed bmi values:
I then run an survey estimate command to obtain totals of patients with BMI>45 across age deciles, however I receive the following error
When I follow the error command suggestion and run mi xeq I find that some but not all imputations have 0 patients within an age category who meet the cut off and as a result the whole subpopulation is excluded - two examples out of the 20 imputations show below:
Having identified the problem, I am not sure what the solution is, as I believe the imputation is running correctly but it is a matter of how the survey commands interact with MI that causes this error. I would appreciate any suggestions.
Best,
Tim Anderson
I am conducting a study using complex survey weighted NHANES data to look at weight across age categories. Some NHANES participants did not have a body mass index (BMI) measured so I employing multiple imputation to address this but have run into an estimation error that I believe is unique to running MI on survey data.
After survey setting my data and running multiple imputation with 20 iteration for the missing bmi values, I create a passive variable for bmi cut off based on the imputed bmi values:
Code:
mi passive: gen ex_bmi = 0 mi passive: replace ex_bmi = 1 if bmi>45
Code:
mi estimate: svy: total ex_bmi, over(age_cat) mi estimate: omitted terms vary The set of omitted variables or categories is not consistent between m=1 and m=9; this is not allowed. To identify varying sets, you can use mi xeq to run the command on individual imputations or you can reissue the command with mi estimate, noisily
Code:
m=8 data: -> total ex_bmi, over(age_cat) cformat(%9.0f) noisily Total estimation Number of obs = 7,581 _subpop_1: age_cat = 40-49 _subpop_2: age_cat = 50-59 _subpop_3: age_cat = 60-69 _subpop_4: age_cat = 70-79 _subpop_5: age_cat = 80+ -------------------------------------------------------------- Over | Total Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ ex_bmi | _subpop_1 | 53 7 39 67 _subpop_2 | 33 6 22 44 _subpop_3 | 32 6 21 43 _subpop_4 | 8 3 2 14 _subpop_5 | 0 (omitted) -------------------------------------------------------------- m=9 data: -> total ex_bmi, over(age_cat) cformat(%9.0f) noisily Total estimation Number of obs = 7,581 _subpop_1: age_cat = 40-49 _subpop_2: age_cat = 50-59 _subpop_3: age_cat = 60-69 _subpop_4: age_cat = 70-79 _subpop_5: age_cat = 80+ -------------------------------------------------------------- Over | Total Std. Err. [95% Conf. Interval] -------------+------------------------------------------------ ex_bmi | _subpop_1 | 51 7 37 65 _subpop_2 | 33 6 22 44 _subpop_3 | 33 6 22 44 _subpop_4 | 8 3 2 14 _subpop_5 | 1 1 -1 3 --------------------------------------------------------------
Best,
Tim Anderson