I am investigating the returns to education and I have 4 different stata files each with roughly the same individuals. I have appended 9 waves together in each of the 4 stata files, each corresponding to a different year. So I have 4 different stata files each with 9 waves and roughly the same individuals but each with different variables. The problem arises because I have the log of earnings, education and other variables for year 1 to year 9 in one file and other variables I would like to use in the other stata files. I have already found the common variable in all datasets.
The problem that occurs is that when I try the command:
merge 1:1 commonvariable using file.dta
I always get the same error: variable commonvariable does not uniquely identify observations in the master data
Is this a problem because of the multiple years? Should I seperate the years and merge all the variables needed in year specific files and then append them all together? Or is there another command that could possibly work? Perhaps joinby?
Thanks in advance
The problem that occurs is that when I try the command:
merge 1:1 commonvariable using file.dta
I always get the same error: variable commonvariable does not uniquely identify observations in the master data
Is this a problem because of the multiple years? Should I seperate the years and merge all the variables needed in year specific files and then append them all together? Or is there another command that could possibly work? Perhaps joinby?
Thanks in advance
Comment