Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple imputation non-varying outcomes

    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:

    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

  • #2
    Sarah:
    you may want to fill in the time-invariant missing values you're 100% certain about and then go -mi-.
    As -mi- is based on regression, the usual issues/nuisances of each regression type still hold (and your example about -logit- is a case in point).
    Eventually, -mi- usually requires -mlong-.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X