ADF.rectest: Augmented Dickey-Fuller Recursive Test

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/rec-test.R

Description

This function computes the augmented Dickey-Fuller statistic recursively along subsamples of the original data.

Usage

1
2
3
    ADF.rectest (wts, type="moving", nsub=48, itsd, selectlags=list(mode="signf", Pmax=NULL),
                 trace=list(remain=1, plot=0, elaps=1))
  

Arguments

wts

a univariate time series object.

type

a character string indicating how subsamples are selected. See details.

nsub

the number of observations in each subsample.

itsd

deterministic components to include in the model. Three types of regressors can be included: regular deterministic components, seasonal deterministic components, and any regressor variable previously defined by the user.

This argument must be a vector object with the following elements: c(0,0,c(0)), if the first and/or second elements are set equal to 1, it indicates that an intercept, and/or linear trend, respectively, are included. The third element is a vector indicating which seasonal dummies should be included. If no seasonal dummies are desired it must be set equal to zero. For example, regular=c(1,0,c(1,2,3)) would include an intercept, no trend, and the first three seasonal dummies.

selectlags

lag selection method. A list object indicating the method to select lags, mode, and the maximum lag considered. Available methods are "aic", "bic", and "signf". See details. Pmax is a numeric object indicating the maximum lag order. By default, the maximum number of lags considered is round(10*log10(n)), where n is the number of observations.

trace

a list object indicating if a trace of the iteration progress should be printed. Three levels of information can be printed: remain, the percentage of the whole procedure that has been completed; plot, a plot of the computed statistics; and elaps, how much time the whole procedure has consumed.

Details

The auxiliar regression is defined as,

δ y_t = ρ y_{t-1} + ε_t,

where δ is the first order operator. Hence, under the null hypothesis ρ=0 and the long run unit root 1 exists.

Three types of subsamples are considered: "backw", the statistic is computed for the last nsub observations and then one year backwards is added until the beginning of the sample; "forw", the statistic is computed for the first nsub observations and then one year forwards is added until the end of the sample; "moving", the statistic is computed over moving subsamples of length nsub.

Available methods are the following. "aic" and "bic" follows a top-down strategy based on the Akaike's and Schwarz's information criteria, and "signf" removes the non-significant lags at the 10% level of significance until all the selected lags are significant. By default, the maximum number of lags considered is round(10*log10(n)), where n is the number of observations.

It is also possible to set the argument selectlags equals to a vector, mode=c(1,3,4), then those lags are directly included in the auxiliar regression and Pmax is ignored.

Regressor variables are not considered in this procedure.

Value

An object of class adfrecst-class.

Author(s)

Javier Lopez-de-Lacalle [email protected] and Ignacio Diaz-Emparanza [email protected]

References

D.A. Dickey and W.A. Fuller (1981), Likelihood ratio statistics for autoregressive time series with a unit root. Econometrica, 49, 1057-1071.

W.A. Fuller (1976), Introduction to Statistical Time Series. Jonh Wiley, New York.

See Also

ADF.test.

Examples

1
2
3
4
5
6
7
8
9
    ## ADF recursive test with constant, trend and seasonal dummies.
    data(AirPassengers)
    lairp <- log(AirPassengers)
    adf.out1 <- ADF.rectest(wts=lairp, type="backw", nsub=84, itsd=c(1,1,c(1:11)),
                  selectlags=list(mode="bic", Pmax=NULL),
                  trace=list(remain=1, plot=1, elaps=1))
    show(adf.out1)
    plot(adf.out1)
  

uroot documentation built on May 31, 2017, 5:01 a.m.

Related to ADF.rectest in uroot...