1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/test_serial.R
3\name{pbltest}
4\alias{pbltest}
5\alias{pbltest.formula}
6\alias{pbltest.plm}
7\title{Baltagi and Li Serial Dependence Test For Random Effects Models}
8\usage{
9pbltest(x, ...)
10
11\method{pbltest}{formula}(x, data, alternative = c("twosided", "onesided"), index = NULL, ...)
12
13\method{pbltest}{plm}(x, alternative = c("twosided", "onesided"), ...)
14}
15\arguments{
16\item{x}{a model formula or an estimated random--effects model of
17class \code{plm} ,}
18
19\item{\dots}{further arguments.}
20
21\item{data}{for the formula interface only: a \code{data.frame},}
22
23\item{alternative}{one of \code{"twosided"},
24\code{"onesided"}. Selects either \eqn{H_A: \rho \neq 0} or
25\eqn{H_A: \rho = 0} (i.e., the Normal or the Chi-squared
26version of the test),}
27
28\item{index}{the index of the \code{data.frame},}
29}
30\value{
31An object of class \code{"htest"}.
32}
33\description{
34\insertCite{BALT:LI:95;textual}{plm}'s Lagrange multiplier test for
35AR(1) or MA(1) idiosyncratic errors in panel models with random
36effects.
37}
38\details{
39This is a Lagrange multiplier test for the null of no serial
40correlation, against the alternative of either an AR(1) or a MA(1)
41process, in the idiosyncratic component of the error term in a
42random effects panel model (as the analytical expression of the
43test turns out to be the same under both alternatives,
44\insertCite{@see @BALT:LI:95 and @BALT:LI:97}{plm}. The
45\code{alternative} argument, defaulting to \code{twosided}, allows testing
46for positive serial correlation only, if set to \code{onesided}.
47}
48\examples{
49
50data("Grunfeld", package = "plm")
51
52# formula interface
53pbltest(inv ~ value + capital, data = Grunfeld)
54
55# plm interface
56re_mod <- plm(inv ~ value + capital, data = Grunfeld, model = "random")
57pbltest(re_mod)
58pbltest(re_mod, alternative = "onesided")
59
60}
61\references{
62\insertRef{BALT:LI:95}{plm}
63
64\insertRef{BALT:LI:97}{plm}
65}
66\seealso{
67\code{\link[=pdwtest]{pdwtest()}}, \code{\link[=pbnftest]{pbnftest()}}, \code{\link[=pbgtest]{pbgtest()}},
68\code{\link[=pbsytest]{pbsytest()}}, \code{\link[=pwartest]{pwartest()}} and
69\code{\link[=pwfdtest]{pwfdtest()}} for other serial correlation tests for
70panel models.
71}
72\author{
73Giovanni Millo
74}
75\keyword{htest}
76