[R-SIG-Mac] NaN bug with arima() on Mac
Kuschnig, Nikolas
n|ko|@@@ku@chn|g @end|ng |rom wu@@c@@t
Mon Nov 22 14:29:51 CET 2021
Dear all,
There seems to be a small bug with `arima()` on Mac. For some very specific data
I get the following warning:
Warning message:
In log(s2) : NaNs produced
This seems to stem from `.Call(C_ARIMA_Like, x, Z, 0L, FALSE)` in the `armafn()`
objective function. This warning does not occur on Linux or Windows systems or
when using the `arima0()` function.
Below is an example that I hope reproduces (please excuse the dependency, I only
encountered it with this data, partly due to my lack of a Mac). Note that the
warning in question occurs during estimation, printing always induces a warning.
# install.packages("BVAR")
library("BVAR")
x <- fred_qd[1:243,
c("GDPC1", "PCECC96", "GPDIC1", "HOANBS", "GDPCTPI", "FEDFUNDS")]
x <- fred_transform(x, codes = c(4, 4, 4, 4, 4, 1))
Y <- as.matrix(x)[6:nrow(x), ]
ar <- apply(Y, 2, arima, order = c(5, 0, 0)) # Warning only on Mac
ar0 <- apply(Y, 2, arima0, order = c(5, 0, 0)) # No warning
Does anyone have any more information on this? Thanks for the help!
Best,
--
Nikolas Kuschnig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 695 bytes
Desc: This is a digitally signed message part
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20211122/96b76cb8/attachment.sig>
More information about the R-SIG-Mac
mailing list