This is the code I'm using for doing mi, which seemingly works perfectly:
Code:
mi set mlong mi register imputed depression race gender gpa p_educ age mi impute chained (regress) p_educ depression gpa age (logit) gender (ologit) race = treatment_var, add(20) rseed(100) mi estimate: regress: depression i.treatment_var i.race i.gender gpa c.age#c.age p_educ, robust
When I do the -mi estimate: regress- command, I see my "Number of obs" is equal to 743, which is my original number of total observations, so that seems to make sense. But then if I do -tab treatment_var- afterwards (on this imputed dataset), there is something like 3,000 total responses.
But I thought I was telling Stata not to impute that variable, as it has no missings, and indeed it seems like the actual regression output itself still has the correct original number of observations.
Am I just overlooking something? What is happening with what that -tab- is showing me?
Sorry for not providing data here, it is on a different server that I cannot access at the moment. Hopefully the question will still be clear otherwise.
0 Response to Multiple imputation confusion
Post a Comment