I currently am working to merge two data sets. They both have unique variable names except FamilyID which I'm using to match the data on. My two data sets are a parents data set and child data set that I wish to merge. I have successfully merged them but the value labels are wrong for the merged data set because the value label names are the same between the two data sets, but they indicate different values between them. For example, in parents data set the value label "labels8" hold information for race 1 "Black" 2 "Hispanic" etc and "labels8" in the child data is gender identity 1 "Male" 2 "Female" etc. when I merge the two data sets the value label for the child takes on the value label for the parents "labels8" since it holds the same name.
I would like to rename all my value labels in one of my data sets to add a prefix or suffix so that I do not have this problem when I merge. Incidentally all my value labels begins with "labels" followed by a number. I also have 516 value labels so I can't just go change them all easily.
Any help would be appreciated. This is my first post and I'm a newbie to STATA.
Thank you!
Related Posts with renaming all value labels in a dataset
The label is too long to fit on the X axis.Hi I'm stata beginner. I 'm drawing graph, but label is too long to fit on the X axis. Array Is t…
Question about recoding a variable, having issues with deleting some unwanted values.Hello everybody. I am a stata beginner, trying to do some descriptive analysis on a survey data. My…
Query about r(5); errorI am following certain accounting models to estimate measures of financial reporting quality. I have…
xtlogit is not supported by svy with vce(linearized)This question is similar to this one: Using XT commands with Svy commands I was dealing with panel …
Using Matrix commandDear Users, I have two freq tables as follows: Table 1 Code: pml | Freq. Per…
Subscribe to:
Post Comments (Atom)
0 Response to renaming all value labels in a dataset
Post a Comment