Skip to content

Commit

Permalink
revert thinko in c87520
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87536 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
maechler committed Jan 7, 2025
1 parent f2c6522 commit a7bff54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/library/stats/R/arima.R
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,14 @@ arima <- function(x, order = c(0L, 0L, 0L),
}
}
trarma <- .Call(C_ARIMA_transPars, init, arma, transform.pars)
mod <- makeARIMA(trarma[[1L]], trarma[[2L]], Delta, kappa, SSinit) # for armafn()
res <- if(no.optim)
list(convergence = 0, par = numeric(),
value = armafn(numeric(), as.logical(transform.pars)))
else {
mod <- makeARIMA(trarma[[1L]], trarma[[2L]], Delta, kappa, SSinit)
else
optim(init[mask], armafn, method = optim.method,
hessian = TRUE, control = optim.control,
trans = as.logical(transform.pars))
}
if(res$convergence > 0)
warning(gettextf("possible convergence problem: optim gave code = %d",
res$convergence), domain = NA)
Expand Down
2 changes: 2 additions & 0 deletions tests/reg-tests-1e.R
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,9 @@ if(length(iLA) && nzchar(La_version())) { cat("sessionInfo - La_* checking: ")

## arima(*, seasonal = <numeric>)
(m <- tryCmsg( arima(presidents, order=c(2,0,1), seasonal=c(1, 0)) ))
mlnx <- arima(lynx, order = c(0,1,0))
stopifnot(exprs = {
all.equal(1922.636, mlnx$aic, tolerance = 1e-6) # failed for days
grepl("'seasonal'", m, fixed=TRUE)
!englishMsgs ||
grepl("must be a non-negative numeric vector", m, fixed=TRUE)
Expand Down

0 comments on commit a7bff54

Please sign in to comment.