Hi,
I have a data set of a household survey with hhcode denoting the household code and migrant denoting a dummy variable 1 if the household has received remittance and 0 otherwise
I want all the migrant values to be 1 for similar hhcode corresponding code.
hhcode migrant
1102100101 1
1102100101 0
1102100101 0
1102100102 0
1102100102 0
1102100102 0
1102100102 0
1102100102 0
1102100102 0
1102100103 1
1102100103 0
1102100103 0
1102100103 0
1102100103 0
1102100104 0
1102100104 0
I want the data to be this way:
hhcode migrant
1102100101 1
1102100101 1
1102100101 1
1102100102 0
1102100102 0
1102100102 0
1102100102 0
1102100102 0
1102100102 0
1102100103 1
1102100103 1
1102100103 1
1102100103 1
1102100103 1
1102100104 0
1102100104 0
Related Posts with Expanding an observation to various rows
Crude incidence rate straitfied by calendar yearI have estimated the overall crude incidence rate of diabetes in people with hypertension (the study…
MultiLevel Modeling with Repeated ObservationsHello all, My question is about multilevel modeling. I have a data which observed household members…
Should I use a Fractional outcome regression?I have panel data with an outcome variable that ranges from 0-0.6 and theoretically can get up to 1 …
Setting up time-to-first-event variablesHello, I am new to Stata and looking to efficiently set up time-to-event variables for the time to …
ologitgof - Package ?Hi everyone! I need to run goodness-of-fit tests post-ordinal regression models, but can't find any…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding an observation to various rows
Post a Comment