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]
st: calculating a mean value using the rolling command
From
Nat Tharnpanich <[email protected]>
To
[email protected]
Subject
st: calculating a mean value using the rolling command
Date
31 Mar 2011 02:43:44 +0100
Dear all,
I would like to calculate rolling mean values of a variable in
overlapping time periods using rolling command in STATA. I typed
rolling, window(20) clear: egen avg = mean(var name)
However, STATA returned r(N) which is the number of years in the sample
rather that the mean value I wanted. What have I done wrong???
Thank you so much.
Nat
*
* 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/