Announcement

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

  • Including interactions in imputations

    Hello,

    I am using the command mi impute chained, followed by a logistic regression. My logistic regression includes an interaction term, so I would like to include the interaction term in the imputation. Does Stata support interactions in imputations using its normal interaction notation (# or ##)? I am struggling to find the answer in the documentation and my attempts to include an interaction in my own code have been met with various error terms. I will happily share more details of my code and output should this question require more detail in order to answer.

    Thank you!

  • #2
    Technically, you include interactions with the include() option or, if one of the lower-order variables is categorical and fully observed, impute by() that variable.

    Remember that the interaction term of two predictors when imputing the outcome implies interaction terms with the outcome when imputing predictors. In terms of (pseudo) syntax, something like:

    Code:
    mi impute chained ///
        (logit   , include((x*z))) y /// imputing the outcome
        (regress , include((y*z))) x /// imputing one predictor
        (regress , include((y*x))) z /// imputing the other predictor
        ...

    Comment


    • #3
      Thank you very much, this worked perfectly! I appreciate your rapid reply.

      Comment

      Working...
      X