Hi Statalists,
I want to generate a match dummy variable (M_n) for everyone born in year n. That is if for an individual born in year n, group = 1 then M_n = 1 (where n is the year that the individual is born). I have data of observations born from 1959 - 2002, so it is kind of messy if I create a dummy for people born in every year without using a loop or something. Any help about how to code the loop would be appreciated. Thank you very much!
Best,
Yuxiao
I want to generate a match dummy variable (M_n) for everyone born in year n. That is if for an individual born in year n, group = 1 then M_n = 1 (where n is the year that the individual is born). I have data of observations born from 1959 - 2002, so it is kind of messy if I create a dummy for people born in every year without using a loop or something. Any help about how to code the loop would be appreciated. Thank you very much!
Best,
Yuxiao
Comment