Skip to main content
Log in

An efficient sampling scheme for dynamic generalized models

  • Original Paper
  • Published:
Computational Statistics Aims and scope Submit manuscript


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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others


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

    Google Scholar 

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

    Book  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  • Doornik J (2002) Object-oriented matrix programming using Ox, 3rd edn. Timberlake Consultants Press, Oxford, London.

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MATH  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

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

    Google Scholar 

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

    Article  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MATH  Google Scholar 

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

    Article  MATH  Google Scholar 

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

    Article  MATH  Google Scholar 

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

    MathSciNet  MATH  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

  • R Development Core Team (2005) R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria,, 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

    Article  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  • 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

    Article  MathSciNet  MATH  Google Scholar 

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

    MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

Download references


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

Correspondence to Helio S. Migon.

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).

Table 6 Example of equations to be solved to compute the prior and posterior parameters involved in the conjugate updating step of CUBS

Rights and permissions

Reprints 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).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: