Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

R: Re: st: moving-window products


From   "[email protected]" <[email protected]>
To   <[email protected]>
Subject   R: Re: st: moving-window products
Date   Mon, 14 Feb 2011 13:32:10 +0100 (CET)

That works, thanks Nick!



>----Messaggio originale----
>Da: [email protected]
>Data: 14-feb-2011 11.22
>A: <[email protected]>
>Ogg: Re: st: moving-window products
>
>The usual trick for moving products is exp(sum(ln()). Clearly that
>won't work if any of your values are zero or negative. Otherwise, take
>logarithms, get the moving sum, and exponentiate.
>
>Nick
>
>On Mon, Feb 14, 2011 at 10:15 AM, [email protected]
><[email protected]> wrote:
>
>> I have a panel dataset and I would like to compute moving-window products. 
For
>> example, for each unit and time, I would like to have the product of the 
last
>> 10 observations.
>>
>> A useful module for rolling statistics is "mvsumm", which gives rolling
>> summary statistics. Do you know if there is an analogous command which 
also
>> computes the product?
>*
>*   For searches and help try:
>*   http://www.stata.com/help.cgi?search
>*   http://www.stata.com/support/statalist/faq
>*   http://www.ats.ucla.edu/stat/stata/
>


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index