I have two dummy variables d1 which takes the values 1,2,3,4 and d2 which takes the values 1,2,3,..,9. I wish to create a new variable which takes the value 1 if d1 is 2,3 or 4 and d2 is 8 or 9, and the value 2 otherwise. How do I do this on Stata?
-
Login or Register
- Log in with
Comment