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

Re: st: Re: Reshape


From   Ernest Berkhout <ernestb@seo.fee.uva.nl>
To   statalist@hsphsun2.harvard.edu, <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Re: Reshape
Date   Tue, 10 Feb 2004 15:26:49 +0100

----- Original Message -----
From: <absc11@bangor.ac.uk>
To: <statalist@hsphsun2.harvard.edu>
Sent: Tuesday, February 10, 2004 3:04 PM
Subject: st: Reshape


> Dear statalisters,
>
> I have the following data format:
>
> code country industry x1_90 x1_91 ... x1_99 x2_90 x2_91 ... x2_99 x3_90
etc
>  n1    UK      GEN      .     .   ...   .     .     .   ...   .     .
>  n2    SP      BIO      .     .   ...   .     .     .   ...   .     .
>  n3    NL      SUP      .     .   ...   .     .     .   ...   .     .
And an (incorrect) suggestion was:

I think you should do
reshape long x1 x2...., i(code country industry) j(year 90-99)
That is why this goes wrong often: people (including myself) sometimes forget to explicitly specify the underscores when reshaping from wide to long. The earlier suggestions by Nick & Edwin should work, though.



Ernest Berkhout
SEO Amsterdam Economics
University of Amsterdam

Room 3.08
Roetersstraat 29
1018 WB Amsterdam
The Netherlands

tel.:+ 31 20 525 1657
fax:+ 31 20 525 1686
http://www.seo.nl
===========================
A statistician: someone who insists
on being certain about uncertainty
===========================

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