Announcement

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

  • Creating figures after multiple imputation-interaction between categorical and continuous variables

    Hello everyone,

    I had a dependent variable that is income (continuous variable). My independent variables are education (3 categories, reference group is category 1) and centered age in years (no missing). Also, I created an interaction term between education and age: educ2age=education2*age. educ3age=education3*age

    Then I applied multiple imputation:

    mi set mlong

    mi register imputed income education2 education 3 educ2age educ3age

    mi impute mvn income education2 education educ2age educ3age=age, add(10)

    Then I ran a OLS:

    mi estimate: reg income education2 education3 age educ2age educ3age

    Then I wanted to create figures for the interactions. That is where I had trouble with. I know I need to use mimrgns cmdmargins and marginsplot, but I do not what else that I need to do.

    I hope it makes sense.

    Thanks.




  • #2
    This is actually a tricky question, conceptually as well as technically. You have decided to use what is called the just-another-variable (JAV) approach, creating the interaction terms before imputing missing values.This has been demonstrated to produce good results, especially for linear regression models. I cannot remember whether this conclusion holds for the case of categorical predictors. I am also a bit reluctant to apply multivariate normal imputation (mvn) for categorical predictors. And, you should probably delete the cases with missing income after imputation as your imputation model provides no additional information for imputing income (cf. van Hippel 2007). Anyway, mimrgns (probably from SSC) cannot handle this approach because just like the underlying margins command it only works with factor variable notation. I have discussed this with Richard Williams a while ago. I would like to rephrase (one of) the problem(s) that I see here. Remember that we use factor variable notation to tell Stata that different predictors in our model are mechanically related, e.g. the values of the interaction educ2age is the product of the values in education2 and age. The margins command then knows that neither variable can change values without the related variables changing values as well and acts accordingly. Now think about a basic result of the JAV approach, namely that the interaction does not equal the product of its constituting variables. How should we bring these two concepts together?

    Best
    Daniel

    van Hippel, P. (2007). Regression with missing ys: An improved strategy for analyzing multiply imputed data. Sociological Methodology, 37(1), pp. 83-117.
    Last edited by daniel klein; 07 Apr 2017, 00:47.

    Comment


    • #3
      Thanks for your comment, Daniel.

      Lei

      Comment

      Working...
      X