Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stitching DHS datasets together by label rather than value

    I'm trying to use DHS data for research, and I've run into a bit of a sticking point - the "religion" variable (v130) has different labels for many of the values - for example, for country A, v130==1 has label "Christian", but for country B the label is equal to "Muslim" and for country C the label is "christian". I'd like to stitch together these datasets based on the labels of v130 rather than the values, but I'm not sure how to do this.

    Normally, I'd proceed by saying something like the following:

    use "folder/country_A"
    keep v000 v001 v130
    append using "folder/country_B"
    keep v000 v001 v130
    append using "folder/country_C"
    keep v000 v001 v130

    Is there any way to do this automatically, or even manually?
Working...
X