Bookmark and Share

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: moving average of the last 55 time points


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: moving average of the last 55 time points
Date   Mon, 30 Jan 2012 10:13:40 +0100

On Mon, Jan 30, 2012 at 9:45 AM, Juan Fernandez  wrote:
> I am trying to obtain moving averages that take into account the
> previous 55 time points (in this case, years) in a panel data setting.
<snip> -tssmooth ma, window()- doesn't do it  either because it is
> limited in the number of lags it can consider.

That limit is explained in the help-file:

        #l specifies the number of lagged terms to be included,
        0 < #l < one-half the number of observations in the sample.

This makes sense to me. If you specified a larger lag than the window
cannot move, which is a fundamental characteristic of a _moving_
average. The logic of smoothers is that you do _not_ want to use all
information, but only information from observations that are close.
The definition of "close" determines your tradeoff between "smooth but
wrong" and "true but rough".

Hope this helps,
maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index