[R] help(arima) return value typo?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Aug 2 20:35:40 CEST 2004
On Mon, 2 Aug 2004, Rolf Turner wrote:
> Hiroyuki Kawakatsu wrote:
>
> > in ?arima (R-1.9.1), the return value component 'convergence' should
> > be 'code'?
>
> By my reading of the code of arima() --- yes, you're right.
>
> > (it's a pity there is no reliable way to check return value documentation
> > consistency with the code, or is there?)
>
> Well, looking at the code is ***pretty*** reliable!
Depends if the reader understands the code, of course. See below.
> BTW: R core might like to note that while I was looking at the code
> I noticed the following lines:
>
> .
> .
> .
> trarma <- .Call("ARIMA_transPars", coef, arma, FALSE,
> PACKAGE = "stats")
> mod <- makeARIMA(trarma[[1]], trarma[[2]], Delta, kappa)
> if (ncxreg > 0)
> x <- x - xreg %*% coef[narma + (1:ncxreg)]
> ------> arimaSS(x, mod)
> val <- .Call("ARIMA_CSS", x, arma, trarma[[1]], trarma[[2]],
> as.integer(ncond), TRUE, PACKAGE = "stats")
> sigma2 <- val[[1]]
> .
> .
> .
>
> The line indicated above seems to be hanging there, doing nothing.
> Should ``arimaSS(x, mod)'' get assigned to some variable here, or
> should that line simply be removed? (If the former, it's a bug;
> if the latter, a typo.)
There are other possibilities, and it is neither.
Hint: you don't think all unassigned calls to options() or
library.dynam() are bugs or typos, do you?
--
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
More information about the R-help
mailing list