Announcement

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

  • Creating dummy variables using tabulate (Too many values)

    Hi,

    I would like to create about 20,000 dummy variables from one variable studentID. When I used the code tab studentID,gen(studentID). Stata say that there were too many values. Is there any other way to create the dummy variables instead of doing it manually one by one?

    Thank you.

  • #2
    It is probably a mistake to control for individual effects by creating individual-level dummy variables. You don't tell us anything about what your goal is, but perhaps it can be met by doing fixed effects estimation with the xtreg command.

    Comment


    • #3
      Dear Angie, In addition to William's suggestion, you can try (ssc install) reghdfe, which is designed to deal with situations like yours.

      Ho-Chuan (River) Huang
      Stata 19.0, MP(4)

      Comment

      Working...
      X