[R] Aggregating frequency of irregular time series

Ivan Alves papucho at mac.com
Fri Mar 26 22:35:27 CET 2004


To the extent that my daughter, work and sports activities leave me  
some time, for sure I will put together a function like AggregateSeries  
(maybe within the its package)!  As for cointegration, much less likely  
to happen, especially in light of the development of the urca package.  
The days of sleepless nights are long over for me, I am afraid. (just  
do statistics as a hobby, really)

Kind regards,

Ivan
_______________________
Ivan Alves
mailto://papucho@mac.com
On 25 Mar 2004, at 23:36, Liaw, Andy wrote:

>> From: Ivan Alves
>>
>> Thank you very much Brian.  Indeed, by looking at ?tapply()
>> this would
>> do the job for regular time series (whose data-time INDEX renders
>> itself naturally for " bundling data" in regular groups).
>> However, with
>> irregular time series the story is different, as some careful
>> "bundling" is necessary prior to applying tapply(). Whereas this may
>> not be a problem for months (creating strings month-year), it
>> would be
>> for weeks, for instance.  Also the object returned would need to be
>> converted again to a time series object with additional
>> function calls.
>> Furthermore, the function AggregateSeries() provides additional
>> functionality, such as creating moving averages, rolling variances,
>> minima and maxima, all with options to the same function call. I take
>> from your response that there is no easy way out (an already existing
>> function), and that some programming will be required.
>
> So can we count on you to contribute this (and the cointegration that  
> you
> requested in another post)?  You did read the message at the R startup
> screen, didn't you?
>
> Best,
> Andy
>
>> Kind regards,
>>
>> Ivan
>> _______________________
>> Ivan Alves
>> mailto://papucho@mac.com
>> On 25 Mar 2004, at 22:51, Prof Brian Ripley wrote:
>>
>>> R itself has no support for irregular time series, but it
>> does have an
>>> aggregate method for regular ones.  You need to look into whichever
>>> package is handling irregular time series.  However, it seems to me
>>> that
>>> this is not a time series problem at all: you have a set of
>>> observations
>>> whose indices are data-times, and tapply() will do the job.
>>>
>>> On Thu, 25 Mar 2004, Ivan Alves wrote:
>>>
>>>> S-Plus has the function AggregateSeries() whose name is self
>>>> explanatory.  For instance one can derive monthly series from daily
>>>> ones by specifying end-of-period, averages, sums, etc.  I
>> looked for a
>>>> similar function in the packages "its" and "tseries", but found
>>>> nothing.  I also help.searched() for aggregate to no avail.  Would
>>>> anybody be so kind to point me in the right direction?
>>>
>>> --  
>>> Brian D. Ripley,                  ripley at stats.ox.ac.uk
>>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>>> University of Oxford,             Tel:  +44 1865 272861 (self)
>>> 1 South Parks Road,                     +44 1865 272866 (PA)
>>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>>
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide!
>> http://www.R-project.org/posting-guide.html
>>
>>
>
>
> ----------------------------------------------------------------------- 
> -------
> Notice:  This e-mail message, together with any attachments, contains  
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,  
> New Jersey, USA 08889), and/or its affiliates (which may be known  
> outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD  
> and in Japan, as Banyu) that may be confidential, proprietary  
> copyrighted and/or legally privileged. It is intended solely for the  
> use of the individual or entity named on this message.  If you are not  
> the intended recipient, and have received this message in error,  
> please notify us immediately by reply e-mail and then delete it from  
> your system.
> ----------------------------------------------------------------------- 
> -------




More information about the R-help mailing list