I can use HC and HAC without issues in the OLS framework in statsmodels. Can somebody tell me how to use it in SARIMAX framework?
import statsmodels.api as sm
res_ols = sm.OLS(y, X).fit(cov_type='HC3')
Coef. Std.Err. z P>|z| [0.025 0.975]
---------------------------------------------------------------------
Intercept -0.0001 0.0014 -0.0756 0.9398 -0.0028 0.0026
oney 0.7919 0.0166 47.7080 0.0000 0.7594 0.8245
from statsmodels.tsa.statespace.sarimax import SARIMAX
res_sarimax = SARIMAX(y,X, order=(0,0,0)).fit()
coef std err z P>|z| [0.025 0.975]
------------------------------------------------------------------------------
Intercept -0.0001 0.001 -0.079 0.937 -0.003 0.003
oney 0.7919 0.003 232.920 0.000 0.785 0.799
sigma2 0.0048 8.07e-05 58.906 0.000 0.005 0.005
You can see in the outputs above that the coefficients are the same but the std err are much more constrained in OLS with heteroskedasticity correction applied. How can I impose these correction in SARIMAX version.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…