Announcement

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

  • _mi_miss not found

    Hi everyone,
    I want to do MI imputation but always get the error: _mi_miss not found. It occours even at the point of mi register variables.

    I use these commands:
    misstable sum, gen(miss_)
    tab1 miss_cultcap miss_econcap miss_mj
    mi set wide
    mi register regular female Postmaterialism country_pp_gdp_ten
    mi register imputed cultcap econcap mj
    mi impute mvn cultcap econcap mj, add(10) noisily
    Error:
    (passive variables rel_red abs_red unregistered because not in m=0)
    (imputed variables gini_disp gini_mkt unregistered because not in m=0
    )
    _mi_miss not found

    The variables, listed in the error (rel_red, abs_red, gini_disp gini_mkt) are not even in my data set (I droped them before imputation)

    Do you have any ideas why this happens?

    Thank you in advance! Any recommendation would be helpful!


    PS: all STATA files are up to date
    Last edited by Lukas Arnold; 11 Nov 2024, 07:55.

  • #2
    Start all over from the original dataset. Type

    Code:
    use filename_of_original_dataset
    mi query
    Stata should respond with

    Code:
    . mi query
    (data not mi set)
    If you see anything else, you have some left-over characteristics from a previous run of mi commands; in that case, show the results of

    Code:
    char list _dta[]
    (after making sure it does not contain confidential information).

    Comment


    • #3
      thank you, Daniel!
      here are the results of char list _dta[] (and I can already see that there are these two variables!

      . char list _dta[]
      _dta[ReS_Xij_n]: 1
      _dta[ReS_Xij_long1]: y_
      _dta[ReS_Xij_wide1]: y_2003 y_2007 y_2011 y_2015 y_2019
      _dta[ReS_i]: Country_Name Country_Code Indicator_Name Indicator_Code
      _dta[ReS_ver]: v.2
      _dta[ReS_j]: year
      _dta[ReS_str]: 0
      _dta[ReS_Xij]: y_
      _dta[_lang_c]: default
      _dta[_lang_list]: default
      _dta[_mi_pvars]: rel_red abs_red
      _dta[_mi_ivars]: gini_disp gini_mkt

      _dta[_mi_M]: 100
      _dta[_mi_marker]: _mi_ds_1
      _dta[_mi_update]: 2003480417
      _dta[_mi_style]: wide
      _dta[ReS_Xij_wide2]: x2_1 x2_2
      _dta[ReS_Xij_long2]: x2_

      Comment


      • #4
        It seems you already have 100 imputations in your dataset. If you are sure that there aren't, then you could try typing

        Code:
        mi extract 0
        which should leave you with the original, unimputed dataset. You can then start over imputing missing values again.

        Comment


        • #5
          By the way,

          Code:
          mi impute mvn cultcap econcap mj, add(10) noisily
          is probably not what you want. If you have variables without missing values (typically the regular variables), you should include those as predictors in the imputation model. Otherwise, the respective associations will be biased towards zero.

          Comment

          Working...
          X