[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: Moving Average
----- Original Message -----
From: "Clara Soh" <firstname.lastname@example.org>
Sent: Friday, May 09, 2003 3:53 PM
Subject: st: Moving Average
> Is there a way to force Stata to calculate a moving average using an EVEN
number? I am trying to calculate ma() over several years, and a 12 month
moving ave. makes the most sense.
I take you are using -egen-, have you looked at -tssmooth_ma-. Something
like:tssmooth ma foo_ma = foo, window(12) would produce a 12 lagged period
moving average. The window option allows you to vary the lags and the
There are also several ideas for calculating moving averages in the FAQ at
http://www.stata.com/support/faqs/stat/moving.html that might be useful.
* For searches and help try: