Announcement

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

  • mi impute and customise prediction equation using omit

    Hi Listers,

    I am using Stata v16.1 and I am building an MI model for my data using -mi impute-. I have 3 imputation variables (x1, x2, x3) and 4 complete predictors (z1, z2, z3, z4). I set the model as below but it kept crashing.

    mi imputed chained (regress) x1 (logit) x2 x3 = i.z1 i.z2 z3 z4

    So I used the dryrun option to get suggestions on how to build the model. This is what I got, which suggests I should not include x3 for x2 and x2 for x3:

    regress x1 i.x2 i.x3 i.z1 i.z2 z3 z4
    logit x2 x1 i.z1 i.z2 z3 z4
    logit x3 x1 i.z1 i.z2 z3 z4

    Based on the mi impute manual, I opted for using the omit option but this has not quite worked as x2 and x3 still have missing data after running the MI model

    mi imputed chained (regress) x1 (logit, omit(i.x2 i.x3)) x2 x3 = i.z1 i.z2 z3 z4, add(50)

    Any advice on how to address this?

  • #2
    you do need to include x2 and x3 as they, if I am reading your post correctly, do have missing values; I believe you have mis-understood the "dry run" result; your command should not include the "omit" option

    Comment


    • #3
      Hi Rich Goldstein , thanks for your reply.

      Yes, I do want to include x2 and x3 as they have missing data that I want to impute but I interpreted the dryrun results to suggest that the only predictors I need (for example) for x2 are x1 z1 z2 z3 z4 - so I need to find a way not to include x3 in the equation. Please correct me if I am wrong.

      In -ice-, there was a way to specify the prediction equation for each imputed variable and I thought the -omit- option would allow me to exclude variables from equation while still imputing their missing values. Please let me know what the best way to achieve this is.

      Thanks again.

      Comment


      • #4
        1. -ice- is still available and I sometimes use it still

        2. whether Stata thinks you "need" something does not necessarily mean that you can get by without it; for me, if x2 and x3 are related to each other, even minimally, then I would not omit either

        Comment


        • #5
          The dryrun option does not make any suggestions at all; it shows you the implication of what you have specified.

          I am surprised that the conditional specifications of the logit models appear to omit the other categorical predictor. Are you sure you have copied that correctly? Does Stata give any explanation of why x3 is omitted from the logit specification of x2 and vice versa? This is not supposed to happen in the absence of omit() or include() options.

          Comment

          Working...
          X