Martyn Plummer wrote:> Dear Adrian,Hi Martin> > > Thank you for providing your time series library for R. I have been > working on a time series package myself, with help from Paul Gilbert. It > is called "bats" (doesn't stand for anything except possibly "basic time > series") and can be found in the devel directory on CRAN. > > The "bats" library was a collection of S-PLUS compatibile functions > that I needed for my "coda" package. With a little encouragement from > Paul, I split these off into a separate package and developed them into > more-or-less full clones of the S-PLUS functions. There are a couple of > functions yet unwritten (autoregressive estimation via Burg's algorithm > and spectral density estimation from fitting ar models) and this is the > only reason why the package is in the "devel" directory. > > I am writing to ask if you would like to merge the two libraries > together. The primary design goal of bats is compatibility with S-PLUS,Even if I would like to, it would not be easy for me because I don't have access to any S-PLUS. To the R developpers: Is that a primary design goal?> > which may not be what you want. In any case, both libraries are GPL so > you are free to use any of the code. Please have a look at bats and > tell me what you think. > > MartynI compared the acf functions of both "bats" and "tseries":> x<-rnorm(10000) > library(bats) > x<-rnorm(10000) > system.time(a<-acf(x,1000))[1] 15.70 0.02 31.00 0.00 0.00> library(tseries) > system.time(a<-acf(x,1000,pl=F))[1] 0.29 0.00 1.00 0.00 0.00>I think, to achieve a better performance you should avoid loops of the order of the length of a usual data set. It makes your routines very slow. Though I think we should here some opinions about the design of a time series library and then we can discuss about merging any parts or splitting some programming work for THE R time series library. Thanks Adrian -- Adrian Trapletti, Vienna University of Economics and Business Administration, Augasse 2-6, A-1090 Vienna, Austria Phone: ++43 1 31336 4561, Fax: ++43 1 31336 708, Email: adrian.trapletti@wu-wien.ac.at -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 15 Jul 1999, Adrian Trapletti wrote:> Martyn Plummer wrote: > > > Dear Adrian, > > Hi Martin > > > > > > > Thank you for providing your time series library for R. I have been > > working on a time series package myself, with help from Paul Gilbert. It > > is called "bats" (doesn't stand for anything except possibly "basic time > > series") and can be found in the devel directory on CRAN. > > > > The "bats" library was a collection of S-PLUS compatibile functions > > that I needed for my "coda" package. With a little encouragement from > > Paul, I split these off into a separate package and developed them into > > more-or-less full clones of the S-PLUS functions. There are a couple of > > functions yet unwritten (autoregressive estimation via Burg's algorithm > > and spectral density estimation from fitting ar models) and this is the > > only reason why the package is in the "devel" directory. > > > > I am writing to ask if you would like to merge the two libraries > > together. The primary design goal of bats is compatibility with S-PLUS, > > Even if I would like to, it would not be easy for me because I don't have > access to any S-PLUS. > > To the R developpers: Is that a primary design goal?One design goal for one library.> > > > which may not be what you want. In any case, both libraries are GPL so > > you are free to use any of the code. Please have a look at bats and > > tell me what you think. > > > > Martyn > > I compared the acf functions of both "bats" and "tseries": > > > x<-rnorm(10000) > > library(bats) > > x<-rnorm(10000) > > system.time(a<-acf(x,1000)) > [1] 15.70 0.02 31.00 0.00 0.00 > > library(tseries) > > system.time(a<-acf(x,1000,pl=F)) > [1] 0.29 0.00 1.00 0.00 0.00 > > > > I think, to achieve a better performance you should avoid loops of the > order of the length of a usual data set. It makes your routines very slow. > > Though I think we should here some opinions about the design of a time > series library and then we can discuss about merging any parts or splitting > some programming work for THE R time series library.I have been promising to do this for some time (indeed, promised Adrian to do so). Let me try to do some work on this and come to a proposal shortly. Brian -- Brian D. Ripley, ripley@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 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Adrian (and everyone else), to the same topic, I've got a file "tseries-comments" five days old that I never got around polishing before sending to you :>> Thank you very much for the functionality ! >> >> - tsparam : not the best name for that class.. ??? >> >> ybnd : should be allowed to have EITHER length 1 of length = length(x) >> >> --> my patched version >> >> - plot.tsparam: use 'type = "h"' as default! >> >> - acf, pacf : >> >> are *one* function in S-plus, >> >> use 'plot = T', not 'pl = T' as argument >> (in line with several other R functions !) >> >> --> other small improvements... >> >> {including: instead of rep(0, nnn), use numeric(nnn) } >> >> --> my version >> [[ I'll send this in private to Adrian ]]As you see, some of these 5day old comments are in line with Martyn's (he is Martyn, I am Martin). A few thoughts : - Yes, we want to be S(-plus) compatible as long as it is not too hard or there are not good reasons against compatibility. Particularly, acf(), spec.pgram(), spectrum(), ar(), ar.yw() should have compatible argument names [at least for the important ones] to make it easy to many users moving from S to R (;-). - Of course, it is *the wise thing* to use FFT for acf -- for the case of no NAs.. [and I think the NA case should be handled as well, and for small no-NA series that straightforward method will probably be faster than FFT as well ]. - I'd very much appreciate if Martyn and you and Paul G. (and Brian and Ross and ... and me, we also have a few improvements on S-plus laying around here) could coordinate to produce ``the real'' time series package for R. - As a matter of fact, I hope that some of the functions would become part of "Core R" (such as e.g. "modreg" is base of "Core R"), since e.g., the availability of acf() should not depend on having a contributed package installed on top of "Core R". Thanks once more to all the "time series" coders ! Martin Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum SOL G1 Sonneggstr.33 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1086 <>< -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 15-Jul-99 Adrian Trapletti wrote:> Martyn Plummer wrote: >> I am writing to ask if you would like to merge the two libraries >> together. The primary design goal of bats is compatibility with S-PLUS, > > Even if I would like to, it would not be easy for me because I don't have > access to any S-PLUS.Oh.> To the R developpers: Is that a primary design goal?A delicate question. Some people have strong views on compatibility, but I think it is safe to say that compatibility with S considered a good thing as it makes it easier to port existing S code to R, and that on that basis incompatibilities are considered bugs, unless there is a good reason for doing something differently. However, here we are talking about the PLUS part of S-PLUS, for which there are fewer precedents, and it may even be good politics to do things differently.>> >> which may not be what you want. In any case, both libraries are GPL so >> you are free to use any of the code. Please have a look at bats and >> tell me what you think. >> >> Martyn > > I compared the acf functions of both "bats" and "tseries": > >> x<-rnorm(10000) >> library(bats) >> x<-rnorm(10000) >> system.time(a<-acf(x,1000)) > [1] 15.70 0.02 31.00 0.00 0.00 >> library(tseries) >> system.time(a<-acf(x,1000,pl=F)) > [1] 0.29 0.00 1.00 0.00 0.00 >> > > I think, to achieve a better performance you should avoid loops of the > order of the length of a usual data set. It makes your routines very slow.Ouch! I know that acf isn't very efficient, but on the other hand I have never wanted to calculate the acf to this order, and if I did I would certainly use fft too.> Though I think we should here some opinions about the design of a time > series library and then we can discuss about merging any parts or splitting > some programming work for THE R time series library. > > Thanks > > Adrian-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._