Shouldn't collapse work?
collapse (sum) hotel, by(project)
I expect this to give you the total amount spent on hotels by project.
Collapse, from what I remember, does not care that the project identifier is
not unique; in fact, it's the job of this command to give you a unique
figure per each project.
Gabi
-----Original Message-----
From: Rodrigo Brice�o [mailto:[email protected]]
Sent: Tuesday, May 06, 2003 2:21 PM
To: Statalist
Subject: st: a special summarize
Hi, statalisters. I'm working with Stata 7 and I need your help to solve a
problem. I have a table with data on expenditures of several projects. The
identifiers of the projects are string. The expenditures are hotel,
transportation, and several more categories.
Which command can I use in order to obtain a summary table with the total of
expenditures on each category for each project.
The summary is needed because the trips were made by different people in
different periods. So, each identifier appears more than once in some cases.
Thanks
Rodrigo Brice�o
*
* 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/
*
* 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/