exdqlm-package: exdqlm: Extended Dynamic Quantile Linear Models

exdqlm-packageR Documentation

exdqlm: Extended Dynamic Quantile Linear Models

Description

Bayesian quantile-regression tools for dynamic state-space models and static regression under the extended asymmetric Laplace error distribution (exAL).

Details

The package centers on native dynamic quantile state-space modeling for univariate time series and also provides a static exAL regression workflow. Across these settings, exdqlm combines model construction helpers, multiple Bayesian inference engines, shrinkage priors for static coefficients, and post hoc synthesis of several fitted quantiles.

Main workflows

  • Dynamic/state-space quantile modeling via exdqlmLDVB() and exdqlmMCMC(), with legacy exdqlmISVB() retained for backward compatibility and transfer-function extensions through exdqlmTransferLDVB(), exdqlmTransferMCMC(), and legacy exdqlmTransferISVB(). Dynamic fitted objects support standard plot(), predict(), and diagnostics() methods, with exdqlmPlot(), compPlot(), exdqlmForecast(), and the named diagnostic helpers retained as explicit helpers.

  • Static Bayesian exAL regression via exalStaticLDVB() and exalStaticMCMC(), with fitted-quantile plots through plot() and static diagnostics through diagnostics().

  • Modular state-space construction via polytrendMod(), seasMod(), and regMod().

  • Multi-quantile post-processing via quantileSynthesis() for post hoc posterior-predictive synthesis from separately fitted quantiles into a unified predictive distribution.

Object system

  • Model specifications have class exdqlm and can be combined with the + method.

  • Dynamic fitted objects keep their engine-specific first class (exdqlmLDVB, exdqlmMCMC, or legacy exdqlmISVB) and also inherit from the shared exdqlmFit family. They support print(), summary(), plot(), and predict() where natural.

  • Static fitted objects keep their engine-specific first class (exalStaticLDVB or exalStaticMCMC) and also inherit from the shared exalStaticFit family. They support print(), summary(), fitted-quantile plot(), and diagnostics() methods.

  • Post-processing functions return explicit objects: exdqlmDiagnostic, exdqlmForecast, exdqlmForecastDiagnostic, exdqlmSynthesis, and exalStaticDiagnostic. These objects can be inspected with standard print()/summary() methods and plotted with plot() when a display is defined.

Distinctive features

  • Dynamic Bayesian quantile state-space inference with Laplace-delta variational Bayes (LDVB) as the main variational Bayes (VB) engine, Markov chain Monte Carlo (MCMC) for posterior simulation, and legacy importance-sampling variational Bayes (ISVB) retained for compatibility and historical comparisons.

  • A unified package covering both dynamic exDQLM models and static exAL regression.

  • Static shrinkage priors including ridge, regularized horseshoe ("rhs"), and rhs_ns.

  • Reduced AL/DQLM paths through dqlm.ind = TRUE in both dynamic and static APIs.

  • Standardized VB diagnostics traces via fit$diagnostics$vb_trace for the evidence lower bound (ELBO), sigma, gamma, and convergence deltas across VB engines.

  • Conservative automatic warmup defaults for the most failure-prone shared blocks: RHS-family tau scheduling plus exAL ⁠(sigma, gamma)⁠ warmup in VB and MCMC entry points, with explicit controls available only when users need to override the defaults.

  • Optional C++ acceleration for selected state-space computations.

Release changes in 1.1.0

  • Shared fit class families were added while preserving the existing first-class object names: dynamic fits inherit from exdqlmFit, and static fits inherit from exalStaticFit.

  • Fitted-model and post-processing objects have standardized print() and summary() methods for inspecting object type, engine, dimensions, stored draws, diagnostics, and run time.

  • Dynamic fits support standard plot(), predict(), and diagnostics() methods; forecast and static-fit diagnostics use the same diagnostics() generic where defined.

Release changes in 1.0.0

  • Dynamic diagnostics report CRPS through a finite integrated quantile-score approximation over posterior predictive empirical quantiles, with user-configurable quantile levels and weights in exdqlmDiagnostics().

  • Held-out forecast diagnostics are available for forecast objects through diagnostics().

  • Static diagnostics store fitted-quantile summaries and coefficient intervals, with plot(..., type = "coefficients") available for comparing static LDVB and MCMC coefficient summaries.

  • Dynamic KL normality diagnostics are deterministic for fixed fitted objects and no longer depend on stochastic reference samples. The top-level diagnostic object exposes KL as the primary calibration diagnostic and keeps advanced KL sensitivity details under kl.details.

Runtime options

  • options(exdqlm.use_cpp_kf = TRUE|FALSE) – C++ Kalman bridge (optional; default TRUE).

  • options(exdqlm.compute_elbo = TRUE|FALSE) – Compute ELBO (optional; default TRUE).

  • options(exdqlm.tol_elbo = numeric) – Positive ELBO convergence tolerance used when exdqlm.compute_elbo = TRUE; smaller values enforce stricter ELBO stabilization checks (default 1e-6).

  • options(exdqlm.use_cpp_builders = TRUE|FALSE) – C++ model builders (optional; default FALSE).

  • options(exdqlm.use_cpp_samplers = TRUE|FALSE) – C++ samplers (optional; default FALSE).

  • options(exdqlm.use_cpp_postpred = TRUE|FALSE) – C++ posterior predictive sampler (optional; default FALSE).

  • options(exdqlm.use_cpp_mcmc = TRUE|FALSE) – MCMC backend routing (optional; default TRUE).

  • options(exdqlm.cpp_mcmc_mode = "strict"|"fast") – strict keeps legacy R-kernel parity; fast enables C++ FFBS in MCMC (default "fast").

  • options(exdqlm.cpp_threads = numeric) – Positive integer thread cap for eligible OpenMP-enabled C++ paths (1L forces single-thread; default 1L).

Author(s)

Maintainer: Raquel Barata raquel.a.barata@gmail.com

Authors:

Other contributors:

  • Raquel Prado [thesis advisor]

  • Bruno Sanso [thesis advisor]

See Also

Useful links:


exdqlm documentation built on July 10, 2026, 1:08 a.m.