Announcement

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

  • Leave some imputed variables out of imputation of other variables

    I'm working on running mi impute on a data set with an unfortunate structure, where I have:

    1) Several variables a, b, c that I am imputing but which have lots of logical skips and so are missing for nearly all of the data
    2) The unfortunate circumstance that pretty much every observation is missing some variable, and in particular variable d tends to be missing when everything else isn't.

    Now, this is fine when I'm trying to impute these variables (I can just use "if" with a, b, c so it doesn't try to impute their logical skips).

    But what this means is that when I try to run mi impute, I get a lot of errors related to having no observations, because it tries to use a, b, c, d as predictors for the other variables, but then no observation has all the variables, and the model can't run.

    I know the best-practice in MI is to use everything as a predictor but I don't think that works here. Is there a way around this? Perhaps some way to designate one of the imputed variables as not to be used as a predictor, or some way to impute a, b, c, d separately after everything else has already been imputed?

    I'm not sure how important syntax is here but here's a simplified version of what I'm doing:

    Code:
    mi set wide
    
    mi register imputed a b c d e
    
    mi register regular f g h
        
        *SP17
    mi impute chained (pmm if cond==1, knn(3)) a b c ///
        (ologit) d ///
        (logit) e  ///
        = f g h, add(15)

  • #2
    Details can be tricky and it is hard to comment in a detailed way on stylized examples.

    I recommend you read your way through the pdf manual entries on mi impute. Especially the paragraph on Conditional imputation seems relevant here. Conceptually, the most important point (at least in my view) is the assumption that all missing values resulting from a logical skip/filter do indeed represent the same underlying value; e.g., males cannot be pregnant so missing values for pregnancy represent true 0.

    Technically, read up on the orderasis option that you almost always will have to use with conditional imputation. Sticking with the example of sex and pregnancy, if you do not specify orderasis and put the conditional imputation equation for pregnancy after that for sex, you might find pregnant males after imputation if pregnancy has fewer missing values than sex. I find it a bit shocking that the manual is completely quiet about this aspect.

    Best
    Daniel

    Comment


    • #3
      Thank you - I'll see if I could reasonably will in the logical skips with something, and check out orderasis.

      Comment

      Working...
      X