fixedb.test: Fixed-b unit root test

Description Usage Arguments Value Examples

View source: R/teststatistics.R

Description

Performs the fixed-b unit root test

Usage

1
fixedb.test(y, B = floor(0.2 * length(y)), HC = TRUE)

Arguments

y

Vector to be tested for a unit root.

B

An integer defining the blocklength; default is 0.2*T.

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.

crit.values

A vector of critical valiues for different significance levels.

rejection

A logical vector indicating whether the unit root hypothesis is rejected in favor of stationarity for at different significance levels.

crit.blocklength

The relative blocklength for which the critical values are reported.

Examples

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

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