see edits below
With package plm
, I was wondering why the F statistic displayed by summary()
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 summery()
. However, F statstic calculated by waldtest()
changes:
require(plm)
require(lmtest)
data("Grunfeld")
gp <- plm(inv ~ value + capital,data=Grunfeld,model="pooling")
# summary() and waldtest() yield same F statistic [w/o user supplied covariance matrix]
summary(gp)
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: pwaldtest
in the CRAN release 1.6-4 of plm
does that and is now incorporated in summary.plm
thus, simply running one of the following will give the robust F test with adjusted df2 parameter:
summary(gp, vcov = plm::vcovHC(gp, "white2"))
pwaldtest(gp, test="F", vcov = plm::vcovHC(gp, "white2"))
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