pwartest: Wooldridge Test for AR(1) Errors in FE Panel Models

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/test_serial.R

Description

Test of serial correlation for (the idiosyncratic component of) the errors in fixed–effects panel models.

Usage

1
2
3
4
5
6
7
pwartest(x, ...)

## S3 method for class 'formula'
pwartest(x, data, ...)

## S3 method for class 'panelmodel'
pwartest(x, ...)

Arguments

x

an object of class formula or of class panelmodel,

...

further arguments to be passed on to vcovHC (see Details and Examples).

data

a data.frame,

Details

As \insertCiteWOOL:10;textualplm, Sec. 10.5.4 observes, under the null of no serial correlation in the errors, the residuals of a FE model must be negatively serially correlated, with cor(\hat{u}_{it}, \hat{u}_{is})=-1/(T-1) for each t,s. He suggests basing a test for this null hypothesis on a pooled regression of FE residuals on their first lag: \hat{u}_{i,t} = α + δ \hat{u}_{i,t-1} + η_{i,t}. Rejecting the restriction δ = -1/(T-1) makes us conclude against the original null of no serial correlation.

pwartest estimates the within model and retrieves residuals, then estimates an AR(1) pooling model on them. The test statistic is obtained by applying a F test to the latter model to test the above restriction on δ, setting the covariance matrix to vcovHC with the option method="arellano" to control for serial correlation.

Unlike the pbgtest() and pdwtest(), this test does not rely on large–T asymptotics and has therefore good properties in “short” panels. Furthermore, it is robust to general heteroskedasticity.

Value

An object of class "htest".

Author(s)

Giovanni Millo

References

\insertRef

WOOL:02plm

\insertRef

WOOL:10plm

See Also

pwfdtest(), pdwtest(), pbgtest(), pbltest(), pbsytest().

Examples

1
2
3
4
5
data("EmplUK", package = "plm")
pwartest(log(emp) ~ log(wage) + log(capital), data = EmplUK)

# pass argument 'type' to vcovHC used in test
pwartest(log(emp) ~ log(wage) + log(capital), data = EmplUK, type = "HC3")

plm documentation built on Sept. 21, 2021, 3:01 p.m.