From brahm@alum.mit.edu  Thu Apr  4 00:02:21 2002
From: brahm@alum.mit.edu (David Brahm)
Date: Wed, 3 Apr 2002 18:02:21 -0500
Subject: [Rd] predict.Arima fails when x is not a time-series
Message-ID: <15531.35325.783406.290369@gargle.gargle.HOWL>

I'm playing with predict.Arima in the 3/19/02 development snapshot of R-devel.
The following produces an error message because x is not of class "ts":
  R> x <- rnorm(20)
  R> obj <- arima(x, c(2,0,0))
  R> predict(obj)
     Error in round(x, digits) : Non-numeric argument to mathematical function

Granted the documentation for arima says x should be a time-series, but why not
accommodate simple vectors?  I think it would suffice to change this line:
  xtsp <- tsp(data)
in predict.Arima to this:
  xtsp <- tsp(hasTsp(data))

Also, a minor documentation typo: the help file for predict.Arima refers to the
function as "predict.arima" at one point.
-- 
                              -- David Brahm (brahm@alum.mit.edu)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] predict.Arima fails when x is not a time-series
David Brahm