File: adf.test.Rd

package info (click to toggle)
tseries 0.10-60-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 732 kB
  • sloc: fortran: 1,405; ansic: 759; makefile: 67; f90: 21
file content (60 lines) | stat: -rw-r--r-- 2,116 bytes parent folder | download
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
\name{adf.test}
\alias{adf.test}
\title{Augmented Dickey--Fuller Test}
\description{
  Computes the Augmented Dickey-Fuller test for the null that \code{x} has
  a unit root.
}
\usage{
adf.test(x, alternative = c("stationary", "explosive"),
         k = trunc((length(x)-1)^(1/3)))
}
\arguments{
  \item{x}{a numeric vector or time series.}
  \item{alternative}{indicates the alternative hypothesis and must be
    one of \code{"stationary"} (default) or \code{"explosive"}. You can
    specify just the initial letter.}
  \item{k}{the lag order to calculate the test statistic.}
}
\details{
  The general regression equation which incorporates a constant and a
  linear trend is used and the t-statistic for a first order
  autoregressive coefficient equals one is computed. The number of lags
  used in the regression is \code{k}. The default value of
  \code{trunc((length(x)-1)^(1/3))} corresponds to the suggested upper
  bound on the rate at which the number of lags, \code{k}, should be
  made to grow with the sample size for the general \code{ARMA(p,q)}
  setup. Note that for \code{k} equals zero the standard Dickey-Fuller
  test is computed. The p-values are interpolated from Table 4.2, p. 103
  of \bibcitet{R:Banerjee+Dolado+Galbraith:1993}.
  If the computed statistic is outside the
  table of critical values, then a warning message is generated. 
  
  Missing values are not allowed.
}
\value{
  A list with class \code{"htest"} containing the following components:
  \item{statistic}{the value of the test statistic.}
  \item{parameter}{the lag order.}
  \item{p.value}{the p-value of the test.}
  \item{method}{a character string indicating what type of test was
    performed.} 
  \item{data.name}{a character string giving the name of the data.}
  \item{alternative}{a character string describing the alternative
    hypothesis.}
}
\references{
  \bibshow{R:Banerjee+Dolado+Galbraith:1993, Said+Dickey:1984}
}
\author{A. Trapletti}
\seealso{
  \code{\link{pp.test}}
}
\examples{
x <- rnorm(1000)  # no unit-root
adf.test(x)

y <- diffinv(x)   # contains a unit-root
adf.test(y)
}
\keyword{ts}