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

st: Reorganize data in STATA


From   "MA V" <[email protected]>
To   [email protected]
Subject   st: Reorganize data in STATA
Date   Wed, 08 Dec 2004 02:34:38 +0000

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

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement

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