View source: R/coefs_and_covariances.R
coefCovHAC | R Documentation |
Provides coefficients of a regression model and the covariance matrix of the coefficients. The calculation of the covariance matrix corrects for possible presence of heteroskedasticity and autocorrelation using the method developed by Newey and West. This method is appropriate for time series data.
coefCovHAC(linmod)
linmod |
The regression model. |
Let the regression model be: linmod=lm(y~x1+x2)
The function reports the 3 coefficients from the regression in the first column and the 3x3 covariance matrix of the coefficients in the next three columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.