Learn R Programming

plm (version 0.3-1)

pvcovHC: Robust Covariance Matrix Estimators

Description

Robust covariance matrix estimators {`a la White for panel models. } pvcovHC(x,...) ## S3 method for class 'panelmodel': pvcovHC(x, type = "white1", weights = "HC0", ...) ## S3 method for class 'pgmm': pvcovHC(x,...)

x{an object of class "panelmodel" which should be the result of a random effect or a within model or a model of class "pgmm",} type{one of "white1","white2","arellano",} weights{one of "HC0","HC1","HC2","HC3","HC4",} ...{further arguments.}

An object of class "matrix" containing the estimate of the asymptotic covariance matrix of coefficients.

pvcovHC is a function for estimating a robust covariance matrix of parameters for a fixed effects or random effects panel model according to the White method (White 1980, 1984; Arellano 1987).

All types assume no intragroup correlation between errors and allow for heteroskedasticity across groups. As for the error covariance matrix of every single group of observations, "white1" allows for general heteroskedasticity but no serial correlation; "white2" is "white1" restricted to a common variance inside every group (see Greene (2003), 13.7.1-2 and Wooldridge (2003), 10.7.2); "arellano" (see ibid. and the original ref. Arellano (1987)) allows a fully general structure w.r.t. heteroskedasticity and serial correlation.

Weighting schemes are analogous to those in vcovHC in package sandwich and are justified theoretically (although in the context of the standard linear model) by MacKinnon and White (1985) and Cribari-Neto (2004) (see Zeileis, 2004). The main use of pvcovHC is to be an argument to other functions, e.g. for Wald-type testing: as vcov to coeftest(), waldtest() and other methods in the lmtest package; and as vcov to linear.hypothesis() in the car package (see the examples). Notice that the vcov argument may be supplied a function (which is the safest) or a matrix (see Zeileis (2004), 4.1-2 and examples below).

A special procedure, proposed by Windmeijer (2005) for pgmm objects is provided.

[object Object]

Arellano, M. (1987) Computing robust standard errors for within group estimators, Oxford bulletin of Economics and Statistics, 49, 431--434.

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

Greene, W. H. (1993) Econometric Analysis, 2nd ed. Macmillan Publishing Company, New York.

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

Weidmeijer, F. (2005) A finite sample correction for the variance of linear efficicent two--step GMM estimators, Journal of Econometrics, 126, pp.25--51.

White H. (1980) Asymptotic Theory for Econometricians, Ch. 6, Academic Press, Orlando (FL).

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

Wooldridge J. M. (2003) Econometric Analysis of Cross Section and Panel Data, MIT Press

Zeileis A. (2004) Econometric Computing with HC and HAC Covariance Matrix Estimators. Journal of Statistical Software, 11(10), 1--17. URL http://http://www.jstatsoft.org/v11/i10/.

library(lmtest) library(car) data("Produc", package="Ecdat") zz <- plm(log(gsp)~log(pcap)+log(pc)+log(emp)+unemp, data=Produc, model="random") ## standard coefficient significance test coeftest(zz) ## robust significance test coeftest(zz, vcov=pvcovHC) ## idem with parameters, pass vcov as a function argument coeftest(zz, vcov=function(x) pvcovHC(x, type="arellano", weights="HC1")) ## idem with parameters, pass vcov as a matrix argument coeftest(zz, vcov=pvcovHC(zz, type="arellano", weights="HC1")) ## joint restriction test waldtest(zz, update(zz, .~.-log(emp)-unemp), vcov=pvcovHC) ## test of hyp.: 2*log(pc)=log(emp) linear.hypothesis(zz, "2*log(pc)=log(emp)", vcov=pvcovHC)

## Robust inference for GMM models data("EmplUK", package="plm") ar <- pgmm(dynformula(log(emp)~log(wage)+log(capital)+log(output),list(2,1,2,2)), data=EmplUK, effect="twoways", model="twosteps", gmm.inst=~log(emp), lag.gmm=list(c(2,99))) rv <- pvcovHC(ar) mtest(ar, order=2, vcov=rv) regression

Arguments