Announcement

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

  • Logistic regression

    Hi, Im trying to regress logit model with categorical data. The dependent variable has 4 categories. How can i transform that to binary outcome variable?

  • #2
    Welcome to Statalist.

    See the output of
    Code:
    help mlogit
    help ologit
    for description of commands that analyze categorical dependent variables. You cannot change a variable with four categories to one with two categories without losing information. But if that is what you want to do, see
    Code:
    help recode
    You can find a good explanation, and more, in the notes for his course in categorical data analysis prepared by Richard Williams, a frequent contributor here, linked to from https://www3.nd.edu/~rwilliam/xsoc73994/index.html.

    Let me note that you have accidentally posted your topic in Statalist's Mata Forum, which is used for discussions of Stata's Mata language, which is different than Stata's command language. Your future questions will see a more appropriate and much larger audience if you post them in Statalist's General Forum.

    Comment


    • #3
      kindly make sure that you group the variables and apply recode module in stata
      1.e
      egen newvar=group(depvar)
      then apply recode or you consider using todummy module in stata

      Comment

      Working...
      X