[R-SIG-Finance] Bug in fArma: does not accept variables as input

Stefan Grosse singularitaet at gmx.net
Wed Dec 3 09:43:00 CET 2008


Hi,

I believe I found a bug in the r-metrics' fArma package. armaFit does
not accept variable input:

library(fArma)
x = armaSim(model = list(ar = c(0.5, -0.5), ma = 0.1), n = 1000)
# direct parameter input works:
fit1 = armaFit(~ arma(2, 1), data = x)
print(fit1)
# parameters via variables do not work:
ar.ord=2
ma.ord=1
fit2 = armaFit(~ arma(ar.ord, ma.ord), data = x)
# error!:
Error in if (!is.numeric(order) || length(order) != 3 || any(order < 0))
stop("'order' must be a non-negative numeric vector of length 3") :
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In armaFit(~arma(ar.ord, ma.ord), data = x) :
  NAs introduced by coercion
2: In armaFit(~arma(ar.ord, ma.ord), data = x) :
  NAs introduced by coercion

It works of course with the arima function of R:

fit3=arima(x,order=c(ar.ord,0,ma.ord))
fit3

I tried the newest cran package 270.74 of fArma and the newest r-forge
package which is 290.75. I am using R-2.8.0 on Win Vista Business.

I tried to find a possibility to file a bug on r-forge but was not
successful (Where can I file bugs?)

Regards
Stefan Grosse



More information about the R-SIG-Finance mailing list