Search arXiv⌕ Search

arXiv · 2610.11841

postshock: An R Package for Donor-Adjusted Forecasting After Structural Shocks

Abstract

We present the postshock R package, which implements and extends a donor-based framework for forecasting when a structural shock is known and the target response of interest is not yet observed. The package estimates shock effects from historical donor episodes, balances donors using specified matching features, and transfers the resulting adjustment to a target-series forecast. It provides integrated workflows for conditional mean forecasting through ARIMA and ARIMAX models and conditional variance forecasting through GARCH-X models. Additional functionality includes structured donor pools, control-shock regressors, automated GARCH-X order selection, processed data objects, and reproducible empirical workflows.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Qiyang Wang, Daniel J. Eck. 2026-10-08. postshock: An R Package for Donor-Adjusted Forecasting After Structural Shocks. https://arxiv.org/abs/2610.11841

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

NExt-LMM: a two-stage LMM framework with near-exact variance components for genome-wide association studies

Linear mixed models (LMMs) are widely used in genome-wide association studies (GWAS) to account for population stratification and cryptic relatedness. However, their practical application remains computationally challenging because parameter estimation and association testing require large-scale operations on genetic similarity matrices (GSMs). Here, we present NExt-LMM, a two-stage framework for scalable LMM-based GWAS. In the first stage, NExt-LMM obtains a preliminary estimate of a shared variance ratio under the null model. In the second stage, it constructs the corresponding covariance matrix and accelerates downstream inference through a Hierarchical Off-Diagonal Low-Rank (HODLR) representation. Specifically, NExt-LMM exploits the low-rank structure of off-diagonal covariance blocks to enable substantially faster matrix factorization and inverse-related computations than conventional dense decompositions. It then reuses the resulting HODLR-based covariance representation to accelerate maximum-likelihood-based inference under the shared variance-ratio setting. We further establish error bounds that account for both sources of approximation in the framework: the preliminary variance-ratio estimate and the HODLR approximation. In particular, we show that, conditional on a fixed variance ratio, the NExt-LMM estimator can be made arbitrarily close to the exact shared-variance estimator as the matrix approximation tolerance approaches zero. \AAA{Numerical experiments show that NExt-LMM improves computational efficiency while maintaining high accuracy relative to existing methods, and that the size of this improvement is governed by the numerical rank retained at the tolerance required for calibrated association inference.} We provide an open-source Python implementation at https://github.com/ZhibinPU/NExt-LMM.

stat.CO↗

On the Convergence of Wasserstein Gradient Descent for Sampling

This paper studies the optimization of the KL functional on the Wasserstein space of probability measures, and develops a sampling framework based on Wasserstein gradient descent (WGD). We identify two important subclasses of the Wasserstein space for which the WGD scheme is guaranteed to converge, thereby providing new theoretical foundations for optimization-based sampling methods on measure spaces. For practical implementation, we construct a particle-based WGD algorithm in which the score function is estimated via score matching. Through a series of numerical experiments, we demonstrate that WGD can provide good approximation to a variety of complex target distributions, including those that pose substantial challenges for standard MCMC and parametric variational Bayes methods. These results suggest that WGD offers a promising and flexible alternative for scalable Bayesian inference in high-dimensional or multimodal settings.

stat.CO↗

Two-Loop Stochastic Mirror Langevin Algorithms for Constrained Sampling

We study the problem of sampling from a target distribution $π(x)\propto e^{-f(x)}$ supported on a convex set $ X\subseteq\mathbb R^d$, when the potential $f$ is accessible only through a stochastic first-order oracle. Mirror Langevin algorithms provide a natural approach to constrained sampling by transporting the problem to an unconstrained dual space and discretizing the resulting Mirror Langevin diffusion. Existing implementations, however, typically use a fixed discretization step size and consequently retain a nonvanishing discretization bias at any fixed step size. Moreover, their direct extension to settings with noisy gradient information entails the challenge of controlling both discretization and stochastic-oracle error. We study a stochastic first-order version of the Mirror Langevin Algorithm (sFO-MLA) and, as our main contribution, develop a warm-started two-loop implementation in which an outer loop progressively decreases the step size while an inner loop runs sFO-MLA (with a fixed step size) for an appropriately chosen epoch length. The construction provides a principled schedule linking step sizes and epoch lengths, so that successive epochs warm-start from increasingly accurate distributions rather than repeatedly paying the cost of mixing from a cold start. We establish finite-time Wasserstein guarantees for sFO-MLA that explicitly separate mixing, Euler--Maruyama discretization, and stochastic-gradient errors. These bounds yield a fixed horizon rate of $\widetilde O(T^{-1/2})$ and show that the two-loop scheme removes the associated logarithmic penalty, attaining the canonical $O(T^{-1/2})$ rate under a geometric step-size schedule and corresponding epoch lengths. We illustrate the methodology in two statistically distinct settings.

stat.CO↗