Announcement

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

  • Missing values generated when used command predict

    I tried to produce sensitivity and specificity by manually through predict using the result of svy:logit. Below is the syntax I wanted to apply.

    svy:logit y x1 x2 ... , nolog or allbaselevels
    predict prediction, pr
    gen byte predicted = (prediction > 0.1) & !missing(prediction)
    svy, subpop(if srh2021 == 1): proportion predicted
    svy, subpop(if srh2021 == 0): proportion predicted

    However, it shows

    predict prediction, pr
    (999 missing values generated)

    thus, missing portion deterred having an expected result. How to cope with those 999 missing values?

  • #2
    I can't work with just syntax, a need a small dataset i can apply this syntax to in order to reproduce the problem.

    Comment


    • #3
      Seungwoo:
      as an aside to Jared's wise advice, did Stata throw a message about a number of observations ruled out from the estimate due to outcome perfect prediction?
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment

      Working...
      X