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

Re: st: Re: Reshape


From   Ernest Berkhout <[email protected]>
To   [email protected], <[email protected]>
Subject   Re: st: Re: Reshape
Date   Tue, 10 Feb 2004 15:26:49 +0100

----- Original Message -----
From: <[email protected]>
To: <[email protected]>
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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index