coefCovHAC: Coefficients Covariance Matrix (Time Series Data)

View source: R/coefs_and_covariances.R

coefCovHACR Documentation

Coefficients Covariance Matrix (Time Series Data)

Description

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.

Usage

coefCovHAC(linmod)

Arguments

linmod

The regression model.

Details

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.


dnepple/tprstats documentation built on April 5, 2025, 6:18 a.m.