Reproduces sandwich::vcovHAC / sandwich::NeweyWest
with the Bartlett kernel and a fixed lag. The meat accumulates the
weighted lag-l autocovariances of the score contributions.
Arguments
- model
A fitted
lm/glm.- lag
Number of lags (default the Newey-West rule \(\lfloor 4 (n/100)^{2/9} \rfloor\)).
- prewhite
Currently ignored (kept for signature parity).
- adjust
Apply the \(n/(n-k)\) finite-sample factor (default TRUE, matching
sandwich::NeweyWest).
