3

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

Helix123
  • 3,502
  • 2
  • 16
  • 36
  • I like this question but think it might be more appropriate for CrossValidated – C8H10N4O2 Jul 01 '15 at 14:20
  • http://stats.stackexchange.com/questions/72892/heteroscedasticity-consistent-f-test is related. From Wooldridge, Introductory Econometrics (2013), p. 273: "If heteroskedasticity is present, this version of the [F] test is invalid. The heteroskedasticityrobust version has no simple form, but it can be computed using certain statistical packages." Seems to me like plm should respect the supplied covariance matrix for calculation of the F statistic [which would make it an stackoverflow issue?). However, I feel like plm is not actively developt anymore. – Helix123 Jul 02 '15 at 08:19
  • Btw `gretl` (version <= 1.10.1) also suffered from this problem. There, it was fixed immediately after I informed the maintainers. – Helix123 Aug 10 '15 at 19:50

1 Answers1

1

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")).

Achim Zeileis
  • 15,710
  • 1
  • 39
  • 49
  • Thank you for taking the time! I will let `plm`'s maintainers know. – Helix123 Jul 03 '15 at 07:24
  • For the F test with robust vcov, it seems one needs to adjust the degrees of freedom, This seems to be a good reference: 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 – Helix123 Mar 28 '16 at 09:54