in ?arima (R-1.9.1), the return value component 'convergence' should be 'code'? (it's a pity there is no reliable way to check return value documentation consistency with the code, or is there?) h. ---------------------------------- Hiroyuki Kawakatsu School of Management and Economics 25 University Square Queen's University, Belfast Belfast BT7 1NN Northern Ireland United Kingdom Tel +44 (0)28 9097 3290 Fax +44 (0)28 9033 5156
On Mon, 2 Aug 2004, Hiroyuki Kawakatsu wrote:> > in ?arima (R-1.9.1), the return value component 'convergence' should be > 'code'?Yes. Not sure it says anywhere than R-help is the appropriate place for this and R-devel is better so I've moved it there.> (it's a pity there is no reliable way to check return value documentation > consistency with the code, or is there?)There is not as the result can vary by input. But you could try to contribute one!
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! 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.) cheers, Rolf Turner rolf at math.unb.ca
Brian Ripley wrote:> Hint: you don't think all unassigned calls to options() or > library.dynam() are bugs or typos, do you?No I don't actually. But I see them as operating in a context in which ``side effects'' are desirable. I of course considered the possibility that the call ``arimaSS(x,mod)'' was there for an induced side effect, but since that sort of thing is generally considered very bad R programming I dismissed the notion out of hand. cheers, Rolf Turner