Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: How to collape across two variables?


From   "dnurhan" <dnurhan@eng.marmara.edu.tr>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: How to collape across two variables?
Date   Wed, 18 Jul 2007 18:19:06 +0300

My data set looks like:

ID $AMOUNT TYPE
4001 $10 1=food
4001 $25 1=food
4001 $12 2=clothing
4001 $33 2=clothing
4002 .... ...
4002 .... ...

i would like to sum across both $AMOUNT & TYPE, to get each family's spending on food and clothing as

ID FOOD CLOTHING
4001 $35 $45
4002 .... .....

How do i do this?? (i am new to the list, looked at the manuals but they explain using "collapse" across only one
variable)

Best regards, nurhan

Nurhan Davutyan
Industrial Engineering Dept.
Marmara University
Goztepe Campus
34722 Kadikoy/Istanbul
Turkey
Phones: +/90/(0)216 349 77 28 home
+/90/(0)216 330 37 34/213 work
+/90/(0)555 339 05 31 mobile

Web Page:
http://posta.marmara.edu.tr/~ndavutyan/fbe/index.htm
http://www.eng.marmara.edu.tr/english/ie/index.html

E-mail: dnurhan@eng.marmara.edu.tr
dnurhan@hotmail.com


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