In splus 6 and above, the function aggregateSeries may be used to computing a
rolling median of a timeSeries over a rolling window of length myWindow:
rollingMedians = aggregateSeries(myTimeSeries,fun=median,moving=myWindow)
aggregateSeries is a very powerful function that is not very well known or well
appreciated.
****************************************************************
* Eric Zivot *
* Associate Professor phone: 206-543-6715 *
* Department of Economics fax: 206-685-7477 *
* Box 353330 email: ezivot@u.washington.edu *
* University of Washington *
* Seattle, WA 98195-3330 *
* *
* www: http://faculty.washington.edu/ezivot *
****************************************************************
On Mon, 20 Jan 2003, Loecher, Markus wrote:
> Hello,
> does anyone know how to compute a moving median in Splus without using
> explicit looping ?
>
> Thanks so much,
>
> Markus
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
>
|