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

Re: st: cumulative average moving through time


From   Daniel Lawson <dlawson1@nd.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: cumulative average moving through time
Date   Wed, 6 Oct 2004 15:38:52 -0500

The command-line ``bysort pid (ob):gen cave = sum(calc)/ob'' was exactly the sort of thing I had in mind when I said that I was sure there was a more elegant way to produce the results. I ran both sets of code, and both produce the same values for `cave'.

Daniel Lawson

On Oct 6, 2004, at 2:59 PM, Daniel Egan wrote:


Oh, and thanks. I did not get to try Dan Lawson's code.
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index