Helix123 Helix123 - 2 months ago 5
R Question

computing F statistic with user supplied covariance matrix

With package

, I was wondering why the F statistic displayed by
does not change once I supply a covariance matrix (for robust standard errors). Consider the following code, I do not get a change in the F statistic as calculated by
. However, F statstic calculated by

gp <- plm(inv ~ value + capital,data=Grunfeld,model="pooling")

# summary() and waldtest() yield same F statistic [w/o user supplied covariance matrix]
waldtest(gp, test="F")

# summary() and waldtest() yield different F statistic [w/ user supplied covariance matrix]
summary(gp, .vcov = plm::vcovHC(gp, "white2"))
waldtest(gp, test="F", vcov=plm::vcovHC(gp, "white2"))

Considering this post about Stata's robust standard erros and comparing the output for the F statistic w/ and w/o robust standard errors there, I feel like the F statistic should change.

This was with plm 1.4 (then stable release).

EDIT: the most recent development version of plm now has a
argument for
which computes the robust F test (and chisq if requested): https://r-forge.r-project.org/R/?group_id=406
can do some small sample adjustments for the Ftest based on the clustered dimension since quite some time in the dev version as described in the paper below.

Here is a good reference for robust inference for practitioners: Cameron/Miller, "A Practitioner's Guide to Cluster-Robust Inference", Journal of Human Resources, Spring 2015, Vol.50, No. 2, pp.317-373. http://cameron.econ.ucdavis.edu/research/papers.html


If you look at the source code of plm:::summary.plm then you see that the first line is: object$fstatistic <- Ftest(object, test = "F"). Thus, the .vcov argument is not passed on to plm:::Ftest() and hence the F-statistic is not affected at all. You could contact the plm maintainers and ask that this should either be improved or at least pointed out on the manual page. Currently, .vcov is only used for the partial Wald tests of each coefficients, i.e., corresponding to what lmtest computes via coeftest(gp, vcov = vcovHC(gp, "white2")).