% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unit_root_extra.R
\name{panel_ur_test}
\alias{panel_ur_test}
\alias{panel_ur_test.matrix}
\alias{panel_ur_test.default}
\title{IPS and LLC Panel Unit Root Tests}
\usage{
panel_ur_test(x, ...)

\method{panel_ur_test}{matrix}(x, ..., test = c("ips", "llc"), lags = 0L, trend = FALSE)

\method{panel_ur_test}{default}(
  x,
  ...,
  data = NULL,
  unit_index = NULL,
  time_index = NULL,
  test = c("ips", "llc"),
  lags = 0L,
  trend = FALSE
)
}
\arguments{
\item{x}{A numeric matrix (N x T), data.frame, or vector.}

\item{...}{Additional arguments.}

\item{test}{Character: \code{"ips"} or \code{"llc"}.}

\item{lags}{Integer: ADF lag order. Default 0.}

\item{trend}{Logical: include a time trend. Default FALSE.}

\item{data, unit_index, time_index}{Panel structure (when \code{x} is
a vector).}
}
\value{
An object of class \code{dcce_unit_root} with elements
\code{test}, \code{statistic}, \code{p_value}, \code{N}, \code{T},
\code{lags}, \code{trend}.
}
\description{
Implements the Im, Pesaran & Shin (2003) IPS t-bar test and the
Levin, Lin & Chu (2002) LLC common-root test for panel unit roots.
Neither test corrects for cross-sectional dependence — use
\code{\link{cips_test}} for CSD-robust testing.
}
\details{
\strong{IPS:} fits unit-level ADF regressions, averages the
t-statistics, and standardises using tabulated moments from
Im et al. (2003, Table 2).

\strong{LLC:} fits unit-level ADF regressions, extracts the
t-statistic from a pooled regression of adjusted \eqn{\Delta y}
on adjusted \eqn{y_{t-1}}, standardised to N(0,1).
}
\examples{
set.seed(1)
X <- matrix(cumsum(rnorm(20 * 30)), 20, 30)
panel_ur_test(X, test = "ips")
panel_ur_test(X, test = "llc")
}
\references{
Im, K. S., Pesaran, M. H., & Shin, Y. (2003). Testing for unit
roots in heterogeneous panels. \emph{Journal of Econometrics}, 115(1),
53--74.

Levin, A., Lin, C.-F., & Chu, C.-S. J. (2002). Unit root tests in
panel data: asymptotic and finite-sample properties. \emph{Journal of
Econometrics}, 108(1), 1--24.
}
