Announcement

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

  • mvn imputation not processing - Help!

    I wanted to give my gratitude to this community that has done a lot to help me - I come with a new issue with mvn imputation.

    I am using the same data I have used before only I have changed the imputed marital variable - the only difference is that I now use dummies for marital status. All missing and non-missing variables are registered correctly, it is the final line of coding that gives me the following error:

    "Iteration 6: variance-covariance matrix (Sigma) became not positive definite
    EM did not converge
    r(498);"

    As many of us know, looking up error 498 is not helpful - could anyone let me know what is wrong with my coding? It was the final line (starting with "mi impute mvn") that had the issues.

    mi set flong

    mi register imputed StopDriv_2 PAINDRIVE woman2 nonhispblack other hisp SEX2 college_2 continc OWNRENT2 RURAL2 SELFRATED PHYS_ABLE LONGLIVE AGEID SLEEPQLTY MEMORY SAD STAYAWAKE SUBJAGE EMPLOY EYES HEAR PAIN visitfriend_n visitfam_n visit_irl faminter_score friendsinter_score email_score marriedpar separated divorced widowed nevermar

    mi register regular AGE AGE2 DRVRX DRVRX2 AbilityMean HEALTH_LOT MONEY_LOT LIVING_LOT ENDPLN_LOT DRIVPLAN_LOT DRIVPLAN_SOME

    mi impute mvn PAINDRIVE woman2 nonhispblack other hisp SEX2 college_2 continc OWNRENT2 RURAL2 SELFRATED PHYS_ABLE LONGLIVE AGEID SLEEPQLTY MEMORY SAD StopDriv_2 STAYAWAKE SUBJAGE EMPLOY EYES HEAR PAIN visitfriend_n visitfam_n visit_irl faminter_score friendsinter_score email_score marriedpar separated divorced widowed nevermar, add(20) rseed(2121)

    All help is appreciated! This is for a research project.

  • #2
    The Stata manual describes that mi impute mvn is used to impute continuous variables. I assume that variables like divorced are binary, this might be an issue. You can switch to mi impute chained quite easily and resolve this issue. See the manual for examples.
    Best wishes

    Stata 18.0 MP | ORCID | Google Scholar

    Comment


    • #3
      Originally posted by Felix Bittmann View Post
      The Stata manual describes that mi impute mvn is used to impute continuous variables. I assume that variables like divorced are binary, this might be an issue. You can switch to mi impute chained quite easily and resolve this issue. See the manual for examples.
      Thanks - the thing is that it works find for other binary variables like woman2 - so I'm not sure that is the issue. Here is what stata provides when I ask for help with the mvn coding:

      mi impute mvn ivars [= indepvars] [if] [, impute_options options] - are you referring to a different manual? Also, would I be repeating this coding with imputing separately for dependent and independent variables?
      Last edited by Cherish Michael; 12 May 2022, 12:46.

      Comment


      • #4
        RESOLVED!

        It appears that I forgot to leave out the reference category! #RookieMistake

        Thank you @Felix

        Comment

        Working...
        X