You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When estimating an ARIMAX(p, 1, q), Stata differences also the exog variables. The statsmodels version does not difference the exog.
In order to replicate the behavior of Stata, we need to diff the exog ourselves.
Note: When we diff, then we need to preserve the initial observation which is nan, since it will be truncated during estimation.
Numpy np.diff drops the invalid initial observation. pandas DataFrame diff keeps the initial observation as missing.
The following replicates the Stata results. (I'm using ndarrays in the model, but the same should work with pandas.
When estimating an ARIMAX(p, 1, q), Stata differences also the
exog
variables. The statsmodels version does not difference theexog
.In order to replicate the behavior of Stata, we need to
diff
the exog ourselves.Note: When we diff, then we need to preserve the initial observation which is
nan
, since it will be truncated during estimation.Numpy np.diff drops the invalid initial observation. pandas DataFrame diff keeps the initial observation as missing.
The following replicates the Stata results. (I'm using ndarrays in the model, but the same should work with pandas.
The text was updated successfully, but these errors were encountered: