fast_ols_HC: OLS calculation with heteroscedasticity consistent covariance...

View source: R/fast_ols_HC.R

fast_ols_HCR Documentation

OLS calculation with heteroscedasticity consistent covariance matrix (MacKinnon & White 1985).

Description

OLS calculation with heteroscedasticity consistent covariance matrix (MacKinnon & White 1985).

Usage

fast_ols_HC(y, x)

Arguments

y

A vector with the dependent variable.

x

A matrix with with regressors as columns.

Value

A list with OLS objects: Coefficients, Standard errors, Marginal likelihood, R^2, Degrees of freedom, Determinant of the regressors' matrix.

Examples


x1<-rnorm(10, mean = 0, sd = 1)
x2<-rnorm(10, mean = 0, sd = 2)
e<-rnorm(10, mean = 0, sd = 0.5)
y<-2+x1+2*x2+e
x<-cbind(x1,x2)
fast_ols_HC(y,x)


rmsBMA documentation built on March 14, 2026, 5:06 p.m.