Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Rolling Stdev through an unbalanced panel


From   Zachary Harrison <[email protected]>
To   [email protected]
Subject   st: Rolling Stdev through an unbalanced panel
Date   Fri, 5 Jan 2007 09:54:20 -0800 (PST)

Hi all-

I have a monthly time series with say 30 months and
50-100 countries per month.  I have GDP for each
observation.

For a window of 24 months, I wish to calculate the
standard deviation of all observations within the
window.  So in month 24 I want my variable to be the
standard deviation of the GDPs of all countries from
months 1-24.  In month 25 I want the stdev of GDP for
all countries from months 2-25, etc.

I have played with mvsumm but it seems to calculate a
stdev for each country over the trailing 24 months,
while the variable I am after will have a unique value
per date, not per date/country combination.

Any ideas would be greatly appreciated.

Thank you!

Zachary Harrison

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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