hi,
i have a number of data sets of the same survey in different years. In each of these data sets I create a combination variable xy using the below code:
so the new variable takes the labels of x and y. However, the underlying values differ in each year depending on which combinations are available. For example, in Year 1, there may be 350 combinations whereas in Year too only 340. Therefore, values 341-350 won't exist in Year 2.
I then need to append all the data sets together but when I do so my labels get mixed up and I am even missing some labels in each year. How can I solve this problem?
Thanks in advance.
i have a number of data sets of the same survey in different years. In each of these data sets I create a combination variable xy using the below code:
Code:
egen xy = group(x y), label
I then need to append all the data sets together but when I do so my labels get mixed up and I am even missing some labels in each year. How can I solve this problem?
Thanks in advance.
Comment