I use several waves of national labor force survey data. Each wave is a separate .dta file. Each wave contains more or less the same variables, but the variable names differ across years. For example, AGE is called a1 in year 1999, c1 in year 2000, b2 in year2001, etc. I have generated an excel sheet in which I track all the name changes, it looks about as follows:
1999 2000 2001 2002 2003 .....
AGE a1 c1 b2 a3 f2
EDUC c1 a1 v1 b3 f5
EXPER g1 r3 j2 l8 o6
.
.
A variable name can stand for a specific variable in year t and another in year t+1 or t+2 or any other year; for example, above, a1 is the variable name for AGE in 1999 but stands for EDUC in 2000. My question is, how can I create a single .dta file with the variables AGE, EDUC, EXPER,... that includes all waves (years), and takes the information above into account in an automatized way (i.e. using the excel sheet)? Of course I could do it manually, but that would just take too long, since I have many variables and many waves (years).
I hope for and look forward to helpful replies.
1999 2000 2001 2002 2003 .....
AGE a1 c1 b2 a3 f2
EDUC c1 a1 v1 b3 f5
EXPER g1 r3 j2 l8 o6
.
.
A variable name can stand for a specific variable in year t and another in year t+1 or t+2 or any other year; for example, above, a1 is the variable name for AGE in 1999 but stands for EDUC in 2000. My question is, how can I create a single .dta file with the variables AGE, EDUC, EXPER,... that includes all waves (years), and takes the information above into account in an automatized way (i.e. using the excel sheet)? Of course I could do it manually, but that would just take too long, since I have many variables and many waves (years).
I hope for and look forward to helpful replies.
Comment