| Type: | Package |
| Title: | Adaptive Generalized Bayesian Quantile Regression |
| Version: | 0.1.0 |
| Date: | 2026-06-16 |
| Description: | Implements adaptive generalized Bayesian quantile regression with quantile-specific learning rates, HAC-based calibration, Gibbs posterior simulation, posterior summaries, predictive evaluation, and visualization tools. The package builds on the generalized Bayesian composite quantile regression framework of Hardy and Korobilis (2026) <doi:10.2139/ssrn.6618603> by allowing learning rates to vary across quantile levels. The implementation is designed for empirical work with small and moderate time-series samples where posterior calibration and tail-specific inference are important. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Imports: | quantreg, MASS, stats |
| Suggests: | testthat |
| NeedsCompilation: | no |
| Packaged: | 2026-06-16 14:02:46 UTC; khder |
| Author: | Khder Alakkari [aut, cre] |
| Maintainer: | Khder Alakkari <khderalakkari1990@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-06-22 15:00:38 UTC |
Adaptive Generalized Bayesian Quantile Regression
Description
Estimates adaptive generalized Bayesian quantile regression using a Gibbs posterior, quantile-specific learning-rate calibration, and adaptive Metropolis simulation. The method extends the loss-based generalized Bayesian quantile framework of Hardy and Korobilis (2026) by allowing learning rates to vary across quantile levels.
Usage
agbqr(y, X, taus = c(0.10, 0.25, 0.50, 0.75, 0.90),
prior = "normal", prior_var = 100,
M = 30000, burnin = 10000, seed = 12345)
Arguments
y |
Numeric response vector. |
X |
Numeric matrix or data frame of predictors. |
taus |
Numeric vector of quantile levels. |
prior |
Prior type. Use "normal" or "flat". |
prior_var |
Prior variance used under the normal prior. |
M |
Total number of MCMC iterations. |
burnin |
Number of burn-in iterations. |
seed |
Random seed. |
Value
An object of class agbqr containing posterior draws, calibrated learning rates,
posterior summaries, and estimation settings.
References
Hardy, N. and Korobilis, D. (2026). Generalized Bayesian Composite Quantile Regression with an Application to Equity Premium Forecasting. SSRN. doi:10.2139/ssrn.6618603.
Examples
set.seed(123)
n <- 50
x1 <- rnorm(n)
x2 <- rnorm(n)
x3 <- rnorm(n)
y <- 0.5 + x1 - 0.5 * x2 + 0.3 * x3 + rt(n, df = 3)
X <- cbind(LEXR = x1, M2GDP = x2, TRDGDP = x3)
fit <- agbqr(y = y, X = X, taus = c(0.50), M = 1000, burnin = 500)
summary(fit)