Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Fwd: Re: st: RE: problem with reshape


From   [email protected]
To   [email protected]
Subject   Fwd: Re: st: RE: problem with reshape
Date   Wed, 23 Jul 2003 14:36:08 +0100

Dear statalist user,


My variables are 

i=hhid (household id, for each household), 

j= memno (line number, different for every member of each household. e.g the 
2nd person in household 1 will have memno=2, as would the 2nd person of 
household 3,4,5,6...and so on)

The variables such as age, sex, relation to household head etc go from 01 to 
22, assuming that there is at least one household in the sample with up to 22 
members, and are thus currently suffixed by their number. e.g memage_04 
represents the age of the 4th member of any given household in the sample.

My data is currently wide.i.e. the title row: hhid
with columns going accross as memage_01 memex_01 reltohead_01 memage_02 
memsex_02 reltohead_02......up to 22.

When typing in reshape long (varname), i(hhid) j(memno)


I get the message 'memno contains all missing values' and it will not allow the 
reshape to commence. I would like to rehshape the data from wide to long.


My aim is to get a column for memno alongside columns for variables memage, 
memsex, reltohead without the numbered suffix. i.e. 

memno    memsex   memage reltohead
1           .        .       .
2           .        .       .
.           .        .       . 
.           .        .       .         (for household 1)
.           .        .       .
22          .        .       .
1
2
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index