Calculates recursive and non-recursive right-tailed unit root tests statistics.

rtadf(y, r0, test = c("adf", "sadf", "gsadf"), type = c("none", "drift",
  "trend"), lags = 1, selectlags = c("Fixed", "AIC", "BIC"))

Arguments

y

Vector to be tested for an explosive root.

r0

Minimal Window size.

test

Test type, either "adf", "sadf" of "gsadf".

type

Deterministic terms, either, either "none", "drift" or "trend".

lags

Number of lags for y to be included.

selectlags

Lag selection can be achieved according to the Akaike "AIC" or the Bayes "BIC" information criteria. The maximum number of lags considered is set by lags. The default is to use a "fixed" lag length set by lags.

Value

List with test statistic, date-stamping sequence

References

Phillips, P. C. B., Wu, Y., & Yu, J. (2011). Explosive Behavior in the 1990s Nasdaq: When Did Exuberance Escalate Asset Values?, International Economic Review, 201(1), 201--226.

Phillips, P. C. B., Shi, S., & Yu, J. (2015). Testing for multiple bubbles: Historical episodes of exuberance and collapse in the S&P 500. International Economic Review, 56(4), 1034--1078.

Examples

# NOT RUN {
t  <- 100
y  <- rnorm(t)
r0 <- round(t*(0.01+1.8/sqrt(t))) # minimal window size
rtadf(y, r0, test ="sadf")
# }