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

Re: st: running sum restarting after missing value

From   "Austin Nichols" <>
Subject   Re: st: running sum restarting after missing value
Date   Fri, 20 Jul 2007 10:44:59 -0400

To produce the output incorrectly identified in the original example
as a running sum (instead a total by spell):

tsset id year
ssc inst tsspell, replace
tsspell, cond(!missing(var1))
egen sum_var1=total(var1), by(id spell)

On 7/20/07, <> wrote much that bears repeating, but:
Cox, N.J. 2007. Identifying spells. Stata Journal 7(2): 249-265.
The connections between this work on "identifying spells" and work of
any other past or present students of Hogwarts Academy is allusive,
elusive and illusory.

By the way, it seems that you have yet to read to the end of the
Statalist FAQ:
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index