Skip to contents

A collection and description of functions to compute the distribution and quantile function for the ADF unit root test statistics.

Usage

padf(q, N = Inf, trend = c("nc", "c", "ct"), statistic = c("t", "n")) 
qadf(p, N = Inf, trend = c("nc", "c", "ct"), statistic = c("t", "n"))

adfTable(trend = c("nc", "c", "ct"), statistic = c("t", "n"), 
    includeInf = TRUE)

Arguments

q

vector of quantiles or test statistics. Missing values are allowed.

p

vector of probabilities. Missing values are allowed.

N

the number of observations in the sample from which the quantiles are to be computed.

trend

a character string describing the regression from which the quantiles are to be computed. Valid choices are: "nc" for a regression with no intercept (constant) nor time trend, "c" for a regression with an intercept (constant) but no time trend, and "ct" for a regression with an intercept (constant) and a time trend. The default is "c".

statistic

a character string describing the type of test statistic. Valid choices are "t" for t-statistic and "n" for normalized statistic, sometimes referred to as the rho-statistic. The default is "t".

includeInf

a logical flag. Should the asymptotic value be included into the table?

Details

padf computes cumulative probabilities for the ADF test.

qadf computes quantiles for the ADF test.

With sufficiently fine grid for the first argument, padf and qadf compute, respectively, cumulative distribution functions and quantile functions of ADF test statistics.

adfTable produces tables of p-values for ADF tests.

Value

for padf and qadf, a named numeric vector with attribute "control" holding N,

for adfTable, an object from class "gridData", which is a list with the following components:

x

the values of N (length of the time series) for which the statistics are provided,

y

quantiles for which the statistics are provided,

Table

a matrix with one row for each N in x and one column for each quantile in y.

The "gridData" object contains also attribute "control" with information about the requested test.

Note

padf and qadf is based on the tables from A. Banerjee et al. (1993). Interpolation is used For value of N not in the tables. For small N (N < 25) the result is NA.

Author

Diethelm Wuertz for the Rmetrics R-port.

References

Banerjee A., Dolado J.J., Galbraith J.W., Hendry D.F. (1993); Cointegration, Error Correction, and the Econometric Analysis of Non-Stationary Data, Oxford University Press, Oxford.

Dickey, D.A., Fuller, W.A. (1979); Distribution of the estimators for autoregressive time series with a unit root, Journal of the American Statistical Association 74, 427–431.

Examples

padf(q = -2:2, N = 25)
#>         -2         -1          0          1          2 
#> 0.04596774 0.29047619 0.60793651 0.90975610 0.98478261 
#> attr(,"control")
#>  N 
#> 25 
qadf(p = (1:9)/10, N = 25)
#>    0.1    0.2    0.3    0.4    0.5    0.6    0.7    0.8    0.9 
#> -1.600 -1.285 -0.970 -0.655 -0.340 -0.025  0.290  0.605  0.920 
#> attr(,"control")
#>  N 
#> 25 
adfTable()
#> $x
#> [1]  25  50 100 250 500 Inf
#> 
#> $y
#> [1] 0.010 0.025 0.050 0.100 0.900 0.950 0.975 0.990
#> 
#> $z
#>     0.010 0.025 0.050 0.100 0.900 0.950 0.975 0.990
#>  25 -2.66 -2.26 -1.95 -1.60  0.92  1.33  1.70  2.16
#>  50 -2.62 -2.25 -1.95 -1.61  0.91  1.31  1.66  2.08
#> 100 -2.60 -2.24 -1.95 -1.61  0.90  1.29  1.64  2.03
#> 250 -2.58 -2.23 -1.95 -1.62  0.89  1.29  1.63  2.01
#> 500 -2.58 -2.23 -1.95 -1.62  0.89  1.28  1.62  2.00
#> Inf -2.58 -2.23 -1.95 -1.62  0.89  1.28  1.62  2.00
#> 
#> attr(,"class")
#> [1] "gridData"
#> attr(,"control")
#>     table     trend statistic 
#>     "adf"      "nc"       "t"