Hello - long time reader, first time poster 
I have a survey of ~900 people including males and females. A small number of females (~20) were not asked a few questions on pregnancy and breastfeeding (we added those questions to the survey in week 2 of the study - oops!). I would like to use multiple imputation to address this missingness. Obviously I don't want to impute values for the males in the survey - they should continue to have missing values for these questions. I have done this successfully and conducted univariable analyses using code that looks like this, just dropping men and then running the MI:
But now, I would like to conduct multivariable analyses including both male and female participants, and including both the pregnancy/breastfeeding variables as well as other variables with no missingness. Is there a way to only conduct the MI for females but use the imputed values in a regression that includes males? I tried adding "replace pregnant = . if gender==1" after my "mi impute" command, but the estimates are different, I'm guessing because the imputation values are very different when including the ~400 men in the survey.
Thank you so much for any advice!

I have a survey of ~900 people including males and females. A small number of females (~20) were not asked a few questions on pregnancy and breastfeeding (we added those questions to the survey in week 2 of the study - oops!). I would like to use multiple imputation to address this missingness. Obviously I don't want to impute values for the males in the survey - they should continue to have missing values for these questions. I have done this successfully and conducted univariable analyses using code that looks like this, just dropping men and then running the MI:
Code:
preserve drop if gender==1 mi set mlong mi register imputed pregnant breastfeeding mi impute monotone (logit) pregnant breastfeeding = age totalchildren, add(10) rseed(12345) augment mi estimate: proportion pregnant mi estimate, or: xtlogit outcome pregnant, re mi estimate: proportion breastfeeding mi estimate, or: xtlogit outcome breastfeeding, re restore
Thank you so much for any advice!
Comment