Hi everyone! Few variables from my dataset look like as provided below. This is from individual level dataset where in the household level no.of participants are aggregated by total no.of individual participants. But since it is individual-level dataset, the unique Household identifier is repeated multiple times according to the no.of individuals surveyed in each wave (2 period panel data). My issue is I want to combine these to a household dataset where one specific household is only one record per 1 survey, just as in the case of desired dataset specified. How do I create a new variable where I only can record the total no.of participants at the individual level once, so I can merge that to the household-level dataset? Will be happy to provide more details if required. Thanks in advance!
Original dataset
HHBASE2 SURVEY hh_farm_participants05 hh_nonfarm_participants05 hh_farm_participants12 hh_nonfarm_participants12
"10102010100" 1 0 2 0 0
"10102010100" 1 0 2 0 0
"10102010100" 1 0 2 0 0
"10102010100" 2 0 2 0 0
"10102010100" 2 0 2 0 0
"10102010100" 2 0 2 0 0
"10102010200" 1 0 4 0 0
"10102010200" 1 0 4 0 0
"10102010200" 1 0 4 0 0
"10102010200" 1 0 4 0 0
"10102010200" 2 0 3 0 2
"10102010200" 2 0 3 0 2
"10102010200" 2 0 3 0 2
Desired dataset
HHBASE2 SURVEY hh_farm_participants05 hh_nonfarm_participants05 hh_farm_participants12 hh_nonfarm_participants12
"10102010100" 1 0 2 0 0
"10102010100" 2 0 1 0 0
"10102010200" 1 0 2 0 0
"10102010200" 2 0 4 0 0
"10102010300" 1 0 4 0 0
"10102010300" 2 0 4 0 0
Related Posts with How to only record the observations only once for unique identifier in one period ?
How to replace space(s) in a string by another charater like and underscore (_)?For my coding, I need to automatically replace possible spaces from value labels during processing i…
Fixed-effect model: how to regress with 2 sample periodsDear Statalist, For my thesis I try to examine the effect when a firm generates more renewable ener…
Interpreting ratio dependent variableDear Statalists I'm having a bit of trouble interpreting the following output: Code: ------------…
Anybody looking for a research assistant?My daughter, a college freshman, is interested in paid or volunteer work, preferably with people who…
Create four-year average dataHello I would like to create a panel data that contains four-year averages accross each variables i…
Subscribe to:
Post Comments (Atom)
0 Response to How to only record the observations only once for unique identifier in one period ?
Post a Comment