[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: a possible - foreach - question?

From   "Carlo Lazzaro" <>
To   <>
Subject   st: a possible - foreach - question?
Date   Tue, 14 Oct 2008 10:50:25 +0200

Dear Statalisters,
I have three variables (a; b; C with 10,000 observations each) in long
For each value of a I would like to obtain the following one:

(a1 * b1) - c1

Repeat the above reported would-be 10,000 times (i.e., from a1 to a10,000)

Create a new variable d in which the mean of each one of the 10,000
iterations are stored and can be displayed.

I suppose there's way of doing this with Stata 9.2/SE, but I cannot figure
out the proper syntax.

Thanks a lot for your kindness and for your time.

Kind Regards,


*   For searches and help try:

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