ZA_2br: Zivot-Andrews unit root test with unknown one structural...

View source: R/uroot_breaks.R

ZA_2brR Documentation

Zivot-Andrews unit root test with unknown one structural break.

Description

This function implements Zivot-Andrews sequential ADF unit root test with one unknown structural break. Handling two outlier models: "Innovational outlier" and "Additive outlier".

Usage

ZA_2br(y,
      model=c("intercept", "both"),
      pmax=8,
      ic=c("AIC","BIC"),
      fixed=TRUE,
      trim=0.1,
      eq=1,
      trace=TRUE,
      season=FALSE)

Arguments

y

Univariate time series data, a preferable format is ts when "season=TRUE".

model

Modelling where the unknown structural change occurs.
intercept= structural change occurs at the intercept.
trend= structural change occurs at the trend.
both= structural changes occur at both the intercept and the trend.

pmax

The maximal lags that are either included in the test regression or lag selection searches its optimal lag via "ic".

ic

Information criteria, "AIC" or "BIC". The default is "AIC".

fixed

Logical. If TURE, pmax is the fixed inputed lags, and the default is TRUE.
If FALSE, pmax is the maximal lags where lag selection searches its optimal lag.

trim

The trimming percentage. Default is 10

eq

The type of dependent variable in ADF equation.
1= original y.
2= differenced y.

trace

Logical. If TURE, then screen displays the sequential progress.

season

Logical. If TURE,then seasonal dummies will be included in the test regression, and y must be in ts format.

Details

This code entends Zivot-Andrews (1992) sequential procedure to two unknown structural changes. Critical values are from Narayan and Popp (2010).

Value

teststat

The ADF test statistic in the presence of two structural breaks.

cval

The critical values that are tabulated in Narayan and Popp (2010).

p

The number of lags that are included in the test regression.

bpoint1

The first breaking point that corresponds to the teststat.

bpoint2

The second breaking point that corresponds to the teststat.

timeElapse

Time elapsed for sequential search.

Note

This code modifies function ur.za of package urca. We add "season", "eq", "outlier",and "trim". Specifically, "outlier" is crucial, "season" is left to advanced research.

Author(s)

Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.

References

Narayan, P. K. and Popp, S. (2010) A new unit root test with two structural breaks in level and slope at unknown time. Journal of Applied Statistics,37, 1425-1438.

Zivot,E. and Andrews, W.K. (1992),Further Evidence on the Great Crasch, the Oil-Price Shock, and the Unit-Root Hypothesis. Journal of Business & Economic Statistics,10(3), 251-270.

Examples

data(macro) # US macro data, 1967M1-2025M7
# It takes time

y=macro[1:200,"INF"]
za2=ZA_2br(y,
           ic=c("AIC","BIC")[2],
           pmax=8,
           fixed=TRUE,
           model=c("intercept","trend","both")[1],
           trim=0.1,
           eq=1,
           season=TRUE)
za2$timeElapse[3]/60
za2$teststat
za2$cval
y[za2$bpoint1,] #The first dated strictural change
y[za2$bpoint2,] #The second dated strictural change


COINT documentation built on Sept. 9, 2025, 5:51 p.m.

Related to ZA_2br in COINT...