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
Collinarity in Fracreg analysis and collin commandDear statalisters, I am writing you because I am using fractional logistic regressions for my analy…
Plotting confidence intervals for simple exponential smoothing forecast resultsHello, everyone! I am currently trying to visualise the results of a simple exponential smoothing f…
Error with levelsof but not levels commandHi everyone, Has anyone experienced errors with levelsof not present with levels commands? This curi…
how to calculate cumulative observation for a certain time interval, like 10 years?Hi Guys: i am new here. I have a dataset that records two states and if they had militarized dispute…
How to loop over a merge of inconsistent variables over timeDear StataList. I need to merge two sets of data (partner + respondent) per wave for many waves. Th…
Subscribe to:
Post Comments (Atom)
0 Response to reshape long drops variables
Post a Comment