Hello,
I am trying to merge data sets with many waves. Both have variable of PNID and HHID. But when i try to merge by matching by PNID and HHID I get an error "variables PNID HHID do not uniquely identify observations in the master data.
The master data has PNID as there is a person number (10) and (21) and (31) all live in HHID (003). SO there are many "10s" in the dataset.
How do I merge this? Is there a way to create a unique identifier for each person.
tabulate PNID
person |
number |
(char) | Freq. Percent Cum.
------------+-----------------------------------
10 | 75,228 54.30 54.30
11 | 3,107 2.24 56.54
12 | 90 0.06 56.61
13 | 5 0.00 56.61
20 | 42,989 31.03 87.64
21 | 665 0.48 88.12
22 | 42 0.03 88.15
30 | 6,590 4.76 92.90
31 | 260 0.19 93.09
32 | 11 0.01 93.10
40 | 9,247 6.67 99.77
41 | 299 0.22 99.99
42 | 14 0.01 100.00
------------+-----------------------------------
Total | 138,547 100.00
Related Posts with Merge by person number and household ID?
reshape long to wide formatI am stuck at this point. I would like to transform input data (long format) to wide format (output …
trade analysis on gravity modelDear All, i am working on gravity model for my master thesis : impact of Nonreciprocal preferential …
Replace not replacingDear Folks, Using Stata 15.1. When replacing, Stata is declaring that 134 real changes are made, h…
Timeseries - mean and variance equationshi, I am using a GARCH (1,1) regression model to regress stock returns against specific exogenous v…
testing inequality between coefficientsHello everyone, I have a question that is related to hypoteses testing in stata I run the following…
Subscribe to:
Post Comments (Atom)
0 Response to Merge by person number and household ID?
Post a Comment