Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: cumulative sum in new variable

From   Christopher Baum <>
To   "" <>
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 Baum   |   Boston College Economics and DIW Berlin   |
An Introduction to Stata Programming   |
An Introduction to Modern Econometrics Using Stata   |

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index