The Annals of Applied Statistics

Bayesian nonhomogeneous Markov models via Pólya-Gamma data augmentation with applications to rainfall modeling

Tracy Holsclaw, Arthur M. Greene, Andrew W. Robertson, and Padhraic Smyth

Full-text: Access denied (no subscription detected)

We're sorry, but we are unable to provide you with the full text of this article because we are not able to identify you as a subscriber. If you have a personal subscription to this journal, then please login. If you are already logged in, then you may need to update your profile to register your subscription. Read more about accessing full-text


Discrete-time hidden Markov models are a broadly useful class of latent-variable models with applications in areas such as speech recognition, bioinformatics, and climate data analysis. It is common in practice to introduce temporal nonhomogeneity into such models by making the transition probabilities dependent on time-varying exogenous input variables via a multinomial logistic parametrization. We extend such models to introduce additional nonhomogeneity into the emission distribution using a generalized linear model (GLM), with data augmentation for sampling-based inference. However, the presence of the logistic function in the state transition model significantly complicates parameter inference for the overall model, particularly in a Bayesian context. To address this, we extend the recently-proposed Pólya-Gamma data augmentation approach to handle nonhomogeneous hidden Markov models (NHMMs), allowing the development of an efficient Markov chain Monte Carlo (MCMC) sampling scheme. We apply our model and inference scheme to 30 years of daily rainfall in India, leading to a number of insights into rainfall-related phenomena in the region. Our proposed approach allows for fully Bayesian analysis of relatively complex NHMMs on a scale that was not possible with previous methods. Software implementing the methods described in the paper is available via the R package NHMM.

Article information

Ann. Appl. Stat., Volume 11, Number 1 (2017), 393-426.

Received: June 2016
Revised: December 2016
First available in Project Euclid: 8 April 2017

Permanent link to this document

Digital Object Identifier

Mathematical Reviews number (MathSciNet)

Zentralblatt MATH identifier

Nonhomogenous hidden Markov model multivariate time series Pólya-Gamma latent variables probit and logit link


Holsclaw, Tracy; Greene, Arthur M.; Robertson, Andrew W.; Smyth, Padhraic. Bayesian nonhomogeneous Markov models via Pólya-Gamma data augmentation with applications to rainfall modeling. Ann. Appl. Stat. 11 (2017), no. 1, 393--426. doi:10.1214/16-AOAS1009.

