Semi-parametric test for the presence of (individual or time) unobserved effects in panel models.

pwtest(x, ...)

# S3 method for class 'formula'
pwtest(x, data, effect = c("individual", "time"), ...)

# S3 method for class 'panelmodel'
pwtest(x, effect = c("individual", "time"), ...)

Arguments

x

an object of class "formula", or an estimated model of class panelmodel,

...

further arguments passed to plm.

data

a data.frame,

effect

the effect to be tested for, one of "individual" (default) or "time",

Value

An object of class "htest".

Details

This semi-parametric test checks the null hypothesis of zero correlation between errors of the same group. Therefore, it has power both against individual effects and, more generally, any kind of serial correlation.

The test relies on large-N asymptotics. It is valid under error heteroskedasticity and departures from normality.

The above is valid if effect="individual", which is the most likely usage. If effect="time", symmetrically, the test relies on large-T asymptotics and has power against time effects and, more generally, against cross-sectional correlation.

If the panelmodel interface is used, the inputted model must be a pooling model.

References

Wooldridge JM (2002). Econometric Analysis of Cross–Section and Panel Data. MIT Press.

Wooldridge JM (2010). Econometric Analysis of Cross–Section and Panel Data, 2nd edition. MIT Press.

See also

pbltest(), pbgtest(), pdwtest(), pbsytest(), pwartest(), pwfdtest() for tests for serial correlation in panel models. plmtest() for tests for random effects.

Author

Giovanni Millo

Examples


data("Produc", package = "plm")
## formula interface
pwtest(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc)
#> 
#> 	Wooldridge's test for unobserved individual effects
#> 
#> data:  formula
#> z = 3.9383, p-value = 8.207e-05
#> alternative hypothesis: unobserved effect
#> 
pwtest(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, effect = "time")
#> 
#> 	Wooldridge's test for unobserved time effects
#> 
#> data:  formula
#> z = 1.3143, p-value = 0.1888
#> alternative hypothesis: unobserved effect
#> 

## panelmodel interface
# first, estimate a pooling model, than compute test statistics
form <- formula(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp)
pool_prodc <- plm(form, data = Produc, model = "pooling")
pwtest(pool_prodc) # == effect="individual"
#> 
#> 	Wooldridge's test for unobserved individual effects
#> 
#> data:  formula
#> z = 3.9383, p-value = 8.207e-05
#> alternative hypothesis: unobserved effect
#> 
pwtest(pool_prodc, effect="time")
#> 
#> 	Wooldridge's test for unobserved time effects
#> 
#> data:  formula
#> z = 1.3143, p-value = 0.1888
#> alternative hypothesis: unobserved effect
#>