| ![](/includes/contimages/spacer.gif) |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: lagged summary statistics
It is indeed what I was looking for.
Shihe
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kit Baum
Sent: Friday, October 27, 2006 5:59 PM
To: [email protected]
Subject: st: lagged summary statistics
Shihe said
Does any one has a routine for lagged summary statistics of a time
series and would not mind to share? The "mvsumm" and "rolling" seem only
capable of calculating the not lagged statistics (Maybe I was wrong).
Maybe I'm missing something, but...
. webuse wpi1
. mvsumm wpi,gen(avgwpi) stat(mean) window(4) end
. gen lag4qtravg = L.avgwpi
(4 missing values generated)
would seem to create the lagged moving average of the variable.
Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* 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/
*
* 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/