¿Errores estándar de Newey-West para OLS en Python?

Quiero tener un coeficiente y un error estándar de Newey-West asociado con él.

Estoy buscando la biblioteca Python (idealmente, pero cualquier solución de trabajo está bien) que pueda hacer lo que está haciendo el siguiente código R:

library(sandwich)
library(lmtest)

a <- matrix(c(1,3,5,7,4,5,6,4,7,8,9))
b <- matrix(c(3,5,6,2,4,6,7,8,7,8,9))

temp.lm = lm(a ~ b)

temp.summ <- summary(temp.lm)
temp.summ$coefficients <- unclass(coeftest(temp.lm, vcov. = NeweyWest))

print (temp.summ$coefficients)

Resultado:

             Estimate Std. Error   t value  Pr(>|t|)
(Intercept) 2.0576208  2.5230532 0.8155281 0.4358205
b           0.5594796  0.4071834 1.3740235 0.2026817

Obtengo los coeficientes y los asocio con errores estándar.

Veostatsmodels.stats.sandwich_covariance.cov_hac módulo, pero no veo cómo hacerlo funcionar con OLS.

Respuestas a la pregunta(1)

Su respuesta a la pregunta