Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

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

From |
Isaac Knowles <[email protected]> |

To |
statalistTO <[email protected]> |

Subject |
st: Conditional Imputation using - mi impute chained - |

Date |
Tue, 12 Jun 2012 09:09:03 -0700 (PDT) |

All, Bit of a long explanation here: I am imputing missing values for about eight variables in a data set based on a survey. The ultimate goal is to impute earnings, but earnings was only asked if a person worked, and working status was only asked if a person was aged 18 or older. Age was asked as a categorical variable, where age < 18 is coded as agecat == 1, and then a bunch of other categories are coded as agecat == 2, 3, 4, etc. There are very few missing values for either the work or age variables, but the missing values are not nested. The way I formulate the work variable is **** gen workimp = work /*assign workimp the values of the original work variable, which was dichotomous */ replace workimp = 0 if agecat == 1 /*You don't work if you aren't old enough to work*/ ***** So, after that, I want to condition the imputation of work on whether a person was age 18 or older. However, issuing the following does NOT work: **** mi impute chained .... (logit, ... conditional(if agecat > 1)) workimp, [options here] **** because agecat's missing values are not nested in work. The way I "worked around" this problem (in quotation marks because I'm not sure this is correct) was by using - mi xeq - to generate an indicator variable that tells - mi impute chained - which observations of work that I want to be imputed using the conditional option: *** mi xeq: gen workingage = agecat > 1 if ~missing(agecat) ... mi impute chained .... (logit, ... conditional(if workingage == 1)) workimp, [options here] *** My thinking here is that after the first burn-in iteration, - mi impute chained - simulates values for workimp and agecat. Then based on these values it generates the workingage indicator variable, and then on the next iteration it utilizes the value of that indicator to condition the imputation of workimp. Now, this APPEARS to do what I want: crosstabs of imputed agecat and imputed workimp show that values of workimp are always zero if imputed agecat == 1, and nothing looks otherwise unreasonable. But is this the correct way to do what I'm trying to do? If not, do you have some advice on how better to do it? Thanks, Isaac * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**st: RE: Structural Equation Modeling (sem) outputs using outreg2** - Next by Date:
**st: Conditional Imputation using - mi impute chained -** - Previous by thread:
**st: standardized incidence rate** - Next by thread:
**st: Conditional Imputation using - mi impute chained -** - Index(es):