Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: re: cumulative sum in new variable
From 
 
Christopher Baum <[email protected]> 
To 
 
"[email protected]" <[email protected]> 
Subject 
 
st: re: cumulative sum in new variable 
Date 
 
Mon, 18 Apr 2011 10:06:05 -0400 
<>
Rich said
1. use the -egen- command with the the total function
2. see -help format-
This is a bum steer, I'm afraid. The total function in egen does not produce a cumulative sum. The generate function sum() does that for a living. That's why StataCorp renamed egen sum() to egen total(), to reduce confusion between the two. In any case what you want is sum().
KIt
Kit Baum   |   Boston College Economics and DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming   |   http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata   |   http://www.stata-press.com/books/imeus.html
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/