Bookmark and Share

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

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

st: mi passive - When is it executed?

From   Isaac Knowles <>
To   "" <>
Subject   st: mi passive - When is it executed?
Date   Mon, 11 Jun 2012 15:31:18 -0700 (PDT)

Hi, Statalisters,

I am wondering when, during the imputation step, Stata actually generates a passive variable. I am currently using Stata 12's "mi impute chained" to execute imputation of about 8 different variables, including age and earnings. I want to use a quartic in age when imputing earnings. Both age and earnings are missing, but by far earnings is missing more. The missing pattern is not monotone. In both the burn-in and imputation steps, I want Stata to first impute the value of age where it is missing (which it does automaticall). Then I want it to generate the age quartic based on the imputed values. Finally, I want it to use the age quartic to impute log earnings (which it also does, but I'm not sure if the quartic is using the latest imputed values) It's not clear to me from reading the manual that Stata is smart enough to know when I want these things calculated, though. So does anyone know when a passive variable is generated during the imputation
 process? Is it doing it before it imputes earnings? Or at the very end?

A much-abbreviated version of the code I have a question about goes as follows:

mi set wide
mi register: ageimp lnearnimp
mi passive: gen age2imp = ageimp*ageimp
mi passive: gen age3imp = age2imp*ageimp
mi passive: gen age4imp = age3imp*ageimp
mi impute chained (reg) ageimp (reg, include(age2imp age3imp age4imp) lnearnimp, [some options here] add(10)

Thanks very much for your help!

-Isaac Knowles

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index