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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: rearranging cross-section to longitudinal cross-section


From   Ladislav Kozak <ladislav.kozak@sociology.ox.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: rearranging cross-section to longitudinal cross-section
Date   Sun, 13 Nov 2011 19:40:29 +0000

Hi,

Unless there is something that I am missing, reshape command will do
this (http://www.stata.com/help.cgi?reshape)

It seems like you want to go from wide to long so:


                reshape long ... (variables), i(i) j(j)


On Sun, Nov 13, 2011 at 7:19 PM, Kristen Shorette <kshorett@uci.edu> wrote:
> Hi All,
>
> I have a data set that's arranged as:
>
>       year1  year2 year3...
> case1
> case2
> case3...
>
> and I'd like to rearrange it to look like:
>
> case1 year1
> case1 year2
> case1 year3
> case2 year1...
>
> Is there a way to automatically do this in Stata? (I'm on version 10)
>
> Thanks,
> Kristen
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>



-- 
Ladislav Kozak
Doctoral Candidate
Department of Sociology
University of Oxford
CV: http://users.ox.ac.uk/~scro1371/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index