I am using a dataset divided into several different files, some of those are at the household level and some at the individual level. I want to work at the individual level but having information from the households too, but I am having problem merging files with two different levels. Households are identified by a code, let's say "hhid", and individual by both households and individual code "indid".
Just to show an example:
hh.dta
hhid
1
2
3
4
ind.dta
hhid indid
1 1
1 2
2 1
3 1
4 1
4 2
4 3
How can I merge the two files, in a way in which the variable of the household is matched to all individuals in that household?
I hope my question is enough clear, thanks!
Related Posts with Merge households and individuals datasets
Using gsem with multiply imputed dataI am trying to fit a gsem model using multiply imputed data with multiple continuous factor dependen…
Expand and Insert Observations to VariableHi all, Thanks in advance for any suggestions and supports! I am currently trying to expand a datas…
Need Help Merging Two DatasetsDear all, I am using Stata 16, on mac. First I collapsed the first dataset I have by state_fire_yea…
age at first childHello, I am looking at childless men in the UK and I am using panel data which has 9 waves. childles…
How to balance this datasetHi all I am having a hard time thinking about the best way to balance this dataset. The format is: …
Subscribe to:
Post Comments (Atom)
0 Response to Merge households and individuals datasets
Post a Comment