Hi all,

If I have data of 100 firms for 10 years with three variables; and I want to make a dummy variable equal to 1 for the firm if the value of variable x1 in year1 or year2 or year3 not equal to zero; how do I do it?

Probably I need something like: by id, gen boom=1 if x12000 !=0 | x12001 !=0 | x12002 !=0, but obviously there is no variable x!2000 etc. Thank you for your help.


Abdan