Announcement

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

  • Match value labels from two different datasets

    Dear Statalisters

    I have two different datasets with information on States and Districts. Since they're two different sources, the numeric values attached to the value labels are different. (the dist and stat are the numeric values attached to the State and District)
    eg:
    Data Set 1
    State District dist stat
    Haryana Ambala 1 4
    Haryana Kaithal 2 4
    Haryana Sonipat 3 4

    Data Set 2
    State District dist stat
    Haryana sonipat 11 8
    Haryana kaithal 15 8
    Haryana ambala 7 8

    What could I do to match/merge these two data sources on district? How could I change the numeric values of either one of them to match the other so that they could be merged?
    Thank You for your help
    Sayli
    Last edited by Sayli Javadekar; 22 Feb 2019, 05:38.

  • #2
    From Stata's point of view it's the other way round: different value labels are attached to numeric values. I would decode the variables in question and then encode the merged result.

    However, it seems that you have other problems over consistency of upper and lower case, that must be fixed separately.

    Comment


    • #3
      Thank you so much! It worked.

      Comment

      Working...
      X