I am in the process of using multiple imputation to address missingness within my data, and I am running into issues imputing time-variant variables.
Specifically, I am getting the error message "outcome does not vary; remember: 0 = negative outcome, all other nonmissing values = positive outcome"
I am imputing the data in wide format, but this is causing some problems because certain variables have outcomes that do not vary in certain years (e.g. I include dummy variable measuring whether people have children, and in the first few years of my data no one has children because my respondents are too young). Is there any way I can tell Stata to ignore the issue of non-varying outcomes for these years, or only impute these variables for later years while imputing in wide format?
Thank you!
In case it's relevant, this is the code I currently use for imputation:
Specifically, I am getting the error message "outcome does not vary; remember: 0 = negative outcome, all other nonmissing values = positive outcome"
I am imputing the data in wide format, but this is causing some problems because certain variables have outcomes that do not vary in certain years (e.g. I include dummy variable measuring whether people have children, and in the first few years of my data no one has children because my respondents are too young). Is there any way I can tell Stata to ignore the issue of non-varying outcomes for these years, or only impute these variables for later years while imputing in wide format?
Thank you!
In case it's relevant, this is the code I currently use for imputation:
Code:
mi impute chained (pmm, knn(3)) x x x x x /// (logit) x x x x x x /// x x x* x* x* x* /// (mlogit) x x x /// (ologit) x x* /// = x x x x x x , add(25) rseed(12345) augment noisily
Comment