MyNixOS website logo
Description

Unit Root Tests for Bounded Time Series.

Implements unit root tests for bounded time series following Cavaliere and Xu (2014) <doi:10.1016/j.jeconom.2013.08.012>. Standard unit root tests (ADF, Phillips-Perron) have non-standard limiting distributions when the time series is bounded. This package provides modified ADF and M-type tests (MZ-alpha, MZ-t, MSB) with p-values computed via Monte Carlo simulation of bounded Brownian motion. Supports one-sided (lower bound only) and two-sided bounds, with automatic lag selection using the MAIC criterion of Ng and Perron (2001) <doi:10.1111/1468-0262.00256>.

boundedur

CRAN status

Unit root tests for bounded time series following Cavaliere and Xu (2014).

Overview

Standard unit root tests (ADF, Phillips-Perron) assume the time series is unbounded, but many economic variables are naturally bounded:

  • Interest rates (non-negative, often with upper caps)
  • Exchange rates (within currency bands)
  • Capacity utilization (0-100%)
  • Unemployment rates (0-100%)
  • Price indices (non-negative)

When bounds are binding or nearly so, standard tests have non-standard limiting distributions, leading to incorrect inference. The boundedur package implements the modified tests of Cavaliere and Xu (2014), which properly account for bounds.

Installation

# From CRAN (when available)
install.packages("boundedur")

# Development version from GitHub
# install.packages("remotes")

Usage

library(boundedur)

# Generate bounded random walk (e.g., interest rate between 0 and 10%)
set.seed(123)
n <- 200
y <- numeric(n)
y[1] <- 5
for (i in 2:n) {
  y[i] <- y[i-1] + rnorm(1, 0, 0.3)
  y[i] <- max(0, min(10, y[i]))  # Reflect at bounds
}

# Test for unit root with known bounds
result <- boundedur(y, lbound = 0, ubound = 10)
print(result)
summary(result)

One-sided bounds

For series with only a lower bound (e.g., prices):

result <- boundedur(y, lbound = 0, ubound = Inf)

Select specific tests

# ADF tests only
result <- boundedur(y, lbound = 0, ubound = 10, test = "adf")

# Single test
result <- boundedur(y, lbound = 0, ubound = 10, test = "mz_t")

Control lag selection

# Automatic (MAIC criterion, default)
result <- boundedur(y, lbound = 0, ubound = 10)

# Manual lag specification
result <- boundedur(y, lbound = 0, ubound = 10, lags = 4)

# Custom maximum lag
result <- boundedur(y, lbound = 0, ubound = 10, maxlag = 12)

Available Tests

TestDescription
adf_alphaADF normalized bias: T(ρ̂ - 1)
adf_tADF t-statistic
mz_alphaModified Phillips-Perron normalized bias
mz_tModified Phillips-Perron t-statistic
msbModified Sargan-Bhargava

Methodology

The tests modify standard unit root statistics to account for the effect of bounds on the limiting distribution. Under the null hypothesis of a unit root, the process is constrained by bounds and follows a reflected Brownian motion rather than standard Brownian motion.

P-values are computed via Monte Carlo simulation of the bounded Brownian motion null distribution, with bound parameters estimated from the data.

References

Cavaliere, G., & Xu, F. (2014). Testing for unit roots in bounded time series. Journal of Econometrics, 178(2), 259-272. doi:10.1016/j.jeconom.2013.08.012

Ng, S., & Perron, P. (2001). Lag length selection and the construction of unit root tests with good size and power. Econometrica, 69(6), 1519-1554. doi:10.1111/1468-0262.00256

License

GPL (>= 3)

Metadata

Version

1.0.1

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows