## Abstract

A multimove sampling scheme for the state parameters of non-Gaussian and nonlinear dynamic models for univariate time series is proposed. This procedure follows the Bayesian framework, within a Gibbs sampling algorithm with steps of the Metropolis–Hastings algorithm. This sampling scheme combines the conjugate updating approach for generalized dynamic linear models, with the backward sampling of the state parameters used in normal dynamic linear models. A quite extensive Monte Carlo study is conducted in order to compare the results obtained using our proposed method, conjugate updating backward sampling (CUBS), with those obtained using some algorithms previously proposed in the Bayesian literature. We compare the performance of CUBS with other sampling schemes using two real datasets. Then we apply our algorithm in a stochastic volatility model. CUBS significantly reduces the computing time needed to attain convergence of the chains, and is relatively simple to implement.

### Similar content being viewed by others

## References

Abramovitch M, Stegun A (1965) Handbook of mathematical functions, with formulas, graphs and mathematical tables. Dover Publications, New York

Bernardo J, Smith A (1994) Bayesian theory. Wiley, Chichester

Carter C, Kohn R (1994) On Gibbs sampling for state space models. Biometrika 81:541–553

de Jong P, Shephard N (1995) The simulation smoother for time series models. Biometrika 82:339–350

Doornik J (2002) Object-oriented matrix programming using Ox, 3rd edn. Timberlake Consultants Press, Oxford, London. http://www.nuff.ox.ac.uk/Users/Doornik.

Durbin J, Koopman SJ (2002) A simple and efficient simulation smoother for state space time series analysis. Biometrika 89(3):603–615

Fahrmeir L (1992) Posterior mode estimation by extended Kalman filtering for multivariate dynamic linear models. J Am Stat Assoc 87:501–509

Frühwirth-Schnater S (1994) Data augmentation and dynamic linear models. J Time Ser Anal 15(2):183–202

Gamerman D (1998) Markov chain Monte Carlo for dynamic generalised linear models. Biometrika 85(1):215–227

Gamerman D, Lopes HF (2006) Markov chain Monte Carlo: stochastic simulation for Bayesian inference. Chapman & Hall, New York

Gelman A, Rubin D (1992) Inference from iterative simulation using multiple sequences. Stat Sci 7:457–511

Geweke J, Tanizaki H (2001) Bayesian estimation of state space models using metropolis-hastings algorithm within Gibbs sampling. Comput Stat Data Anal 37:151–170

Gilks W, Wild P (1992) Adaptive rejection sampling for Gibbs sampling. Appl Stat 41(2):337–348

Gilks W, Best N, Tan K (1995) Adaptive rejection metropolis sampling within Gibbs sampling. Appl Stat 44(4):455–472

Kim S, Shephard N, Chib S (1998) Stochastic volatility: likelihood inference and comparison with ARCH models. Rev Econ Stud 65:361–393

Kitagawa G (1987) Non-Gaussian state-space modeling of non-stationary time series. J Am Stat Assoc 82:1032–1041

Migon H, Gamerman D, Lopes H, Ferreira M (2005) Bayesian dynamic models. In: Dey D, C Rao E (eds) Handbook of statistics. Bayesian statistics: modeling and computation, vol 25, pp 553–588

Monteiro AB (1992) Modelos dinâmicos aplicados a modelagem chuva-vazão. Master’s thesis, Instituto de Matemática, UFRJ, Rio de Janeiro, Brazil, (in Portuguese)

Neal R (2003) Slice sampling (with discussion). Ann Stat 31:705–767

R Development Core Team (2005) R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, http://www.R-project.org, ISBN 3-900051-07-0

Ravines R, Schmidt AM, Migon HS, Rennó CD (2008) A joint model for rainfall-runoff: the case of Rio Grande basin. J Hydrol 353:189–200

Shephard N, Pitt M (1997) Likelihood analysis of non-Gaussian measurement time series. Biometrika 84:653–667

Watanabe T, Omori Y (2004) A multi-move sampler for estimating non-Gaussian times series models: comments on Shephard and Pitt (1997). Biometrika 91:246–248

West M, Harrison J (1997) Bayesian forecasting and dynamic models, 2nd edn. Springer, New York

West M, Harrison J, Migon H (1985) Dynamic generalized linear models and Bayesian forecasting. J Am Stat Assoc 80(389):73–83

## Acknowledgments

This work was part of Romy E. R. Ravines’ PhD program under the supervision of Helio S. Migon and Alexandra M. Schmidt. João B. M. Pereira contributed with some applications and simulations. The work of Romy R. Ravines was supported by a grant from *Coordenação de Aperfeiçoamento de Pessoal de Nível Superior* (CAPES), Brazil. Helio S. Migon, Alexandra M. Schmidt and João B. M. Pereira were supported by *Conselho Nacional de Desenvolvimento Científico e Tecnológico* (CNPq), Brazil. The authors thank Mike West and Yuhong Wu, the editor and two anonymous reviewers’, whose comments greatly improved the presentation of the paper.

## Author information

### Authors and Affiliations

### Corresponding author

## Appendix: Some equations for prior and posterior parameters

### Appendix: Some equations for prior and posterior parameters

Let \(r_t\) and \(s_t\) be the parameters of the conjugate prior of \(\eta _t\), that is \(\eta _t \sim CP[r_t,s_t]\). Consider \(f_t=E[g(\eta _t)|Y^{t-1},\Phi ]\) and \(q_t=var[g(\eta _t)|Y^{t-1},\Phi ]\), the prior moments obtained from the linear predictor in (1b), and let \(f_t^*\) and \(q_t^*\) be the resultant posterior moments. Assuming the most used distributions in practice, Table 6 shows the equations to be solved in order to obtain \(r_t\) and \(s_t\) as a function of \(f_t\) and \(q_t\); and \(f^*_t\), \(q^*_t\) as a function of \(r^*_t=r_t +\phi y_t\) and \(s^*_t = s_t + \phi \). In Table 6, \(\gamma (\cdot )=\frac{d}{dz} \Gamma (z)\) and \(\gamma ^{\prime }(\cdot )= \frac{d}{dz} \gamma (z)\) denote the digamma and trigamma functions, respectively. Useful recurrence relationships and approximations are: for the digamma function, \( \gamma (z) = \gamma (z+1) - \frac{1}{z}\) and \(\gamma (z) \simeq log(z) - \frac{1}{2z}\); for the trigama function, \( \gamma ^{\prime }(z) = \gamma ^{\prime }(z+1) + \frac{1}{z^2}\) and \(\gamma ^{\prime } (z) \simeq \frac{1}{z} + \frac{1}{2z^2}\). When \(z>3\) the following approximation is better: \(\gamma (z) \simeq log(z-\frac{1}{2})\). In the third column of the table we find the solution in an implicit form which needs to be solved numerically, and the following approximations for the gamma and digamma functions are used: \(\gamma (x) \approx \log (x)\) and \(\gamma ^{\prime }(x) \approx 1/x\) (see Abramovitch and Stegun 1965, pp. 258–259, for details).

## Rights and permissions

## About this article

### Cite this article

Migon, H.S., Schmidt, A.M., Ravines, R.E.R. *et al.* An efficient sampling scheme for dynamic generalized models.
*Comput Stat* **28**, 2267–2293 (2013). https://doi.org/10.1007/s00180-013-0406-9

Received:

Accepted:

Published:

Issue Date:

DOI: https://doi.org/10.1007/s00180-013-0406-9