Statalist


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

Re: st: running sum restarting after missing value


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

Erasmo--
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, <[email protected]> wrote much that bears repeating, but:
<snip>
Cox, N.J. 2007. Identifying spells. Stata Journal 7(2): 249-265.
<snip>
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:

http://www.stata.com/support/faqs/res/statalist.html#spell
*
*   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