Announcement

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

  • Categorical from dummies

    Hello,

    I have 26 dummies say el1 el2 etc up to el26 and would like to enclose them all in a categorical variable say el1=1, el2=2 etc up to el26=26.
    How is it possible to do that with a loop instead of generating and replace?

  • #2
    Code:
    egen wanted = group(el*)
    replace wanted = 27 - wanted

    Comment

    Working...
    X