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
Calculating conditional probabilities on stataHi everyone, I am analyzing a dataset of a specific treatment and the effect of such treatment on s…
Creating a new variable based on information in another observationI want to create a new variable based on information in other observations. My data looks like this:…
cmp - unable to allocate matrixHi, I am using the cmp command to simultaneously estimate three probit equation such as: DV1 = b0 …
moment evaluator programHi I am trying to write up a moment evaluator program that can be fed into a GMM routine. I am stuck…
How to compare predicted margins across two separate models?Greetings, I'm running Stata 15 on OSX and working with panel data. My goal is to test and compare …
Subscribe to:
Post Comments (Atom)
0 Response to Reshape help for household data
Post a Comment