Bayesian Estimation of Simultaneous Regression Quantiles Using Hamiltonian Monte Carlo
Abstract
:1. Introduction
- Conduct a simultaneous quantile estimation embedded with the HMC algorithm through Bayesian inference;
- Conduct a sensitivity analysis on the performance of the HMC algorithm in handling univariate linear quantiles and multivariate linear quantiles.
2. Simultaneous Quantile Regression
2.1. Asymmetric Laplace Distribution
2.2. Regression Quantile
2.3. Bayesian Linear Quantile Regression
2.4. Simultaneous Quantile Regression
- Consider partitioning the entire sample into the sub-samples below:
- In order to characterize the likelihood through all quantiles of interest, we use the relationship that connects any -th quantile to the p-th quantile of the :
3. Hamiltonian Monte Carlo
- Randomly sample momentum variables, regardless of present position;
- Update Metropolis using simulated Hamiltonian dynamics (implemented by the leapfrog method, for example).
- Leapfrog Method:
- HMC Algorithm:
- New values are drawn randomly from their Gaussian distribution for the momentum variables, irrespective of the current position variables values.
- Updating Metropolis is performed using Hamiltonian dynamics to suggest a new state. Starting with the current state , Hamiltonian dynamics is simulated using the leapfrog method (or some other reversible method that preserves volume) for L steps, using a step size of . At the end of this L-step trajectory, the momentum variables are then negated, resulting in a suggested state . This proposed state is accepted as the next state in the Markov chain with probability:
4. Numerical Results
- Univariate linear quantile: with .
- Multivariate linear quantile: , with , and either or , .
4.1. Univariate Linear Quantile
4.2. Multivariate Linear Quantile
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Correction Statement
Appendix A. STAN Code
data{ |
int<lower=1> n; // number of observations |
int<lower=1> d; // number of covariables |
int<lower=1> q; // number(quantiles) |
real Y[n]; // response variable |
matrix[n, d + q] X ; // covariates |
real<lower=0, upper=1> tau[q]; // quantiles of interest |
real<lower=0, upper=1> p; // hyperparameter used to caracterize ALD |
} |
transformed data{ |
real gammap = (1. − 2.∗p) / (p ∗ (1.−p)) ; // in prior of Beta |
real delta2p = 2. / (p ∗ (1.−p)) ; // in prior of Beta |
vector[n] G ; |
real g[q] ; |
int sub_sample_size = n/q ; |
for (j in 1:q) { |
// q is the size of tau |
// q is also the size of sub-samples |
// j is always used for the id in 1:q |
if (tau[j]<=p) { |
g[j] = log(tau[j]/p) / (1.−p); |
} else { |
g[j] = −log((1.−tau[j])/(1.−p)) / p ; |
} |
} |
for(j in 1:q) { |
for(i in ((j−1)∗sub_sample_size + 1):(j ∗ sub_sample_size )) { |
G[i] = g[j]; |
} |
} |
} |
parameters{ |
vector[d + q] Beta; |
real <lower=0> sigma; |
real <lower=0> omega[n]; // depends on sigma |
} |
model{ |
sigma ~ inv_gamma(1., 0.01); |
omega ~ exponential(1/sigma); |
Beta ~ normal(0, 1.); |
for(i in 1:n){ |
Y[i] ~ normal( X[i] ∗ Beta - sigma∗G[i] + gammap ∗ omega[i], |
sqrt(delta2p ∗ sigma ∗ omega[i])); |
} |
} |
Appendix B. Univariate Linear Quantile
Mean | SD | Theoretical Quantile | RMSE | |
---|---|---|---|---|
HMC | ||||
4.27 | 0.1 | 4.33 | 0.06 | |
2.05 | 0.2 | 2 | 0.05 | |
Gibbs | ||||
4.64 | 0.08 | 4.33 | 0.31 | |
2.1 | 0.17 | 2 | 0.1 | |
Metropolis-Hastings | ||||
4.7 | 0.17 | 4.33 | 0.37 | |
1.64 | 0.27 | 2 | 0.36 |
References
- Buhai, S. Quantile regression: Overview and selected applications. Ad Astra 2005, 4, 1–17. [Google Scholar]
- Yang, J.; Meng, X.; Mahoney, M. Quantile regression for large-scale applications. Int. Conf. Mach. Learn. 2013, 28, 881–887. [Google Scholar] [CrossRef]
- Lusiana, E.D.; Arsad, S.; Buwono, N.R.; Putri, I.R. Performance of Bayesian quantile regression and its application to eutrophication modelling in Sutami Reservoir, East Java, Indonesia. Ecol. Quest. 2019, 30, 69–77. [Google Scholar] [CrossRef]
- Koenker, R. Quantile regression: 40 years on. Annu. Rev. Econ. 2017, 9, 155–176. [Google Scholar] [CrossRef]
- Firpo, S.; Fortin, N.M.; Lemieux, T. Unconditional quantile regressions. Econometrica 2009, 77, 953–973. [Google Scholar]
- Cade, B.S.; Noon, B.R. A gentle introduction to quantile regression for ecologists. Front. Ecol. Environ. 2003, 1, 412–420. [Google Scholar] [CrossRef]
- He, X.; Pan, X.; Tan, K.M.; Zhou, W.X. Smoothed quantile regression with large-scale inference. J. Econom. 2023, 232, 367–388. [Google Scholar] [CrossRef] [PubMed]
- Härdle, W. Applied Nonparametric Regression; Cambridge University Press: Cambridge, UK, 1990. [Google Scholar]
- Granger, C.W.; Teräsvirta, T. Modelling Nonlinear Economic Relationships; Oxford University Press: Oxford, UK, 1993. [Google Scholar]
- Cade, B.S. Quantile regression applications in ecology and the environmental sciences. In Handbook of Quantile Regression; Chapman and Hall/CRC: Boca Raton, FL, USA, 2017; pp. 429–454. [Google Scholar]
- Wei, Y.; Kehm, R.D.; Goldberg, M.; Terry, M.B. Applications for quantile regression in epidemiology. Curr. Epidemiol. Rep. 2019, 6, 191–199. [Google Scholar] [CrossRef]
- Peng, L.; Huang, Y. Survival analysis with quantile regression models. J. Am. Stat. Assoc. 2008, 103, 637–649. [Google Scholar] [CrossRef]
- Abid, N.; Ahmad, F.; Aftab, J.; Razzaq, A. A blessing or a burden? Assessing the impact of climate change mitigation efforts in Europe using quantile regression models. Energy Policy 2023, 178, 113589. [Google Scholar] [CrossRef]
- Che, C.; Li, S.; Yin, Q.; Li, Q.; Geng, X.; Zheng, H. Does income inequality have a heterogeneous effect on carbon emissions between developed and developing countries? Evidence from simultaneous quantile regression. Front. Environ. Sci. 2023, 11, 1271457. [Google Scholar] [CrossRef]
- Bernardi, M.; Gayraud, G.; Petrella, L. Bayesian tail risk interdependence using quantile regression. Bayesian Anal. 2015, 10, 553–603. [Google Scholar] [CrossRef]
- Koenker, R.; Bassett, G., Jr. Regression quantiles. Econom. J. Econom. Soc. 1978, 46, 33–50. [Google Scholar] [CrossRef]
- Benoit, D.F.; den Poel, D.V. bayesQR: A Bayesian approach to quantile regression. J. Stat. Softw. 2017, 76, 1–32. [Google Scholar] [CrossRef]
- Alhamzawi, R.; Algamal, Z.Y. Bayesian bridge quantile regression. Commun. Stat.-Simul. Comput. 2019, 48, 944–956. [Google Scholar] [CrossRef]
- Lancaster, T.; Jun, S.J. Bayesian quantile regression methods. J. Appl. Econom. 2010, 25, 287–307. [Google Scholar] [CrossRef]
- Kozumi, H.; Kobayashi, G. Gibbs sampling methods for Bayesian quantile regression. J. Stat. Comput. Simul. 2011, 81, 1565–1578. [Google Scholar] [CrossRef]
- Yu, K.; Moyeed, R.A. Bayesian quantile regression. Stat. Probab. Lett. 2001, 54, 437–447. [Google Scholar] [CrossRef]
- Koenker, R.; Chernozhukov, V.; He, X.; Peng, L. Handbook of Quantile Regression; CRC Press: Boca Raton, FL, USA, 2017. [Google Scholar]
- Cannon, A.J. Non-crossing nonlinear regression quantiles by monotone composite quantile regression neural network, with application to rainfall extremes. Stoch. Environ. Res. Risk Assess. 2018, 32, 3207–3225. [Google Scholar] [CrossRef]
- Liu, Y.; Wu, Y. Simultaneous multiple non-crossing quantile regression estimation using kernel constraints. J. Nonparametric Stat. 2011, 23, 415–437. [Google Scholar] [CrossRef]
- Takeuchi, I.; Furuhashi, T. Non-crossing quantile regressions by SVM. In Proceedings of the 2004 IEEE International Joint Conference on Neural Networks (IEEE Cat. No. 04CH37541), Budapest, Hungary, 25–29 July 2004; Volume 1, pp. 401–406. [Google Scholar]
- Firpo, S.; Galvao, A.F.; Pinto, C.; Poirier, A.; Sanroman, G. GMM quantile regression. J. Econom. 2022, 230, 432–452. [Google Scholar] [CrossRef]
- Merhi Bleik, J. Fully Bayesian estimation of simultaneous regression quantiles under asymmetric Laplace distribution specification. J. Probab. Stat. 2019, 2019, 8610723. [Google Scholar] [CrossRef]
- Yu, K.; Zhang, J. A three-parameter asymmetric Laplace distribution and its extension. Commun. Stat. Methods 2005, 34, 1867–1879. [Google Scholar] [CrossRef]
- Huber, P.J. Robust regression: Asymptotics, conjectures and Monte Carlo. Ann. Stat. 1973, 1, 799–821. [Google Scholar] [CrossRef]
- Liu, Y.; Wu, Y. Stepwise multiple quantile regression estimation using non-crossing constraints. Stat. Interface 2009, 2, 299–310. [Google Scholar] [CrossRef]
- Bondell, H.D.; Reich, B.J.; Wang, H. Noncrossing quantile regression curve estimation. Biometrika 2010, 97, 825–838. [Google Scholar] [CrossRef] [PubMed]
- Sangnier, M.; Fercoq, O.; d’Alché-Buc, F. Joint quantile regression in vector-valued RKHSs. In Proceedings of the 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain, 5–10 December 2016; pp. 3693–3701. [Google Scholar]
- Reich, B.J.; Fuentes, M.; Dunson, D.B. Bayesian spatial quantile regression. J. Am. Stat. Assoc. 2011, 106, 6–20. [Google Scholar] [CrossRef]
- Xu, S.G.; Reich, B.J. Bayesian nonparametric quantile process regression and estimation of marginal quantile effects. Biometrics 2023, 79, 151–164. [Google Scholar] [CrossRef] [PubMed]
- Das, P.; Ghosal, S. Bayesian non-parametric simultaneous quantile regression for complete and grid data. Comput. Stat. Data Anal. 2018, 127, 172–186. [Google Scholar] [CrossRef]
- Duane, S.; Kennedy, A.D.; Pendleton, B.J.; Roweth, D. Hybrid Monte Carlo. Phys. Lett. B 1987, 195, 216–222. [Google Scholar] [CrossRef]
- Warner, B.A. Bayesian Learning for Neural Networks (Lecture Notes in Statistics Vol. 118). J. Am. Stat. Assoc. 1997; 92, 791. [Google Scholar]
- Neal, R.M. MCMC using Hamiltonian dynamics. In Handbook of Markov Chain Monte Carlo; Chapman and Hall/CRC: Boca Raton, FL, USA, 2011; Volume 2, p. 2. [Google Scholar]
- Hastings, W.K. Monte Carlo Sampling Methods Using Markov Chains and Their Applications; Oxford University Press: Oxford, UK, 1970. [Google Scholar]
- Geman, S.; Geman, D. Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images. In Readings in Computer Vision; Elsevier: Amsterdam, The Netherlands, 1987; pp. 564–584. [Google Scholar]
- Betancourt, M. A conceptual introduction to Hamiltonian Monte Carlo. arXiv 2017, arXiv:1701.02434. [Google Scholar]
- Hoffman, M.D.; Gelman, A. The No-U-Turn sampler: Adaptively setting path lengths in Hamiltonian Monte Carlo. J. Mach. Learn. Res. 2014, 15, 1593–1623. [Google Scholar]
- Stan Development Team. RStan: The R interface to Stan, Version 2.5.0; Stan Development Team: New York, NY, USA, 2014.
- Gelman, A.; Lee, D.; Guo, J. Stan: A probabilistic programming language for Bayesian inference and optimization. J. Educ. Behav. Stat. 2015, 40, 530–543. [Google Scholar] [CrossRef]
- Carpenter, B.; Gelman, A.; Hoffman, M.D.; Lee, D.; Goodrich, B.; Betancourt, M.; Brubaker, M.A.; Guo, J.; Li, P.; Riddell, A. Stan: A probabilistic programming language. J. Stat. Softw. 2017, 76, 1. [Google Scholar] [CrossRef]
- Grinsztajn, L.; Semenova, E.; Margossian, C.C.; Riou, J. Bayesian workflow for disease transmission modeling in Stan. Stat. Med. 2021, 40, 6209–6234. [Google Scholar] [CrossRef]
- Gelman, A.; Shirley, K. Inference from simulations and monitoring convergence. In Handbook of Markov Chain Monte Carlo; CRC Press: Boca Raton, FL, USA, 2011; Volume 6, pp. 163–174. [Google Scholar]
Mean | SD | Theoretical Quantile | RMSE | |
---|---|---|---|---|
0.44 | 0.05 | 0.56 | 0.12 | |
0.75 | 0.04 | 0.83 | 0.08 | |
2.1 | 0.01 | 2 | 0.1 | |
−0.63 | 0.15 | 0.56 | 1.19 | |
−0.39 | 0.14 | 0.83 | 1.22 | |
2.22 | 0.02 | 2 | 0.22 |
Mean | SD | Theoretical Quantile | RMSE | |
---|---|---|---|---|
300 Observations | ||||
0.15 | 0.05 | 0.19 | 0.4 | |
0.24 | 0.04 | 0.27 | 0.03 | |
1.98 | 0.02 | 2 | 0.02 | |
1.51 | 0.02 | 1.5 | 0.01 | |
0.98 | 0.02 | 1 | 0.02 | |
6.02 | 0.02 | 6 | 0.01 | |
2.01 | 0.02 | 2 | 0.01 | |
2.97 | 0.01 | 3 | 0.03 | |
2 | 0.01 | 2 | 0 | |
1 | 0.01 | 1 | 0 | |
6.01 | 0.01 | 6 | 0.1 | |
3.98 | 0.01 | 4 | 0.02 | |
3000 Observations | ||||
0.17 | 0.01 | 0.19 | 0.02 | |
0.25 | 0.02 | 0.27 | 0.02 | |
1.99 | 0.02 | 2 | 0.01 | |
1.5 | 0.01 | 1.5 | 0 | |
0.99 | 0.01 | 1 | 0.01 | |
6.01 | 0.01 | 6 | 0.01 | |
2 | 0.01 | 2 | 0 | |
3 | 0.01 | 3 | 0.01 | |
2.99 | 0.01 | 2 | 0.01 | |
1 | 0.01 | 1 | 0 | |
5.99 | 0.01 | 6 | 0.1 | |
4 | 0.01 | 4 | 0 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Hachem, H.; Abboud, C. Bayesian Estimation of Simultaneous Regression Quantiles Using Hamiltonian Monte Carlo. Algorithms 2024, 17, 224. https://doi.org/10.3390/a17060224
Hachem H, Abboud C. Bayesian Estimation of Simultaneous Regression Quantiles Using Hamiltonian Monte Carlo. Algorithms. 2024; 17(6):224. https://doi.org/10.3390/a17060224
Chicago/Turabian StyleHachem, Hassan, and Candy Abboud. 2024. "Bayesian Estimation of Simultaneous Regression Quantiles Using Hamiltonian Monte Carlo" Algorithms 17, no. 6: 224. https://doi.org/10.3390/a17060224
APA StyleHachem, H., & Abboud, C. (2024). Bayesian Estimation of Simultaneous Regression Quantiles Using Hamiltonian Monte Carlo. Algorithms, 17(6), 224. https://doi.org/10.3390/a17060224