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"
-----------------------------------------------
Related Posts with variable HHID does not uniquely identify observations in the master data
bar graph with event markersHello, I have a panel with 12 individuals from a company and daily data from 2010 to 2020. I have …
Problems with generating a variable/cleaning data #2Hi Listers, I have trouble with generating a specific variable and cleaning my dataset in a certain…
Loop over certain stata files in one folderHi all, I am trying to let Stata loop over only certain files ending with _p in one folder. The file…
Calculate sum of values in a tableDear all, I am currently working with a dataset where I would like to get the sum of values with ce…
Code for Approximating degree days with monthly average temperatureI am using CRU TS global gridded dataset for climate impacts on crop yields. The data has monthly me…
Subscribe to:
Post Comments (Atom)
0 Response to variable HHID does not uniquely identify observations in the master data
Post a Comment