PDA

View Full Version : How to create an indicator variable?



non-sleeper
11-11-2010, 01:13 AM
I've got a kind of longitudinal data sets, comprising of waves of data collection on the same subjects, same variables. Now I want to merge some waves, how can I create a unique indicator, so that originally same variables in each wave are recognized as different ones?

If I can't find a way for STATA to recognize such variables differently, the consequence is that STATA will either maintain old values or replace with new values. That's not what I intend to do.

Thanks :)

EDIT: Well, seem that I've got it, the syntax is:

for var *: rename X ch_X

Hope this helps those who encounter the same problem.