Announcement

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

  • variable HHID does not uniquely identify observations in the master data

    Hi!

    I am a beginner.

    I wanted to merge two datasets with a common HHID variable. I have tried the following:

    merge 1:m HHID using Dataset2

    I get the following error message is:

    variable HHID does not uniquely identify observations in the master data

    I also tried to merge with m:1 by switching master and slave datasets. Got the same error message.

    I appreciate the help. Thanks.

    -------------------------------
    Codebook of HHID of my two datasets:

    1. Dataset 1 (master dataset with 49242 observations and 5 variables)

    . codebook HHID

    ----------------------------------------------------------------------------------------------------------
    HHID Household unique ID by Eco_Reg, Province, District, and EA
    ----------------------------------------------------------------------------------------------------------

    type: string (str9)

    unique values: 5977 missing "": 0/49242

    examples: "210237405"
    "243848311"
    "310532806"
    "333518605"

    2. Dataset 2 (slave dataset with 6000 observations and 1246 variables)

    . codebook HHID

    ----------------------------------------------------------------------------------------------------------
    HHID Household unique ID by Eco_Reg, Province, District, and EA
    ----------------------------------------------------------------------------------------------------------

    type: string (str9)

    unique values: 6000 missing "": 0/6000

    examples: "210237115"
    "243731015"
    "310425715"
    "333518515"

    -----------------------------------------------
Working...
X