File: purtest.Rd

package info (click to toggle)
r-cran-plm 2.6-2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,032 kB
  • sloc: sh: 13; makefile: 4
file content (186 lines) | stat: -rw-r--r-- 7,637 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/test_uroot.R
\name{purtest}
\alias{purtest}
\alias{print.purtest}
\alias{summary.purtest}
\alias{print.summary.purtest}
\title{Unit root tests for 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,
  ...
)

\method{print}{purtest}(x, ...)

\method{summary}{purtest}(object, ...)

\method{print}{summary.purtest}(x, ...)
}
\arguments{
\item{object, x}{Either a \code{"data.frame"} or a matrix containing the
time series (individuals as columns), a \code{"pseries"} object, a formula;
a \code{"purtest"} object for the print and summary methods,}

\item{data}{a \code{"data.frame"} or a \code{"pdata.frame"} object (required for
formula interface, see Details and Examples),}

\item{index}{the indexes,}

\item{test}{the test to be computed: one of \code{"levinlin"} for
\insertCite{LEVIN:LIN:CHU:02;textual}{plm}, \code{"ips"} for
\insertCite{IM:PESAR:SHIN:03;textual}{plm}, \code{"madwu"} for
\insertCite{MADDA:WU:99;textual}{plm}, \code{"Pm"} , \code{"invnormal"},
or \code{"logit"} for various tests as in
\insertCite{CHOI:01;textual}{plm}, or \code{"hadri"} for
\insertCite{HADR:00;textual}{plm}, see Details,}

\item{exo}{the exogenous variables to introduce in the augmented
Dickey--Fuller (ADF) regressions, one of: no exogenous
variables (\code{"none"}), individual intercepts (\code{"intercept"}), or
individual intercepts and trends (\code{"trend"}), but see Details,}

\item{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
(\code{"AIC"}), the SIC (\code{"SIC"}), or on the method by
\insertCite{HALL:94;textual}{plm} (\code{"Hall"}); argument is irrelevant
for \code{test = "hadri"},}

\item{pmax}{maximum number of lags (irrelevant for \code{test = "hadri"}),}

\item{Hcons}{logical, only relevant for \code{test = "hadri"},
indicating whether the heteroskedasticity-consistent test of
\insertCite{HADR:00;textual}{plm} should be computed,}

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

\item{dfcor}{logical, indicating whether the standard deviation of
the regressions is to be computed using a degrees-of-freedom
correction,}

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

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

\item{\dots}{further arguments (can set argument \code{p.approx} to be passed on
to non-exported function \code{padf} to either \code{"MacKinnon1994"} or \code{"MacKinnon1996"}
to force a specific method for p-value approximation, the latter only being
possible if package 'urca' is installed).}
}
\value{
For purtest: An object of class \code{"purtest"}: a list with the elements
named:
\itemize{
\item \code{"statistic"} (a \code{"htest"} object),
\item \code{"call"},
\item \code{"args"},
\item \code{"idres"} (containing results from the individual regressions),
\item \code{"adjval"} (containing the simulated means and variances needed to compute
the statistic, for \code{test = "levinlin"} and \code{"ips"}, otherwise \code{NULL}),
\item \code{"sigma2"} (short-run and long-run variance for \code{test = "levinlin"},
otherwise \code{NULL}).
}
}
\description{
\code{purtest} implements several testing procedures that have been proposed
to test unit root hypotheses with panel data.
}
\details{
All these tests except \code{"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
\insertCite{KWIA:PHIL:SCHM:SHIN:92;textual}{plm}, 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:
\itemize{
\item \code{"madwu"} is the inverse chi-squared test
\insertCite{MADDA:WU:99;textual}{plm}, also called P test by
\insertCite{CHOI:01;textual}{plm}.
\item \code{"Pm"} is the modified P test proposed by
\insertCite{CHOI:01;textual}{plm} for large N,
\item \code{"invnormal"} is the inverse normal test by \insertCite{CHOI:01;textual}{plm}, and
\item \code{"logit"} is the logit test by \insertCite{CHOI:01;textual}{plm}.
}

The individual p-values for the Fisher-type tests are approximated
as described in \insertCite{MACK:96;textual}{plm} if the package \CRANpkg{urca}
(\insertCite{PFAFF:08;textual}{plm}) is available, otherwise as described in
\insertCite{MACK:94;textual}{plm}.

For the test statistic tbar of the test of Im/Pesaran/Shin (2003)
(\code{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
\code{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 \code{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:
\itemize{
\item For the \code{formula}/\code{data} interface (if \code{data} is a \code{data.frame},
an additional \code{index} argument should be specified); the formula
should be of the form: \code{y ~ 0}, \code{y ~ 1}, or \code{y ~ trend} for a test
with no exogenous variables, with an intercept, or with individual
intercepts and time trend, respectively. The \code{exo} argument is
ignored in this case.
\item For the \code{data.frame}, \code{matrix}, and \code{pseries} interfaces: in
these cases, the exogenous variables are specified using the \code{exo}
argument.
}

With the associated \code{summary} and \code{print} methods, additional
information can be extracted/displayed (see also Value).
}
\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")

}
\references{
\insertAllCited{}
}
\seealso{
\code{\link[=cipstest]{cipstest()}}, \code{\link[=phansitest]{phansitest()}}
}
\author{
Yves Croissant and for "Pm", "invnormal", and "logit" Kevin Tappe
}
\keyword{htest}