white_hccme_med: Calculate the Heteroskedasticity-Consistent Covariance Matrix...

Description Usage Arguments Value See Also

View source: R/aggregress_het.R

Description

white_hccme_med calculates the HCCME for a linear regression model, to match the calculation for un-aggregated data, i.e. data with weights either NULL or equal to 1. It calculates the covariance matrix from first principles, i.e. with loops, but with loops in the rows and columns of the covariance matrix, not in the sample size.

Usage

1

Arguments

lm_in

is an object of class "lm" that is the output of a linear regression model.

Value

A list containing two elements. The first is the HCCME covariance matrix. the second is a data frame of the form of coef(summary(lm_in)), except with standard errors and the remaining statistics adjusted for heteroskedasticity.

See Also

white_hccme, which uses vcovHC function in the sandwich package.


LeeMorinUCF/aggregress documentation built on June 30, 2020, 5:06 a.m.