Description Usage Arguments Value Note References Examples
The heteroskedasticty and autocorrelation consistent (HAC) covariance matrix of least square estimates (Newey & West, 1978) is applied to an object of class lm. A single group factor may be taken into account.
1 |
x |
An object of class |
group |
The name of the group factor (optional). If |
An object of class hac and lm.
The HAC covariance matrix is stored into the component vcov of the object,
which is taken into account by the summary and the vcov methods.
The HAC covariance matrix has the attribute max.lag, indicating the maximum lag of autocorrelation, which is automatically computed based on fit to data.
If group is not NULL, the HAC covariance matrix is computed within each group.
Residuals are assumed to be temporally ordered within each group.
W. K. Newey, and K. D. West (1978). A simple, positive semi-definite, heteroskedasticity and autocorrelation consistent covariance matrix. Econometrica, 55(3), 703-708.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.