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
SUTVA assumption in endogenous treatment effect modelI have following model: eprobit y x, entreat(trtvar = x z) I suspect my treatment variable is endoge…
Dummy for recording changeHi, I would like to create a dummy which would record if any executive changes between two years and…
Var storage type is "byte", but presented as text in data editorHow do I see the assigned value to each text? …
Make an exception within a loopI'm using version 15 of stata, and I'm wondering if it is possible to make an exception within a loo…
Constant interpretation - multiple regression with log dependent variableDear all, Could anyone please explain me how to interpret the constant in a multiple regression whe…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding an observation to various rows
Post a Comment