Announcement

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

  • Factor variable returning error code in MI logit model

    Hello all,

    I am using Stata 19. I have imputed my dataset and I am running logistic regression models.
    I am getting error 452
    Code:
    kidscat: factor variables may not contain noninteger values
    This is telling me that this categorical variable named kidscat has non-integer values. The issue is that this variable does not, in fact, have any non-integer values. All cases are coded as 1, 2, or 3.

    When I run the code below (found on another statalist thread), it shows me that the non-integer values that are causing this issue are missing values. However, this variable is imputed, so missing values should not be a problem.

    Code:
    list kidscat if mod(kidscat, 1) !=0
    I reran my imputation and the issue remains.
    Can anyone tell me what the issue may be here, and how I can go about fixing it?
    Thank you.


    Note: I work with secured data so I am not able to show extended code and results.

  • #2
    Show us your imputation model, please. In fact, show all mi commands, exactly as typed. Chances are, you've imputed non-integers.

    Comment

    Working...
    X