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

st: running product

From   "Hugh Gross" <[email protected]>
To   <[email protected]>
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.


a    b
1    .
2    2
3    6
4    24

Many thanks.

Hugh Gross
[email protected]

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index