I am trying to reshape my data from wide to long. i have 2000 household with up to 18 members in a household. each member's education, age, marital status is in wide and i need to make it in long format
when i use the command reshape long hhmemid_, i(hhid) j(newid)
i get the message (note: hhmemid_1 not found) (note: hhmemid_2 not found) (note: hhmemid_3 not found) (note: hhmemid_4 not found) (note: hhmemid_5 not found) (note: hhmemid_6 not found)
(note: hhmemid_7 not found) (note: hhmemid_8 not found) (note: hhmemid_9 not found)
when i browse the data i see first column is hhmemid (each household) and second is newid (each member id) The problem is there are only 4 people in first house 3 people in 2nd house etc but stata is generating all 18 members. Please help me. I cannot find solution for this anywhere. Thank you.
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
2 1
2 2
2 3
2 4
2 5
2 6
2 7
2 8
2 9
2 10
2 11
2 12
2 13
2 14
2 15
2 16
2 17
2 18
3 1
3 2
3 3
3 4
3 5
3 6
3 7
3 8
3 9
3 10
3 11
3 12
3 13
3 14
3 15
3 16
3 17
3 18
Related Posts with reshape long drops variables
Help with creating a variable with lagged valuesHey guys, I am currently a final year student and i am writing my Economics dissertation on Oil pri…
Replacing values by group year in panel dataDear Stata users, I am working with a panel data set. I'm trying to see how government policies aff…
Estimate risk for groupsCiao Here is the example using Stata data. Code: use http://www.stata-press.com/data/r13/drugtr …
How do i list ALL underlying codes for a variabel?I have a long list of diagnostic codes, which all have an underlying code that i need to use when wa…
How compare categories from a one variable they are the same among 10 data sets.Hello everybody, I’m working whit 10 data sets from the household survey, and I want to know if in a…
Subscribe to:
Post Comments (Atom)
0 Response to reshape long drops variables
Post a Comment