Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: special sum


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: special sum
Date   Sun, 12 Dec 2004 17:52:11 -0000

Depending on what your subscripts mean, this 
could be the sum given by the -sum()- 
function or the sum given by -egen, rsum()-. 

See the results of 

. help sum()

and 

. help egen 

Nick 
[email protected] 

[email protected]
 
> I have a variable xi and I wish to generate a new variable
> 
> yi=sum(xj) for j=(1)...(i-1)
 

*
*   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