[R-SIG-Mac] NaN bug with arima() on Mac
Simon Urbanek
@|mon@urb@nek @end|ng |rom R-project@org
Mon Nov 22 23:21:12 CET 2021
Nikolas,
what makes you think it is a bug? It is an optimization process, so the objective function is free to produce NaN for unsuitable parameters so it can steer the optimization away from such areas.
Cheers,
Simon
> On Nov 23, 2021, at 2:29 AM, Kuschnig, Nikolas <nikolas.kuschnig using wu.ac.at> wrote:
>
> 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
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
More information about the R-SIG-Mac
mailing list