Announcement

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

  • Dummy Variables out of a Trichotomous Variable

    Hi everybody,

    I realize this probably has an extremely simple solution, but I'm relatively new to Stata. I have a trichotomous variable with the values 0,1, and 2. I am tasked with creating two dummy variables out of this variable. If it were three dummy variables, I'm fully aware on how to do that, but I need to create two dummy variables out of this trichotomous variable. Any help would be appreciated.

  • #2
    if you are going to use this in estimating some model, you would do better using factor variable notation; see
    Code:
    h fvvarlist
    if you need this for some other reason, you can use -tabulate- with the "gen()" option; see
    Code:
    h tabulate oneway

    Comment


    • #3
      I'm sorry for the dumb question, but what does "h" stand for in that code?

      Comment


      • #4
        it stands for "help" which you would have known if you had tried it

        Comment


        • #5
          Originally posted by Rich Goldstein View Post
          it stands for "help" which you would have known if you had tried it
          Hahaha, well put, Rich.

          Comment

          Working...
          X