MyNixOS website logo
Description

Size-Power Tradeoff Visualization for Equal Predictive Ability of Two Forecasts.

Offers tools for visualizing and analyzing size and power properties of tests for equal predictive accuracy, including Diebold-Mariano and related procedures. Provides multiple Diebold-Mariano test implementations based on fixed-smoothing approaches, including fixed-b methods such as Kiefer and Vogelsang (2005) <doi:10.1017/S0266466605050565>, and applications to tests for equal predictive accuracy as in Coroneo and Iacone (2020) <doi:10.1002/jae.2756>, alongside conventional large-sample approximations. HAR inference involves nonparametric estimation of the long-run variance, and a key tuning parameter (the truncation parameter) trades off size and power. Lazarus, Lewis, and Stock (2021) <doi:10.3982/ECTA15404> theoretically characterize the size-power frontier for the Gaussian multivariate location model. 'ForeComp' computes and visualizes the finite-sample size-power frontier of the Diebold-Mariano test based on fixed-b asymptotics together with the Bartlett kernel. To compute finite-sample size and power, it fits a best approximating ARMA process to the input data and reports how the truncation parameter performs and how robust testing outcomes are to its choice.

ForeComp

This repository contains the ForeComp R package for forecasting comparison and equal predictive accuracy testing. The package implements Diebold-Mariano and related procedures, including fixed-smoothing (fixed-b and fixed-m) variants, along with tools for size-power tradeoff analysis.

Contents

  • R/ package source code implementing forecast evaluation functions
  • data/ packaged datasets used by the package
  • man/ function documentation (.Rd files)
  • tests/testthat/ automated tests
  • NEWS.md release notes and version history

The package code and datasets support forecasting-method comparison and robustness analysis for equal predictive accuracy testing.

Installation

ForeComp requires R (>= 3.5.0).

Install the stable release from CRAN:

install.packages("ForeComp")

Install the development version from GitHub:

remotes::install_github("mcmcs/ForeComp")

Main functions

Plot_Tradeoff(data, f1, f2, y, ...)

  • Computes loss differentials between two forecast series and evaluates how the truncation choice (M) affects size distortion and maximum power loss.
  • Fits an ARIMA approximation to the loss differential process and uses simulation (n_sim) to construct size-power tradeoff results across m_set.
  • Returns a list where the first element is a ggplot2 tradeoff figure and the second element is the underlying computed table.

For direct equal-predictive-accuracy testing with specific bandwidth rules:

ForeComp supports both fixed-smoothing defaults and baseline alternatives for Bartlett-kernel DM tests:

  • dm.test.bt(d, M = NA, Mopt = ...) (normal approximation, default Mopt = 2)
  • dm.test.bt.fb(d, M = NA, Mopt = ...) (fixed-b approximation, default Mopt = 1)

For both functions, Mopt has the same meaning:

  • Mopt = 1 (LLSW): M = ceiling(1.3 * sqrt(T))
  • Mopt = 2 (NW 1994): M = ceiling(4 * (T / 100)^(2/9))
  • Mopt = 3 (textbook NW / Andrews): M = ceiling(0.75 * T^(1/3))
  • Mopt = 4 (CI baseline): M = floor(sqrt(T))

where T = length(d).

For EWC fixed-smoothing:

  • dm.test.ewc.fb(d, B = NA, Bopt = 1) uses B = floor(0.4 * T^(2/3)) with a lower bound of 1.

Introductory Paper

Coming soon!

Metadata

Version

1.0.0

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