time series in R

Martyn Plummer plummer@iarc.fr
Tue, 20 Jul 1999 11:17:51 +0200 (CEST)


On 19-Jul-99 Prof Brian D Ripley wrote:
> Time Series functions in R
> ==========================
> If Martyn and Adrian are agreeable, I will start a library(ts) in the
> 0.65 version. I will put in this:
> 
> the ts class and methods (maybe in due course these should be removed
> from the base package?)

Some of the ts class stuff is implemented in the C code of the base
library. I'm not sure you can separate this.

I also suggested an "na.omit" method for time series - which would be
used by many of the time series functions. Martin has made na.omit()
and na.fail() generic so this is possible now.

> datasets from MASS, tseries
> 
> lag, deltat, cycle
> filter

I think there is some functional overlap between filter() and convolve(),
which now has a type="filter" option. I'm not sure convolve() needs this
if there is a filter() function.

> acf from bats, augmented by ideas from tseries.

I updated acf() in bats_0.1-3.tar.gz (now on CRAN) to use FFT instead,
after seeing its rather embarrassing performance.

> spectrum, spec.pgram from bats  (after looking at tseries hard)

Adrian's spectrum() function allows a wider range of kernel smoothers
and it would be nice to keep this.  Since spectrum() is just a wrapper
function anyway, it should be possible to do this, while keeping the
S-PLUS compatible interface.

> spec.taper
> cpgram from MASS
> 
> ar.yw from bats  (although that probably needs to be moved to
> C/Fortran, and I may special-case the univariate case to use code I
> have for that).

I haven't tried very hard to make my code efficient, as you can see,
concentrating instead on getting something that works like the S-PLUS
version. Much of the work involved trying to get the same answer as
S-PLUS, and when that wasn't possible, trying to work out what S-PLUS
was doing wrong (see the COMPAT file).

I think the multivariate version would be harder to implement in C.
I will see if I can speed the R code up.

I have been looking at Burg's algorithm and I think I can implement
this now, if you want.

> As the feature-freeze for 0.65 is probably about 2-3 weeks away, we
> ought to concentrate on getting the basic stuff (bats-like) in first.
> 
> How does that sound as a plan?

Sounds good.

Martyn
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._