Announcement

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

  • Multiple imputation by chained equations with hard coded (.a etc.) missing

    Hey all,

    In running my MICE I keep running into the error message:

    "Missing imputed values produced
    This may occur when imputation variables are used as independent variables or when independent variables contain missing values. You can specify option force
    if you wish to proceed anyway."

    I've noticed that this occurs for imputations on subsequent variables where the previously imputed variable (for the same observation) has hard coded missing (.a) for skip patterns. I'm assuming this is because the previously imputed variable is used as an independent variable for the next imputation but contains these hard coded missing values.

    No idea how to trouble shoot this.

    Any ideas?

  • #2
    Hello Sebby,

    Welcome to the Stata Forum.

    To start, ".a" still applies for the missing data related to the independent variables. I'm not saying that using missing data in the equation will provide remarkable results. But the way out (apart from selecting independent variables without missing data), as pointed by Stata, is to apply the option "force". I wonder whether you did it, considered that, quoting Stata, "you wish to proceed anyway".

    Best,

    Marcos
    Best regards,

    Marcos

    Comment


    • #3
      Hi Marcos,

      Thanks for your response!

      So when I specify my independent variables in the imputation model I used only entirely complete variables, but because I'm imputing several variables (some of which unfortunately include the hard coded .a observations), on subsequent imputations when these imputed variables are added to the imputation model as independent variables (I believe this is how MICE works? imputed variables are used to impute the next missing variable in an iterative fashion?) these .a missing values are used as independent variables.

      Sorry about my pitifully novice level of understanding, I'm having a hard time making sense of everything.

      I'm not exactly sure how the option "force" works, I've tried it but it leaves many variables incomplete.

      Thanks!
      Sebby

      Comment


      • #4
        (some of which unfortunately include the hard coded .a observations)
        What does "unfortunately" mean here? If you think it is a bad idea to have these missing values hard coded, then change that. If you want to keep them, you can try using the omit() option to exclude the respective variables from the conditional imputation model of other covariates. Note that this practice will underestimate the relationship between the respective predictors in the imputed dataset. Another alternative could be to mark the respective observations, impute the missing values, then discard them from the imputed datasets. It is hard to tell which option is best suited given the little substantial information.


        Best
        Daniel
        Last edited by daniel klein; 14 Jun 2016, 09:40.

        Comment


        • #5
          Originally posted by daniel klein View Post

          What does "unfortunately" mean here? If you think it is a bad idea to have these missing values hard coded, then change that. If you want to keep them, you can try using the omit() option to exclude the respective variables from the conditional imputation model of other covariates. Note that this practice will underestimate the relationship between the respective predictors in the imputed dataset. Another alternative could be to mark the respective observations, impute the missing values, then discard them from the imputed datasets. It is hard to tell which option is best suited given the little substantial information.


          Best
          Daniel

          Sorry about that, the .a are skip patterns in the data, essentially these are "n/a" because, for example, one cannot have post-operative complications if they did not undergo surgery. So it's unfortunate simply because these values mess with the imputation model once the imputed variable is included as an independent var because these hard coded values remain.

          I will look into omitting these values, or imputing conditionally on an indicator variable. If that's reasonable?

          Comment


          • #6
            I will look into [...] imputing conditionally [...]
            That is probably the way to go here. There are examples of conditional imputation in the manual.

            Best
            Daniel

            Comment


            • #7
              Hello Sebby,

              Since you said you're "not exactly sure how the option 'force' works, this is what we get from the manual:

              force specifies to proceed with imputation even when missing imputed values are encountered. By default, mi impute terminates with error if missing imputed values are encountered.
              On second thoughts, and now specifically related to the categorical variables, maybe you could "label value" the "post-operative complications" variable - say, as "not applicable", among other levels - instead of the ".a". This way, you could perform you imputation and see what happens.

              Best,

              Marcos
              Best regards,

              Marcos

              Comment

              Working...
              X