smallb.test: Small-b unit root test

Description Usage Arguments Value Examples

View source: R/teststatistics.R

Description

Performs the small-b unit root test

Usage

1
smallb.test(y, B = floor(length(y)^0.7), HC = TRUE)

Arguments

y

Vector to be tested for a unit root.

B

An integer defining the blocklength; default is T^{0.7}.

HC

A logical variable defining whether the heteroskedasticity robust version (HC = TRUE) or the homoskedasticity version (HC = FALSE) should be used; default is HC = TRUE.

Value

A list containing the following components:

teststatistic

The value of the small-b test statistic.

p.value

The p-value of the small-b test against stationarity.

Examples

1
2
3
4
5
6
7
8
series1 <- rnorm(100) + c(rep(0,60), rep(5, 40))
smallb.test(series1)
series2 <- cumsum(rnorm(100)) + c(rep(0,60), rep(5, 40))
smallb.test(series2)
## autocorrelation robust test
series3 <- filter(rnorm(300),0.8,"recursive")
series3.pw <- get.prewhitened(series3, p = 1)
smallb.test(series3.pw)

ottosven/urtrend documentation built on June 20, 2021, 10:54 a.m.