Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

RE: st: Looping Enquiry

From   Valerie Orozco <>
To   "" <>
Subject   RE: st: Looping Enquiry
Date   Thu, 29 Sep 2011 13:55:22 +0000

Dear George,

The first idea that comes in my mind is to transform the problem.
If you think in a sum rather than in a product it will be easier to program it.
Indeed,  since the logarithm of a product is the sum of the logarithms, you can use it to program you formula easier in Stata.

score	transform to log	generate a cumulative sum	transform to exponential to have what you want 
x1	lnx1	                                         lnx1	                                                  x1
x2	lnx2	                                         lnx1+lnx2	                                                     x1x2
x3	lnx3	                                                  lnx1+lnx2+lnx3	              x1x2x3

Hope this helps.


Valérie OROZCO
Toulouse School of Economics (INRA-GREMAQ)
21, allée de Brienne
F-31000 Toulouse, France

MF 219
+33 5 61 12 85 91

*   For searches and help try:

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