Export citation


  • Ailliot, P. and Monbet, V. (2012). Markov-switching autoregressive models for wind time series. Environ. Model. Softw. 30 92–101.
  • Ailliot, P., Allard, D., Monbet, V. and Naveau, P. (2015). Stochastic weather generators: An overview of weather type models. J. SFdS 156 101–113.
  • Aitchison, J. and Bennett, J. (1970). Polychotomous quantal response by maximum indicant. Biometrika 57 253–262.
  • Akaike, H. (1974). A new look at the statistical model identification. IEEE Trans. Automat. Control 19 716–723.
  • Albert, J. H. and Chib, S. (1993). Bayesian analysis of binary and polychotomous response data. J. Amer. Statist. Assoc. 88 669–679.
  • Bellone, E., Hughes, J. P. and Guttorp, P. (2000). A hidden Markov model for downscaling synoptic atmospheric patterns to precipitation amounts. Clim. Res. 15 1–12.
  • Berrocal, V. J., Gelfand, A. E. and Holland, D. M. (2010). A bivariate space–time downscaler under space and time misalignment. Ann. Appl. Stat. 4 1942–1975.
  • Carey-Smith, T., Sansom, J. and Thomson, P. (2014). A hidden seasonal switching model for multisite daily rainfall. Water Resour. Res. 50 257–272.
  • Challinor, A. J., Ewert, F., Arnold, S., Simelton, E. and Fraser, E. (2009). Crops and climate change: Progress, trends, and challenges in simulating impacts and informing adaptation. J. Exp. Bot. 60 2775–2789.
  • Charles, S. P., Bates, B. C. and Hughes, J. P. (1999). A spatiotemporal model for downscaling precipitation occurrence and amounts. J. Geophys. Res. 104 31657–31669.
  • Charles, S. P., Bates, B. C., Smith, I. N. and Hughes, J. P. (2004). Statistical downscaling of daily precipitation from observed and modelled atmospheric fields. Hydrol. Process. 18 1373–1394.
  • Chib, S. and Greenburg, E. (1998). Analysis of multivariate probit models. Biometrika 85 347–361.
  • Cox, D. R. (1970). The Analysis of Binary Data. Methuen & Co., Ltd., London.
  • Dempster, A. P. (1997). The direct use of likelihood for significance testing. Stat. Comput. 7 247–252.
  • Dempster, A. P., Laird, N. M. and Rubin, D. R. (1977). Maximum likelihood from incomplete data via the EM algorithm. J. R. Stat. Soc. Ser. B. Stat. Methodol. 39 1–38.
  • Diebold, F. X. and Lee, J. H. (1994). Regime switching with time-varying transition probabilities. In Nonstationary Time Series Analysis and Cointegrations (C. W. J. Granger and G. Mixon, eds.) 283–302. Oxford Univ. Press, London.
  • Filardo, A. J. and Gordon, S. F. (1998). Business cycle durations. J. Econometrics 85 99–123.
  • Forney, G. D. Jr. (1973). The Viterbi algorithm. Proc. IEEE 61 268–278.
  • Frühwirth-Schnatter, S. (1994). Data augmentation and dynamic linear models. J. Time Series Anal. 15 183–202.
  • Frühwirth-Schnatter, S. (2006). Finite Mixture and Markov Switching Models. Springer Science & Business Media, Berlin.
  • Frühwirth-Schnatter, S. and Frühwirth, R. (2007). Auxiliary mixture sampling with applications to logistic models. Comput. Statist. Data Anal. 51 3509–3528.
  • Fuentes, M. and Raftery, A. E. (2005). Model evaluation and spatial interpolation by Bayesian combination of observations with outputs from numerical models. Biometrics 61 36–45.
  • Furrer, E. M. and Katz, R. W. (2007). Generalized linear modeling approach to stochastic weather generators. Clim. Res. 34 129–144.
  • Gadgil, S. (2003). The Indian monsoon and its variability. Annu. Rev. Earth Planet. Sci. 31 429–467.
  • Germain, S. (2010). Bayesian spatio-temporal modelling of rainfall through non-homogenous hidden Markov models. Ph.D. thesis, Newcastle University, Newcastle, UK.
  • Gershunov, A., Schneider, N. and Barnet, T. (2001). Low-frequency modulation of the ENSO-Indian monsoon rainfall relationship: Signal or noise? J. Climate 14 2486–2492.
  • Ghil, M. and Robertson, A. W. (2002). “Waves” vs. “particles” in the atmosphere’s phase space: A pathway to long-range forecasting? Proc. Natl. Acad. Sci. USA 99 2493–2500.
  • Gneiting, T. and Raftery, A. E. (2007). Strictly proper scoring rules, prediction, and estimation. J. Amer. Statist. Assoc. 102 359–378.
  • Green, P. J. (1995). Reversible jump Markov chain Monte Carlo computation and Bayesian model determination. Biometrika 82 711–732.
  • Greene, A. M., Robertson, A. W. and Kirshner, S. (2008). Analysis of Indian monsoon daily rainfall on subseasonal to multidecadal time-scales using a hidden Markov model. Q. J. R. Meteorol. Soc. 134 875–887.
  • Greene, A. M., Robertson, A. W., Smyth, P. and Triglia, S. (2011). Downscaling projectios of the Indian monsoon rainfall using a non-homogeneous hidden Markov model. Q. J. R. Meteorol. Soc. 137 347–359.
  • Hansen, J. W., Challinor, A., Ines, A., Wheeler, T. and Moron, V. (2006). Translating climate forecasts into agricultural terms: Advances and challenges. Clim. Res. 33 27–41.
  • Hay, L. E., McCabe, G. J., Wolock, D. M. and Ayers, M. A. (1991). Simulation of precipitation by weather type analysis. Water Resour. Res. 27 493–501.
  • Heaps, S. E., Boys, R. J. and Farrow, M. (2015). Bayesian modelling of rainfall data by using non-homogeneous hidden Markov models and latent Gaussian variables. J. R. Stat. Soc. Ser. C. Appl. Stat. 64 543–568.
  • Holmes, C. C. and Held, L. (2006a). Bayesian auxiliary variable models for binary and multinomial regression. Bayesian Anal. 1 145–168.
  • Holmes, C. and Held, L. (2006b). Response to van der Lans. Bayesian Anal. 6 357–358.
  • Holsclaw, T., Greene, A. M., Robertson, A. W. and Smyth, P. (2016). A Bayesian hidden Markov model of daily precipitation over South and East Asia. J. Hydrometeorol. 17 3–25.
  • Holsclaw, T., Greene, A. M., Robertson, A. W. and Smyth, P. (2017). Supplement to “Bayesian nonhomogeneous Markov models via Pólya-Gamma data augmentation with applications to rainfall modeling.” DOI:10.1214/16-AOAS1009SUPP.
  • Hooten, M. B. and Wikle, C. K. (2010). Statistical agent-based models for discrete spatio-temporal systems. J. Amer. Statist. Assoc. 105 236–248.
  • Hughes, J. P. and Guttorp, P. (1994). A class of stochastic models for relating synoptic atmospheric patterns to regional hydrologic phenomena. Water Resour. Res. 30 1535–1546.
  • Hughes, J. P., Guttorp, P. and Charles, S. P. (1999). A non-homogeneous hidden Markov model for precipitation occurrence. J. R. Stat. Soc. Ser. C. Appl. Stat. 48 15–30.
  • Imai, K. and van Dyk, D. A. (2005). MNP: R package for fitting the multinomial probit model. J. Stat. Softw. 14 1–32.
  • Immerzeel, W. W., van Beek, L. P. H. and Bierkens, M. F. P. (2010). Climate change will affect the Asian water towers. Science 328 1382–1385.
  • Jasra, A., Holmes, C. C. and Stephens, D. A. (2005). Markov chain Monte Carlo and the label switching problem in Bayesian mixture modelling. J. Statist. Plann. Inference 20 2305–2315.
  • Johndrow, J. E., Lum, K. and Dunson, D. (2013). Diagonal orthant multinomial probit models. J. Mach. Learn. Res. Workshop Conf. Proc. 31 29–38.
  • Joseph, P. V., Gokulapalan, B., Nair, A. and Wilson, S. S. (2013). Variability of summer monsoon rainfall in India on inter-annual and decadal time scales. Atmos. Ocean. Sci. Lett. 6 398–403.
  • Jurafsky, D. and Martin, J. H. (2014). Speech and Language Processing. Prentice Hall, New York.
  • Kass, R. E. and Raftery, A. E. (1995). Bayes factors. J. Amer. Statist. Assoc. 90 773–795.
  • Katz, R. and Parlange, M. (1995). Generalization of chain-dependent processes: Application to hourly precipitation. Water Resour. Res. 31 1331–1341.
  • Kim, C.-J., Piger, J. and Startz, R. (2008). Estimation of Markov regime-switching regression models with endogenous switching. J. Econometrics 143 263–273.
  • Kirshner, S. (2010). Modeling of multivariate time series using hidden Markov models. Ph.D. thesis, University of California, Irvine.
  • Kirshner, S., Smyth, P. and Robertson, A. W. (2004). Conditional Chow-Liu tree structures for modeling discrete-valued vector time series. In Proc. 20th Conf. UAI 317–324.
  • Lau, K.-M. and Chan, P. H. (1986). Aspects of the 40–50 day oscillation during the northern summer as inferred from outgoing longwave radiation. Mon. Weather Rev. 114 1354–1367.
  • Lee, J. Y., Wang, B., Wheeler, M. C., Fu, X., Waliser, D. E. and Kang, I. S. (2013). Real-time multivariate indices for the boreal summer intraseasonal oscillation over the Asian summer monsoon region. Clim. Dyn. 40 493–509.
  • MacDonald, I. L. and Zucchini, W. (1997). Hidden Markov and Other Models for Discrete-Valued Time Series. Monographs on Statistics and Applied Probability 70. Chapman & Hall, London.
  • Mamon, R. S. and Elliott, R. J., eds. (2007). Hidden Markov Models in Finance. International Series in Operations Research & Management Science 104. Springer, New York.
  • Maraun, D., Wetterhall, F., Ireson, A. M., Chandler, R. E., Kendon, E. J., Widmann, M., Brienen, S., Rust, H. W., Sauter, T., Themeßl, M. et al. (2010). Precipitation downscaling under climate change: Recent developments to bridge the gap between dynamical models and the end user. Rev. Geophys. 48 1–34.
  • McCullagh, P. and Nelder, J. (1989). Generalized Linear Models. Chapman & Hall, New York.
  • McCulloch, R., Polson, N. G. and Rossi, P. E. (2000). A Bayesian analysis of the multinomial probit model with fully identified parameters. J. Econometrics 99 173–193.
  • Meligkotsidou, L. and Dellaportas, P. (2011). Forecasting with non-homogeneous hidden Markov models. Stat. Comput. 21 439–449.
  • Moron, V., Robertson, A. W. and Ghil, M. (2012). Impact of the modulated annual cycle and intraseasonal oscillation on daily-to-interannual rainfall variability across monsoonal India. Clim. Dyn. 38 2409–2435.
  • Neal, R. M. (1997). Monte Carlo implementation of Gaussian process models for Bayesian regression and classification. Technical Report No. 9702, Department of Statistics, University of Toronto.
  • O’Brien, S. M. and Dunson, D. B. (2004). Bayesian multivariate logistic regression. Biometrics 60 739–746.
  • Paap, R. and Frances, P. H. (2000). A dynamic multinomial probit model for brand choices with different short-run effects of marketing mix variables. J. Appl. Econometrics 15 717–744.
  • Paroli, R. and Spezia, L. (2008). Bayesian inference in non-homogeneous Markov mixtures of periodic autoregressions with state-dependent exogenous variables. Comput. Statist. Data Anal. 52 2311–2330.
  • Patterson, T. A., Parton, A., Langrock, R., Blackwell, P. G., Thomas, L. and King, R. (2016). Statistical modelling of animal movement: A myopic review and a discussion of good practice. Available at
  • Piani, C., Weedon, G. P., Best, M., Gomes, S. M., Viterbo, P., Hagemann, S. and Haerter, J. O. (2010). Statistical bias correction of global simulated daily precipitation and temperature for the application of hydrological models. J. Hydrol. 395 199–215.
  • Polson, N. G., Scott, J. G. and Windle, J. (2013). Bayesian inference for logistic models using Pólya-Gamma latent variables. J. Amer. Statist. Assoc. 108 1339–1349.
  • Rajagopalan, B., Lall, U. and Tarboton, D. G. (1996). Nonhomogeneous Markov model for daily precipitation. J. Hydrol. Eng. 1 33–40.
  • Raphael, C. (1999). Automatic segmentation of acoustic musical signals using hidden Markov models. IEEE Trans. Pattern Anal. Mach. Intell. 21 360–370.
  • Riihimaki, J., Jylanki, P. and Vehtari, A. (2013). Nested expectation propagation for Gaussian process classification with a multinomial probit likelihood. J. Mach. Learn. Res. 14 75–109.
  • Robert, C. P., Rydén, T. and Titterington, D. M. (2000). Bayesian inference in hidden Markov models through the reversible jump Markov chain Monte Carlo method. J. R. Stat. Soc. Ser. B. Stat. Methodol. 62 57–75.
  • Robertson, A. W. (2009). Seasonal predictability of daily rainfall statistics over indramayu district, Indonesia. Int. J. Climatol. 29 1449–1462.
  • Rydén, T. (2008). EM versus Markov chain Monte Carlo for estimation of hidden Markov models: A computational perspective. Bayesian Anal. 3 659–688.
  • Schwarz, G. E. (1978). Estimating the dimension of a model. Ann. Statist. 6 461–464.
  • Scott, S. L. (2002). Bayesian methods for hidden Markov models: Recursive computing in the 21st century. J. Amer. Statist. Assoc. 97 337–351.
  • Scott, S. L. (2011). Data augmentation, frequentist estimation, and the Bayesian analysis of multinomial logit models. Statist. Papers 52 87–109.
  • Shukla, J. and Paolino, D. A. (1983). The southern oscillation and long-range forecasting of the summer monsoon rainfall over India. Mon. Weather Rev. 111 1830–1837.
  • Siepel, A. and Haussler, D. (2004). Combining phylogenetic and hidden Markov models in biosequence analysis. J. Comput. Biol. 11 413–428.
  • Smith, T. M., Reynolds, R. W., Peterson, T. C. and Lawrimore, J. (2008). Improvements to NOAA’s historical merged land-ocean surface temperature analysis (1880–2006). J. Climate 21 2283–2296.
  • Spezia, L. (2009). Reversible jump and the label switching problem in hidden Markov models. Statist. Sci. 139 50–67.
  • Spezia, L., Cooksley, S. L., Brewer, M. J., Donnelly, D. and Tree, A. (2014). Modelling species abundance in a river by Negative Binomial hidden Markov models. Comput. Statist. Data Anal. 71 599–614.
  • Spiegelhalter, D. J., Best, N. G., Carlin, B. P. and van der Linde, A. (2002). Bayesian measure of model complexity and fit. J. R. Stat. Soc. Ser. B. Stat. Methodol. 64 583–639.
  • Stern, R. D. and Coe, R. (1984). A model fitting analysis of daily rainfall data. J. Roy. Statist. Soc. Ser. A 147 1–34.
  • Vermeulen, S. J., Challinor, A. J., Thornton, P. K., Campbell, B. M., Eriyagama, N., Vervoort, J. M., Kinyangi, J., Jarvis, A., Läderach, P., Ramirez-Villegas, J. et al. (2013). Addressing uncertainty in adaptation planning for agriculture. Proc. Natl. Acad. Sci. USA 110 8357–8362.
  • Wang, B. and Fan, Z. (1999). Choice of South Asian summer monsoon indices. Bull. Am. Meteorol. Soc. 80 629–638.
  • Wilks, D. S. (1998). Multisite generalization of a daily stochastic precipitation generation model. J. Hydrol. 210 178–191.
  • Wilks, D. S. (1999a). Interannual variability and extreme-value characteristics of several stochastic daily precipitation models. Agric. For. Meteorol. 93 153–170.
  • Wilks, D. S. (1999b). Multisite downscaling of daily precipitation with a stochastic weather generator. Clim. Res. 11 125–136.
  • Wilks, D. S. and Wilby, R. L. (1999). The weather generation game: A review of stochastic weather models. Prog. Phys. Geogr. 23 329–357.
  • Woolhiser, D. A. and Roldan, J. (1982). Stochastic daily precipitation models 2. A comparison of distributions of amounts. Water Resour. Res. 18 1461–1468.
  • Yoo, J. H., Robertson, A. W. and Kang, I.-S. (2010). Analysis of intraseasonal and interannual variability of the Asian summer monsoon using a hidden Markov model. J. Climate 23 5498–5516.
  • Zhang, X., Boscardin, W. J. and Belin, T. R. (2008). Bayesian analysis of multivariate nominal measures using multivariate multinomial probit models. Comput. Statist. Data Anal. 52 3697–3708.
  • Zhang, Y., Wallace, J. M. and Battisti, D. S. (1997). ENSO-like interdecadal variability: 1900–93. J. Climate 10 1004–1020.
  • Zucchini, W. and Guttorp, P. (1991). A hidden Markov model for space–time precipitation. Water Resour. Res. 27 1917–1923.
  • Zucchini, W., MacDonald, I. and Langrock, R. (2016). Hidden Markov Models for Time Series: An Introduction Using R. Chapman & Hall, Boca Raton.

Supplemental materials

  • Additional Results and Figures. The Supplemental Material includes figures for each individual station for many of the metrics and plots. A few additional results and metrics are also included.