VAR(p) Model in R with HAC estimator I'm running a VAR model in R and found with several tests (arch.test, serial.test) that my model still contains heteroscedasticity and autocorrelation. I took the AIC lag order selection criteria, since I got least heteroscedasticity and autocorrelation compared to HQ, SC, FPE (I'm running a great number of VAR Models)
I want to correct the heteroscedasticity and autocorrelation, if possible. Is the HAC estimator possible to use for a VAR Model. And if the answer is yes, how can I implement it in R? If the answer is no, is there any other possibility to get better estimations (other than higher lag order)?
Thank you in advance! Appreciate every help!
 A: I think it is possible to use HAC with VAR.
Regarding implementation in R:

*

*There are multiple R packages offering VAR estimation, perhaps one of them has the relevant functionality?

*Otherwise, see packages for multivariate models (seemingly unrelated regression SUR and the like), perhaps they have the functionality. You would have to specify the model manually.

*Finally, you could do it entirely by hand. VAR can be estimated equation by equation by OLS, so you could just apply HAC equation by equation. This might be the easiest option.

Also, note that arch.test is about autoregressive conditional heteroskedasticity which is not the kind of heteroskedasticity that HAC is designed to deal with. In ARCH, the variance of the error $\varepsilon$ is not a function of the right-hand-side variables (lags of the dependent variable ($X$), so I think a HAC variance estimator would not account for it. You could model autoregressive conditional heteroskedasticity explicitly using a multivariate GARCH model (of which there are many varieties) e.g. using the rmgarch package in R (it allows specifying and estimating the VAR and the multivariate GARCH in one step). You would get more efficient estimates of the VAR coefficients and if you are not directly interested in the time-varying volatility, you could just ignore the fitted multivariate GARCH model afterwards.
