pwaldtest
can be used stand--alone with a plm object, a pvcm object,
and a pgmm object (for pvcm objects only the 'random' type is valid and no
further arguments are processed; for pgmm objects only arguments param
and vcov
are valid). It is also used in
summary.plm()
to produce the F statistic and the Chi-square
statistic for the joint test of coefficients and in summary.pgmm()
.
pwaldtest
performs the test if the slope coefficients of a panel
regression are jointly zero. It does not perform general purpose
Wald-style tests (for those, see lmtest::waldtest()
(from package
lmtest) or car::linearHypothesis()
(from package
car)).
If a user specified variance-covariance matrix/function is given in
argument vcov
, the robust version of the tests are carried out.
In that case, if the F test is requested (test = "F"
) and no
overwriting of the second degrees of freedom parameter is given (by
supplying argument (.df2
)), the adjustment of the second degrees
of freedom parameter is performed by default. The second degrees of
freedom parameter is adjusted to be the number of unique elements
of the cluster variable - 1, e. g., the number of individuals minus 1.
For the degrees of freedom adjustment of the F test in general,
see e. g. CAME:MILL:15;textualplm, section VII;
ANDR:GOLS:SCMI:13plm, pp. 126, footnote 4.
The degrees of freedom adjustment requires the vcov object supplied
or created by a supplied function to carry an attribute called
"cluster" with a known clustering described as a character (for now
this could be either "group"
or "time"
). The vcovXX functions
of the package plm provide such an attribute for their
returned variance--covariance matrices. No adjustment is done for
unknown descriptions given in the attribute "cluster" or when the
attribute "cluster" is not present. Robust vcov objects/functions
from package clubSandwich work as inputs to pwaldtest
's
F test because a they are translated internally to match the needs
described above.