Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How do I drop incomplete observations after running multiple imputation?


From   "Wilson, Kimberly J" <Kimberly.J.Wilson@uth.tmc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: How do I drop incomplete observations after running multiple imputation?
Date   Wed, 7 Nov 2012 13:22:03 -0600

I'm using multiple imputation  in STATA 12 to fill in missing data on eight variables.  After running the mi, I am estimating four additive regression models on four outcomes (i.e. a base model of just the outcome variable on a dummy group variables, a second model that adds several demographic covariates, a third that adds another set of variables to the second model, and so on).

 I mi set the data to wide, ran the imputations and then generated some passive variables.  That all works correctly.  The mi process filled in most of my missing values, but not all.  On 3 variables, I am still missing between 10 and 15 data points for each of the five rounds of imputation. 

 I somehow need to drop the observations from the imputed data that still contain missing data so that my sample is constant across the models.  Without doing so, I have 1,854 obs in the first two models, 1841 in the third, and 1835 in the fourth.  I want the sample to be 1835 across all four models.

To drop the observations with missing values in the imputed data, I have tried various iterations of the following:

save "V:\kwilson5\CATCH MS Data\catchms_imputed.dta", replace
mi convert mlong
drop if (diet2==. | desiredweight==. | weightcomparison==. | meal3cat==. |  p_encfv2==. | home_fj2==. | home_fruit2==. | home_veggies2==.) & _mi_m>0
save "V:\kwilson5\CATCH MS Data\catchms_imputed.dta", replace
mi convert wide

But STATA is not recognizing the "& _mi_m>0" part of the drop command and is deleting observations from the original data set.

I thought maybe I needed to add "mi xeq:" before the drop command... but that didn't help matters.

I hope there is something obvious here that I am missing.  Can anyone help?


Kim Wilson, MPIA
2012-2013 Dell Health Scholar
Michael & Susan Dell Center for Healthy Living
University of Texas School of Public Health
Austin Regional Campus
1616 Guadalupe Street, Suite 6.330, Austin, TX 78701
kimberly.j.wilson@uth.tmc.edu
cell: 412/ 719.9555

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index