Announcement

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

  • Is my multiple imputation still missing data?

    I'm using a dataset of n=830 patients, and several of the key variables have missing data.

    I've created the imputation:
    Code:
    mi set mlong
    mi register imputed class score1 score2 score3 score4
    mi register regular ethnicgroup gender age
    mi impute chained (regress) score1-score4 (mlogit) class = ethnicgroup gender age, add(20 rseed(999) augment
    mi update
    then tried to create a new variable based on the imputed variables:
    Code:
    mi passive: gen test = score1 + score2
    It gives no errors, but when I run
    Code:
    mi estimate: mean test
    I get the mean, std error and 95% CI, but the Number of obs is shown as 548. The original dataset has 830 patients.

    Am I missing something obvious? Should the number of obs not also be 830? Using mi describe gives 'Complete 216', 'Incomplete 614' 'Total 830'.

    Thank you for your help.

    (Once I've figured this out, the real calculation involves more variables and more imputed variables, but I wanted to get this right first!)

  • #2
    Did -mi impute- give you any messages in its output?

    And look at your -mi register regular- variables, ethnicgroup, gender, and age--if these variables have any missing values in the original data, that could explain the persistence of missing values in the imputed variables after imputation.

    Comment


    • #3
      also note that if you missing value indicator is ever an extended missing value (.a - .z), these will NOT be imputed using the code you showed

      Comment


      • #4
        Perhaps, you have extended missing values such as .a, .b, etc. in your data? mi impute considers those "hard missing" and will not impute them.

        Comment


        • #5
          Originally posted by Clyde Schechter View Post
          Did -mi impute- give you any messages in its output?

          And look at your -mi register regular- variables, ethnicgroup, gender, and age--if these variables have any missing values in the original data, that could explain the persistence of missing values in the imputed variables after imputation.
          Thank you. I've checked the raw data, and there is no missing data in ethnicgroup, gender or age, and no extended missing values.

          But... I think I found the problem. I was using a tool to normalise the data before registering the imputed variables, and then converting back to the original form (as per the guidance on the tool). But that seems to have forced-through the missing values. After dropping that, the mi passive and mi estimate give n=830 again.

          Thank you for your help.

          Comment

          Working...
          X