Dear Nick,
thanks as ever for your kindness and for your time.
Kind Regards,
Carlo
-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di Nick Cox
Inviato: venerd� 26 ottobre 2007 19.15
A: [email protected]
Oggetto: st: RE: Running different running sums
Sounds like
forval i = 1/30 {
gen cusum`i' = sum(x) in `i'/30
}
Nick
[email protected]
Carlo Lazzaro
I would like to run 30 running sums concerning the number of blood
tests
provided to a given set of patients with the data column reported below,
by
leaving one-out i per time. IOW, I would like to run a first running sum
with considering from i 1 to i 30; a second one including from i 2 to i
30,
a third including from i 3 to i 30 and so forth, until the last 30th
running
sum, in which i 29 and i 30 should be included.
I have tried - gen ALFA=sum(x) - but I have lost myself with imposing
different (and unsuccessful) conditions to make it work out. User's
guide
and programming were not helpful. Any hints welcomed as ever. Thanks a
lot
for your kindness and for your time. Kind Regards, Carlo.
*
* 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/
*
* 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/