Announcement

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

  • Logistic Regression Issues

    I am trying to perform a logistic regression but I am running into issues with the var. I keep getting the error "outcome does not vary". I tabbed my question
    Code:
    tab Q1_2
    I was trying to use as the outcome in the variable I got
    Q1_2 Freq
    .v 194
    0 117
    1 29
    I thought Stata would ignore the .v observations so I decided to
    Code:
    tabstat Q1_2
    and got a mean of 2.5! I have no idea how the mean is so high unless the .v are holding values? Has anyone ran into this issue or how to remedy it so I can run the logistical regression?

  • #2
    I looked into the values and it seems that my 0 & 1 values are being stored with a value of 2 & 4.

    Comment


    • #3
      Welcome to the Stata Forum/ Statalist.

      Please read the FAQ. There you’ll find out how to share command/output/data.

      That said, the variable was probably ‘encoded’. Typing- codebook varname - will give the real value.

      To exclude the (misleading) label, just use - label drop - command.

      Hopefully that helps.
      Best regards,

      Marcos

      Comment

      Working...
      X