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
percent of correct predictionsHello, I am trying to estimate the number of correct predictions in a linear model using robust and …
eprobit and marginsHi, I am going to use eprobit for my purpose of regressing a binary variable(y) on another endogeno…
Margins after REGHDFE with log dependent variableI am using the reghdfe command with a log dependent variable. Then, I am using the margins command f…
Hello wonder whether someone knows the formula, by which stata do the f test for equality of coefficients.Hello, thank you in advance for example: code: reg price weight mpg price Coef. Std. Err. t P&g…
Calculating day-level statistics with data that may span across several daysHi, Data at hand: patient visit start and end dates/times, with each line representing a unique vis…
Subscribe to:
Post Comments (Atom)
0 Response to Reshape help for household data
Post a Comment