Hey Ken and Simon, Good point on the 'bug', I guess it's rather unexpected behaviour since it does not occur on other systems. The Hessian issue causing system dependency makes a lot of sense. In that case I guess the system differences can't feasibly be eliminated. Should I document this system difference as a 'bug' or the like somewhere? In my case I'm now just converting the warning to a message (just need sigma + users can provide values instead).
Thanks for the help! -- Nikolas On Tue, 2021-11-23 at 10:19 +1100, Ken Beath wrote: > Looking at the returned object there are problems with some of the standard > errors which are NaN for both aima and arima0. This usually indicates that the > Hessian doesn’t have the required form. This can be very dependent on the > system. It also probably means that the model you are fitting is over > parameterised. > > Ken > > > On 23 Nov 2021, at 9:21 am, Simon Urbanek <simon.urba...@r-project.org> > > wrote: > > > > > > 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.kusch...@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@r-project.org > > > https://stat.ethz.ch/mailman/listinfo/r-sig-mac > > > > _______________________________________________ > > R-SIG-Mac mailing list > > R-SIG-Mac@r-project.org > > https://stat.ethz.ch/mailman/listinfo/r-sig-mac >
signature.asc
Description: This is a digitally signed message part
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac