purtest: Unit root tests for panel data

View source: R/test_uroot.R

purtestR Documentation

Unit root tests for panel data

Description

purtest implements several testing procedures that have been proposed to test unit root hypotheses with panel data.

Usage

purtest(
  object,
  data = NULL,
  index = NULL,
  test = c("levinlin", "ips", "madwu", "Pm", "invnormal", "logit", "hadri"),
  exo = c("none", "intercept", "trend"),
  lags = c("SIC", "AIC", "Hall"),
  pmax = 10,
  Hcons = TRUE,
  q = NULL,
  dfcor = FALSE,
  fixedT = TRUE,
  ips.stat = NULL,
  ...
)

## S3 method for class 'purtest'
print(x, ...)

## S3 method for class 'purtest'
summary(object, ...)

## S3 method for class 'summary.purtest'
print(x, ...)

Arguments

object, x

Either a "data.frame" or a matrix containing the time series (individuals as columns), a "pseries" object, a formula; a "purtest" object for the print and summary methods,

data

a "data.frame" or a "pdata.frame" object (required for formula interface, see Details and Examples),

index

the indexes,

test

the test to be computed: one of "levinlin" for \insertCiteLEVIN:LIN:CHU:02;textualplm, "ips" for \insertCiteIM:PESAR:SHIN:03;textualplm, "madwu" for \insertCiteMADDA:WU:99;textualplm, "Pm" , "invnormal", or "logit" for various tests as in \insertCiteCHOI:01;textualplm, or "hadri" for \insertCiteHADR:00;textualplm, see Details,

exo

the exogenous variables to introduce in the augmented Dickey–Fuller (ADF) regressions, one of: no exogenous variables ("none"), individual intercepts ("intercept"), or individual intercepts and trends ("trend"), but see Details,

lags

the number of lags to be used for the augmented Dickey-Fuller regressions: either a single value integer (the number of lags for all time series), a vector of integers (one for each time series), or a character string for an automatic computation of the number of lags, based on the AIC ("AIC"), the SIC ("SIC"), or on the method by \insertCiteHALL:94;textualplm ("Hall"); argument is irrelevant for test = "hadri",

pmax

maximum number of lags (irrelevant for test = "hadri"),

Hcons

logical, only relevant for test = "hadri", indicating whether the heteroskedasticity-consistent test of \insertCiteHADR:00;textualplm should be computed,

q

the bandwidth for the estimation of the long-run variance (only relevant for test = "levinlin", the default (q = NULL) gives the value as suggested by the authors as round(3.21 * T^(1/3))),

dfcor

logical, indicating whether the standard deviation of the regressions is to be computed using a degrees-of-freedom correction,

fixedT

logical, indicating whether the individual ADF regressions are to be computed using the same number of observations (irrelevant for test = "hadri"),

ips.stat

NULL or character of length 1 to request a specific IPS statistic, one of "Wtbar" (also default if ips.stat = NULL), "Ztbar", "tbar",

...

further arguments (can set argument p.approx to be passed on to non-exported function padf to either "MacKinnon1994" or "MacKinnon1996" to force a specific method for p-value approximation, the latter only being possible if package 'urca' is installed).

Details

All these tests except "hadri" are based on the estimation of augmented Dickey-Fuller (ADF) regressions for each time series. A statistic is then computed using the t-statistics associated with the lagged variable. The Hadri residual-based LM statistic is the cross-sectional average of the individual KPSS statistics \insertCiteKWIA:PHIL:SCHM:SHIN:92;textualplm, standardized by their asymptotic mean and standard deviation.

Several Fisher-type tests that combine p-values from tests based on ADF regressions per individual are available:

  • "madwu" is the inverse chi-squared test \insertCiteMADDA:WU:99;textualplm, also called P test by \insertCiteCHOI:01;textualplm.

  • "Pm" is the modified P test proposed by \insertCiteCHOI:01;textualplm for large N,

  • "invnormal" is the inverse normal test by \insertCiteCHOI:01;textualplm, and

  • "logit" is the logit test by \insertCiteCHOI:01;textualplm.

The individual p-values for the Fisher-type tests are approximated as described in \insertCiteMACK:96;textualplm if the package urca (\insertCitePFAFF:08;textualplm) is available, otherwise as described in \insertCiteMACK:94;textualplm.

For the test statistic tbar of the test of Im/Pesaran/Shin (2003) (ips.stat = "tbar"), no p-value is given but 1%, 5%, and 10% critical values are interpolated from paper's tabulated values via inverse distance weighting (printed and contained in the returned value's element statistic$ips.tbar.crit).

Hadri's test, the test of Levin/Lin/Chu, and the tbar statistic of Im/Pesaran/Shin are not applicable to unbalanced panels; the tbar statistic is not applicable when lags > 0 is given.

The exogenous instruments of the tests (where applicable) can be specified in several ways, depending on how the data is handed over to the function:

  • For the formula/data interface (if data is a data.frame, an additional index argument should be specified); the formula should be of the form: y ~ 0, y ~ 1, or y ~ trend for a test with no exogenous variables, with an intercept, or with individual intercepts and time trend, respectively. The exo argument is ignored in this case.

  • For the data.frame, matrix, and pseries interfaces: in these cases, the exogenous variables are specified using the exo argument.

With the associated summary and print methods, additional information can be extracted/displayed (see also Value).

Value

For purtest: An object of class "purtest": a list with the elements named:

  • "statistic" (a "htest" object),

  • "call",

  • "args",

  • "idres" (containing results from the individual regressions),

  • "adjval" (containing the simulated means and variances needed to compute the statistic, for test = "levinlin" and "ips", otherwise NULL),

  • "sigma2" (short-run and long-run variance for test = "levinlin", otherwise NULL).

Author(s)

Yves Croissant and for "Pm", "invnormal", and "logit" Kevin Tappe

References

\insertAllCited

See Also

cipstest(), phansitest()

Examples


data("Grunfeld", package = "plm")
y <- data.frame(split(Grunfeld$inv, Grunfeld$firm)) # individuals in columns

purtest(y, pmax = 4, exo = "intercept", test = "madwu")

## same via pseries interface
pGrunfeld <- pdata.frame(Grunfeld, index = c("firm", "year"))
purtest(pGrunfeld$inv, pmax = 4, exo = "intercept", test = "madwu")

## same via formula interface
purtest(inv ~ 1, data = Grunfeld, index = c("firm", "year"), pmax = 4, test = "madwu")


ycroissant/plm documentation built on July 8, 2024, 3:59 a.m.