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

st: running product


From   "Hugh Gross" <hughgross@attbi.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: running product
Date   Fri, 4 Apr 2003 11:58:59 -0800

Is there an easy way in Stata to create a running product similar to the
ease with which one can create a running sum using the sum command?

In the example below, variable "a" would be the existing data and variable
"b" would be the desired result.

Data:

a    b
1    .
2    2
3    6
4    24

Many thanks.

Hugh Gross
hughgross@attbi.com

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