Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Rehape help


From   Phil Clayton <[email protected]>
To   [email protected]
Subject   Re: st: Rehape help
Date   Mon, 6 Feb 2012 22:36:58 +1100

reshape wide Var1, i(Lab) j(startyear)

Phil

On 06/02/2012, at 10:21 PM, Tim Evans wrote:

> I'm using Stata 11.2 and want to use reshape to change the layout of my data and I'm struggling a bit. My current data look like this:
> 
> Var1       startyear              Lab         
> 0.6692   1986                       1 1          
> 0.7734   1986                       2 1          
> 0.5548   1986                       3 1          
> 0.6590   1987                       1 1          
> 0.7526   1987                       2 1          
> 0.5972   1987                       3 1          
> 
> What I want to have is 
> 
> Lab         Var1Startyear1986           Var1Startyear1987
> 1 1          0.6692                                   0.6590
> 2 1          0.7734                                   0.7526
> 3 1          0.5548                                   0.5972
> 
> I've tried reshape with a variety of different syntax, but cant seem to reproduce how I want the data.
> 
> Any help gratefully received.
> 
> Best wishes
> Tim
> _DISCLAIMER:
> This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.
> 
> *
> *   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/


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index