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

st: help on expanding data


From   "MITRA PINAKI (MAR1PXM)" <mar1pxm@ups.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: help on expanding data
Date   Fri, 18 Mar 2005 06:37:10 -0500

Hello All,

I have a data set like the following:
Customer	Services	Rate
xx1		1DA		.50
xx1		2DA		.75
xx2		ALL		.30
xx3		2DA		.40
xx3		3DS		.60
and so on.

The maximum combination of services can be (1DA, 2DA, 3DS) and when the
services is "ALL", I need the data set to be expanded in 1DA, 2DA, 3DS
with the same rate. So for customer xx2, it needs to look like:

Customer	Services	Rate
xx2		1DA		.30
xx2		2DA		.30
xx2		3DS		.30
while all other information for other customers remains same. Can anyone
please provide me in help on this?

Thanks,
Pinaki Mitra


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index