Statalist The Stata Listserver


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

Re: st: how to creating a variable recording the sum of another variable by group in panel data?


From   "natalie chan" <[email protected]>
To   [email protected]
Subject   Re: st: how to creating a variable recording the sum of another variable by group in panel data?
Date   Sun, 20 May 2007 23:08:01 +0100

sorry for the silly question. I have just found that I can do this:

egen alloutput=total(output), by(industry year)

I did try this before but I put it as by(industry, year) and it didn't work.
*
*   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