MyNixOS website logo
Description

Residual-Based Fully Modified Vector Autoregression.

Implements the Residual-Based Fully Modified Vector Autoregression (RBFM-VAR) estimator of Chang (2000) <doi:10.1017/S0266466600166071>. The RBFM-VAR procedure extends Phillips (1995) FM-VAR to handle any unknown mixture of I(0), I(1), and I(2) components without prior knowledge of the number or location of unit roots. Provides automatic lag selection via information criteria (AIC, BIC, HQ), long-run variance estimation using Bartlett, Parzen, or Quadratic Spectral kernels with Andrews (1991) <doi:10.2307/2938229> automatic bandwidth selection, Granger non-causality testing with asymptotically chi-squared Wald statistics, impulse response functions (IRF) with bootstrap confidence intervals, forecast error variance decomposition (FEVD), and out-of-sample forecasting.

rbfmvar: Residual-Based Fully Modified Vector Autoregression

CRAN status

Overview

rbfmvar implements the Residual-Based Fully Modified Vector Autoregression (RBFM-VAR) estimator following Chang (2000). The RBFM-VAR procedure extends Phillips (1995) FM-VAR to handle any unknown mixture of I(0), I(1), and I(2) components without prior knowledge of the number or location of unit roots.

Key Features

  • Robust to unknown integration orders: Handles I(0), I(1), and I(2) variables automatically
  • Asymptotically valid inference: Chi-squared Wald statistics for hypothesis testing
  • Automatic lag selection: Via AIC, BIC, or HQ information criteria
  • Multiple kernels for LRV estimation: Bartlett, Parzen, Quadratic Spectral
  • Andrews (1991) automatic bandwidth selection
  • Granger non-causality testing
  • Impulse response functions with bootstrap confidence intervals
  • Forecast error variance decomposition
  • Out-of-sample forecasting

Installation

Install from CRAN:

install.packages("rbfmvar")

Or install the development version from GitHub:

# install.packages("devtools")

Usage

Basic Estimation

library(rbfmvar)

# Simulate some VAR data
set.seed(123)
n <- 200
y <- matrix(0, n, 3)
colnames(y) <- c("gdp", "inflation", "interest")
e <- matrix(rnorm(n * 3), n, 3)

for (t in 3:n) {
  y[t, ] <- 0.5 * y[t-1, ] + 0.2 * y[t-2, ] + e[t, ]
}

# Estimate RBFM-VAR with automatic lag selection
fit <- rbfmvar(y, max_lags = 6, ic = "bic", kernel = "bartlett")
summary(fit)

Granger Causality Testing

# Test if gdp Granger-causes inflation
granger_test(fit, cause = "gdp", effect = "inflation")

# Pairwise Granger causality matrix
granger_matrix(fit)

Impulse Response Functions

# Compute IRF with bootstrap confidence intervals
ir <- irf(fit, horizon = 20, boot = 500, ci = 95)
plot(ir)

Forecast Error Variance Decomposition

fv <- fevd(fit, horizon = 20)
plot(fv)

Forecasting

fc <- forecast(fit, h = 12)
plot(fc)

Methodology

The RBFM-VAR model is based on Chang (2000), which develops a fully modified VAR estimation procedure that is robust to unknown integration orders. The key innovation is using second differences to eliminate I(2) trends while applying FM corrections to handle endogeneity from I(1) regressors.

The model is specified as:

$$\Delta^2 y_t = \sum_{j=1}^{p-2} \Gamma_j \Delta^2 y_{t-j} + \Pi_1 \Delta y_{t-1} + \Pi_2 y_{t-1} + e_t$$

The FM+ estimator corrects for the asymptotic bias from the correlation between regression errors and innovations in integrated regressors, achieving:

  • Zero mean mixed normal limiting distribution
  • Chi-square Wald statistics for hypothesis testing
  • Consistent estimation regardless of integration orders

References

  • Chang, Y. (2000). Vector Autoregressions with Unknown Mixtures of I(0), I(1), and I(2) Components. Econometric Theory, 16(6), 905-926. doi:10.1017/S0266466600166071

  • Phillips, P. C. B. (1995). Fully Modified Least Squares and Vector Autoregression. Econometrica, 63(5), 1023-1078. doi:10.2307/2171721

  • Andrews, D. W. K. (1991). Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation. Econometrica, 59(3), 817-858. doi:10.2307/2938229

License

GPL (>= 3)

Author.

Metadata

Version

2.0.2

License

Unknown

Platforms (80)

    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
  • arc-linux
  • 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
  • sh4-linux
  • 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