Description Usage Arguments Details Value Author(s) References Examples
Specification test for panel models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
x |
an object of class |
... |
further arguments to be passed on. For the formula method,
place argument |
data |
a |
model |
a character vector containing the names of two models (length(model) must be 2), |
method |
one of |
index |
an optional vector of index variables, |
vcov |
an optional covariance function, |
x2 |
an object of class |
The Hausman test (sometimes also called Durbin–Wu–Hausman test)
is based on the difference of the vectors of coefficients of two
different models. The panelmodel
method computes the original
version of the test based on a quadratic form
\insertCiteHAUS:78plm. The formula
method, if
method="chisq"
(default), computes the original version of the
test based on a quadratic form; if method="aux"
then the
auxiliary-regression-based version in Wooldridge (2010,
Sec. 10.7.3.) is computed instead \insertCite@WOOL:10 Sec.10.7.3plm.
Only the latter can be robustified by specifying a robust
covariance estimator as a function through the argument vcov
(see
Examples).
The equivalent tests in the one-way case using a between
model (either "within vs. between" or "random vs. between")
\insertCite@see @HAUS:TAYL:81 or @BALT:13 Sec.4.3plm can also
be performed by phtest
, but only for test = "chisq"
, not for
the regression-based test. NB: These equivalent tests using the
between model do not extend to the two-ways case. There are,
however, some other equivalent tests,
\insertCite@see @KANG:85 or @BALT:13 Sec.4.3.7plm,
but those are unsupported by phtest
.
An object of class "htest"
.
Yves Croissant, Giovanni Millo
HAUS:78plm
\insertRefHAUS:TAYL:81plm
\insertRefKANG:85plm
\insertRefWOOL:10plm
\insertRefBALT:13plm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data("Gasoline", package = "plm")
form <- lgaspcar ~ lincomep + lrpmg + lcarpcap
wi <- plm(form, data = Gasoline, model = "within")
re <- plm(form, data = Gasoline, model = "random")
phtest(wi, re)
phtest(form, data = Gasoline)
phtest(form, data = Gasoline, method = "aux")
# robust Hausman test (regression-based)
phtest(form, data = Gasoline, method = "aux", vcov = vcovHC)
# robust Hausman test with vcov supplied as a
# function and additional parameters
phtest(form, data = Gasoline, method = "aux",
vcov = function(x) vcovHC(x, method="white2", type="HC3"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.