The same variables cause ARIMA produce different results

72 Views Asked by At

I have two identical set of variables:

np.all([
   np.all(a.y == b.y),
   np.all(a.X == b.X),
   np.all(a.o == b.o),
   type(a.y) == type(b.y),
   type(a.X) == type(b.X),
   type(a.o) == type(b.o)]
)

produce True (see the attached screenshot).

However, in the first case ARIMA is fitted, while in the second it ends up with an Error (see screenshot). Why does it happen?

Screenshot: Screenshot from Jupyter Notebook

1

There are 1 best solutions below

0
On

I finally found statsmodels package makes use of base array of numpy array (ndarray.base), which can lead to distorted results. To avoid this effect, we need to feed both endogenous and exogenous variables as array.copy(). Hope it helps other researchers.`