I have two datasets that were initially SPSS datasets. I imported them and saved them as .dta and now want to merge them. When I imported them the value labels got defined as labels0, labels1, labels2 etc. These now exist in both datasets but they describe different values. So, for example in dataset 1, labels0 stands for: 1 Male and 2 Female, but in dataset 2, labels0 might stand for 1 Agegroup1, 2 Agegroup2, 3 Agegroup3 and 4 Agegroup4. When I merge both datasets, Stata tells me
(label labels0 already defined)
(label labels1 already defined) etc.
and uses the labels from the first dataset for the using dataset, which leads to incorrect labels.
To solve this, I am looking for a way to rename value labels without having to assign them to the correct variables again.
I am also open for any other solutions. Thanks a lot in advance!
(label labels0 already defined)
(label labels1 already defined) etc.
and uses the labels from the first dataset for the using dataset, which leads to incorrect labels.
To solve this, I am looking for a way to rename value labels without having to assign them to the correct variables again.
I am also open for any other solutions. Thanks a lot in advance!
Comment