s-news
[Top] [All Lists]

Re: moving median in S without looping

To: "Loecher, Markus" <Markus.Loecher@scr.siemens.com>
Subject: Re: moving median in S without looping
From: Eric Zivot <ezivot@u.washington.edu>
Date: Tue, 21 Jan 2003 13:13:43 -0800 (PST)
Cc: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
In-reply-to: <20b20848358cda44ab6a2e277d2e1c5ed66bc5@postoffice.scr.siemens.com>
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
> 



<Prev in Thread] Current Thread [Next in Thread>