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

st: Reshape: from wide to long


From   Christer.Thrane@hil.no
To   statalist@hsphsun2.harvard.edu
Subject   st: Reshape: from wide to long
Date   Mon, 15 Sep 2003 20:50:43 +0200

Hi,

I have a panel data set (in wide format) where the same individuals were
interviewed eight times during a ten-year period. During the ten-year
period, about 30% of the orginal sample was lost due to attrition.

Some variables were measured 2 times, some were measured 3 ... and some
were measured 5 times. That is, my data looks like:

y1 y2 y3 y4 x1 x2 z1 z2 z3 v1 v2 v3 v4...

First, if I understand the manual correctly (which I probably don't), the
reshape command treats x3 above as a missing observation. The manual says
(p. 393): "Missing variables are treated like variables with missing
values". As I understand it, however, x3 is not missing (as in attrition) -
it was just not included in the survey that particular year.

Should this concern me, or is it just a technicality that I can overlook?
More important, will reshape "solve" this case in point?

Second, must the variables be placed adjacant as above for reshape to work,
or can they be organized as:

y1 x1 z1 v1 y2 x2.... v4

Thanks in advance for any help,


Christer


*
*   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–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index