Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index