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]
Re: st: rollreg
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: rollreg
Date
Tue, 1 May 2012 18:25:02 +0100
I am not sure how much faith to put in standard deviations based on 3
values, but you don't need the looping of -rolling- here
local y roe
gen sd = sqrt(((`y'^2 + L.`y'^2 + F.`y'^2) / 3) - ((`y' + L.`y' + F.`y')/3)^2)
subject to whether you prefer a different divisor.
Nick
On Tue, May 1, 2012 at 5:40 PM, "Fabian Schönenberger" <[email protected]> wrote:
> Dear Statalist
> In order to conduct moving standard deviations for the return on equity for my panel data I used the following command:
>
> rolling sd=r(sd), window(3) keep(cusip) clear: sum roe
>
> Data sample is quite large, ca. 250'000 yearly-observations, ca. 8'000 companies. Unfortunately, the command takes several hours to produce the output. Is there any other possibility to conduct moving standard deviations for unbalanced panel data?
*
* 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/