Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: problems with reshaping dataset.


From   natasha agarwal <agarwana2@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: problems with reshaping dataset.
Date   Tue, 27 Nov 2012 17:02:10 +0000

Dear Stata users,

I have a dataset which looks like:

country v1_80 v2_80...v59_80 v1_00 v2_01 v3_01
ALB         x          x           x           x         x          x

I use the reshape long comand, but it does not reshape the variables
where the year is 00, 01.

Besides, I want to reshape the dataset like

country   year        variable
ALB         1980          v1
ALB          1980          v2
ALB          2000          v1
ALB           2001          v1

I have tried variants of reshape command but have failed to achieve
such a structure of my dataset.

I would be grateful if anybody could help me ?

Thanks,
Natasha
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index