Stata novice here so please be gentle, but I have a dataset from a household survey. Basic demographic information (age, gender, education, etc) for each household member was collected. Currently in Stata the data is arranged horizontally such that it looks something like this:
hhid hh_m1 . age1 gender1 hh_m2 age2 . gender2 and so forth....
1 . father 45 1 mother 43 0
2 . father . 29 1 mother 26 0
3 . mother 34 0 son 7 1
4 . father 56 1 daughter 23 0
5 mother 42 0 daughter 20 0
and I want it arranged vertically to like this:
hhid hh_m age gender
1 father 45 1
1 mother 43 0
2 father 29 1
2 mother 26 0
3 mother 34 0
3 son 7 1
I've been playing around with the reshape command but just cant figure it out for the life of me. Any help would be seriously appreciated.
Guillaume
Related Posts with Reshape help for household data
Inconsistency with corr2data commandHi all, I am having some trouble with replicability using the corr2data command to simulate autocor…
Quantile Diff-in-diff with fixed effectsDear Stata users. I wish to estimate quantile difference-in-difference (DID) model with fixed effect…
Multiplicative interaction with a continuous outcomeHi, I am fitting a model with a continuous outcome and an interaction between two binary predictors…
Fractional Dynamic ProbitHello all, for my master thesis on bank's NPL, after having estimated the determinants of bad loan w…
Generate a variable with the count of the value 3 across several variablesHi, I would like to generate a variable that contains the count of the value 3 across several column…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape help for household data
Post a Comment