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

RE: st: Re: Reorganize data in STATA


From   "Ypma, Jelmer Yeb" <[email protected]>
To   <[email protected]>
Subject   RE: st: Re: Reorganize data in STATA
Date   Wed, 8 Dec 2004 20:04:57 -0800

-reshape long- should work. Could you give some more info about 
any manipulations you performed on the data after -reshape wide-?

Jelmer

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of MA V
> Sent: Wednesday, December 08, 2004 7:56 PM
> To: [email protected]
> Subject: RE: st: Re: Reorganize data in STATA
> 
> 
> Hi Michael,
> I tried going back to the initial table using
> reshape long
> but I am having no success...
> Do you have any suggestions?
> Thanks!
> MA
> 
> >From: "Michael Blasnik" <[email protected]>
> >Reply-To: [email protected]
> >To: <[email protected]>
> >Subject: st: Re: Reorganize data in STATA
> >Date: Tue, 7 Dec 2004 22:22:20 -0500
> >
> >check out -reshape-.  Something like:
> >
> >reshape wide price, i(week) j(product) string
> >
> >should do it.  You may first want to rename price to price_ 
> if you want the 
> >new price vars to be price_a price_b etc.. instead of pricea 
> priceb...
> >
> >Michael Blasnik
> >[email protected]
> >
> >
> >----- Original Message ----- From: "MA V" <[email protected]>
> >To: <[email protected]>
> >Sent: Tuesday, December 07, 2004 9:34 PM
> >Subject: st: Reorganize data in STATA
> >
> >
> >>Hi,
> >>I am using Stata 8.0 for Windows.
> >>My problem is the following:
> >>
> >>Suppose we have a list with product prices per week like this:
> >>
> >>Product  week  price
> >>a             1      $2
> >>a             2     $2.2
> >>...          ....      ...
> >>a             T       $2.1
> >>b             1      $3
> >>b             2     $2.8
> >>...          ....      ...
> >>b             T       $2.9
> >>
> >>(where we have only one price and week per product and the 
> number of weeks 
> >>- T- is the same for all products)
> >>
> >>Is it possible to create a table(file) where the number of 
> rows is the # 
> >>of weeks and the number of columns is the number of 
> products and we have 
> >>the prices series for each product listed "vertically"?, 
> i.e, something 
> >>like:
> >>
> >>     price_a    price_b  price_c
> >>1     $2            $3     ....
> >>2     $2.2         $2.8    ...
> >>...
> >>T      $2.1       $2.9   ....
> >>
> >>Is there an easy way to do this in STATA?
> >>I would really appreciate some help on this...
> >>Thanks,
> >>MA
> >>
> >
> >*
> >*   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/
> 
> _________________________________________________________________
> Don't just search. Find. Check out the new MSN Search! 
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
> 
> *
> *   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/
> 

--------------------

This email message is for the sole use of the intended recipient(s) and
may contain privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.



*
*   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