HC: Covariance Matrix - (HC0, HC2, HC3, HC4 and HC5)

Description Usage Arguments Author(s) References Examples

View source: R/HC.R

Description

This function calculates the covariance structure for heteroskedasticity linear regression model.

Usage

1
HC(model, method=4, k=0.7)

Arguments

model

Any object of class lm;

method

Method HC that will be used to estimate the covariance structure. The argument method may be 0, 2, 3, 4 or 5;

k

Constant used by the method HC5. The suggestion of the authors is to use k = 0.7.

Author(s)

Pedro Rafael Diniz Marinho <pedro.rafael.marinho@gmail.com>

References

Cribari-Neto, F. (2004). Asymptotic inference under heteroskedasticity of unknown form. Computational Statistics and Data Analysis, 45, 215-233.

Cribari-Neto, F.; Souza, T.C.; Vasconcellos, K.L.P. (2007). Inference under heteros- kedasticity and leveraged data. Communications in Statistics, Theory and Methods, 36, 1877-1888. [Errata: 37, 2008, 3329-3330.]

Horn, S.D.; Horn, R.A.; Duncan, D.B. (1975). Estimating heteroskedastic variances in linear models. Journal of the American Statistical Association, 70, 380-385.

MacKinnon, J.G.; White, H. (1985). Some heteroskedasticity-consistent covariance matrix estimators with improved finite-sample properties. Journal of Econometrics, 29, 305-325.

White, H. (1980). A heteroskedasticity-consistent covariance matrix estimator and a direct test for heteroskedasticity. Econometrica, 48, 817-838.

Examples

1
2
3
4
5
6
data(schools)
datas = schools[-50,]
y = datas$Expenditure 
x = datas$Income/10000
model = lm(y ~ x)
HC(model, method=4)

Example output

          [,1]      [,2]
[1,]  29045.25 -39769.76
[2,] -39769.76  54555.63

hcci documentation built on May 2, 2019, 2:07 a.m.