Skip to main content
Log in

Modeling discharge rating curves with Bayesian B-splines

  • Original Paper
  • Published:
Stochastic Environmental Research and Risk Assessment Aims and scope Submit manuscript

Abstract

River discharges are traditionally modeled by employing a standard power-law methodology. Recently, the Bayesian approached has successfully been applied to improve the estimates of the standard power-law. In this article, an extension to the standard power-law based on Bayesian B-splines is developed and tested on data sets from 61 different rivers. The extended model is evaluated against the standard power-law using two measures, the Deviance Information Criterion and Bayes factor. The extended model captures deviations in the data from the standard power-law but reduces to the standard power-law when that model is adequate. The standard power-law is inadequate for 26% of the rivers while the extended model provides an adequate fit in all of those cases and for the remaining 74% of the rivers the extended model and the power-law model both give adequate fit with almost identical estimates.

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

Similar content being viewed by others

References

  • Arnason S (2005) Estimating nonlinear hydrological rating curves and discharge using the Bayesian approach. Masters thesis, Faculty of Engineering, University of Iceland

  • Clarke R (1999) Uncertainty in the estimation of mean annual flood due to rating-curve indefinition. J Hydrol 222:185–190

    Article  Google Scholar 

  • Di Baldassarre G, Montanari A (2009) Uncertainty in river discharge observations: a quantitative analysis. Hydrol Earth Syst Sci 13:913–921

    Article  Google Scholar 

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

    Article  Google Scholar 

  • Gelman A, Carlin J, Stern H, Rubin D (2004) Bayesian data analysis (2nd edn.) Chapman and Hall/CRC, Boca Raton

  • ISO (1983) Liquid flow measurements in open channels. Handbook 16. International Standards Organization

  • Jeffreys H (1961) Theory of probability, 3rd edn. Oxford University Press, Oxford

  • Kass R, Raftery A (1995) Bayes factors and model uncertainty. J Am Stat Assoc 90:807–818

    Google Scholar 

  • Lambie J (1978) Measurement of flow-velocity-area methods. In: Hydrometry: principles and practices. Wiley, Chichester

  • Lohani A, Goel N, Bhatia K (2006) Takagi–Sugeno fuzzy inference system for modeling stage–discharge relationship. J Hydrol 331:146–160

    Article  Google Scholar 

  • Marx B, Eilers P (2005) Multidimensional penalized signal regression. Technometrics 47:13–22

    Article  Google Scholar 

  • Mosley M, McKerchar A (1993) Streamflow. In: Handbook of hydrology. McGraw Hill, New York

  • Moyeed R, Clarke R (2005) The use of Bayesian methods for fitting rating curves, with case studies. Adv Water Resour 28:807–818

    Article  Google Scholar 

  • Pelletier P (1988) Uncertainties in the single determination of river discharge: a literature review. Can J Civil Eng 15:834–850

    Article  Google Scholar 

  • Petersen-Øverleir A (2004) Accounting for heteroscedasticity in rating curve estimates. J Hydrol 292:173–181

    Article  Google Scholar 

  • Petersen-Øverleir A, Reitan T (2005) Objective segmentation in compound rating curves. J Hydrol 311:188–201

    Article  Google Scholar 

  • Reitan T, Petersen-Øverleir A (2008) Bayesian power-law regression with a location parameter, with applications for construction of discharge rating curves. Stoch Env Res Risk Assess 22:351–365

    Article  Google Scholar 

  • Reitan T, Petersen-Øverleir A (2009) Bayesian methods for estimating multi-segment discharge rating curves. Stoch Env Res Risk Assess 23:627–642

    Article  Google Scholar 

  • Robert C (2007) The Bayesian choice: from decision-theoretic foundations to computational implementation. Springer, New York

    Google Scholar 

  • Rue H, Held L (2005) Gaussian Markov random fields: theory and applications. Chapman & Hall/CRC, Boca Raton

    Book  Google Scholar 

  • Spiegelhalter D, Best N, Carlin B, van der Linde A (2002) Bayesian measures of model complexity and fit. J R Stat Soc B 64:583–639

    Article  Google Scholar 

  • Wasserman L (2006) All of nonparametric statistics. Springer, New York

    Google Scholar 

Download references

Acknowledgments

The work presented here is based on Kristinn M. Ingimarsson’s Master’s thesis at the School of Engineering and Natural Sciences at the University of Iceland. The thesis was written under the direction of Associate Research Professor of Statistics Birgir Hrafnkelsson at the Science Institute and Professor of Environmental Engineering Sigurdur M. Gardarsson at Faculty of Civil and Environmental Engineering both at the University of Iceland and in cooperation with Arni Snorrason, Chief of the Icelandic Meteorological Office. This work was funded by the Icelandic Centre for Research (RANNIS-070241021) and has no conflict of interests. We thank the Icelandic Centre for Research for its support.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Birgir Hrafnkelsson.

Appendix

Appendix

1.1 Trace plots and the Gelman–Rubin convergence measure

Figures 9 and 10 show trace plots of the chains from the posterior simulations and plots of the evolution of the Gelman–Rubin convergence measure for Models 1 and 2, respectively.

Fig. 9
figure 9

Trace plots of the chains from the posterior simulations (left panel) and plots of the evolution of the Gelman–Rubin convergence measure (right panel) for ab, ψ and c in Model 1 for the data set from Jokulsa a Dal River

Fig. 10
figure 10

Trace plots of the chains from the posterior simulations (left panel) and plots of the evolution of the Gelman–Rubin convergence measure (right panel) for abb 2 and λ6 in Model 2 for the data set from Jokulsa a Dal River

1.2 Prior distributions

The following prior distributions are proposed for the unknown parameters.

$$ p(\varphi) = \hbox{N}(\varphi | \mu_{\varphi}=0,\sigma^2_{\varphi}=0.82^2) $$
$$ p(b) \propto \hbox{N}(b | \mu_{b}=2.15,\sigma^2_{b}=0.4^2)I(0.5 < b < 5) $$
$$ p(c) \propto \hbox{N}(c | \mu_{c}=75,\sigma^2_{c}=50^2)I(c < w_{0}) $$
$$ p(\eta^2) \propto \hbox{Inv}-\chi^2(\eta^2 | \nu_\eta=10^{-12},S^2_{\eta}=1 ) $$
$$ p(\psi) \propto \hbox{N}(\psi | \mu_{\psi}=0.8,\sigma^2_{\psi}=0.25^2) I(0 < \psi < 1.2) $$
$$ p(b_2) \propto \hbox{N}(b_2 | \mu_{b2}=2.15,\sigma^2_{b2}=0.4^2)I(1 < b_2 < 6) $$
$$ p(c_2) \propto \hbox{N}(c_2 | \mu_{c2}=75,\sigma^2_{c2}=50^2)I(c_2 < w_{0}) $$
$$ p(\tau^2) \propto \hbox{Inv}-\chi^2 (\tau^2 {|} \nu_{\tau}=10^{-12},S^2_{\tau}=1 ) $$
$$ p(\phi) = \hbox{Beta}(\phi|\alpha_{\phi}=20,\beta_{\phi}=0.5) $$
$$ p(\lambda|\tau^2,\phi) \propto \hbox{N}(\lambda | 0,\tau^2 (I-\phi C)^{-1} M ) $$

where I(A) is such that I(A) = 1 if A is true and I(A) = 0 otherwise. In the prior distribution for λ, I is an identity matrix, M is a diagonal matrix and C is a neighbourhood matrix with constants on the first off-diagonals, other elements are equal to zero.

1.3 The Gibbs sampler

A Gibbs sampler with Metropolis–Hastings steps is used to sample from the posterior distribution. The conditional distribution of each parameter or vector of parameters in Model 2 is found and presented below. The Gibbs sampler is applied by sampling iteratively from these conditional distributions. The parameters are \(\varphi, b, c, \eta^2, b_2, c_2, \lambda, \tau^2\) and ϕ. As before, let θ be a vector containing these parameters. Terms independent of the variable being viewed are denoted by d 1, d 2 and d 3.

1.3.1 The conditional distribution of \(\varphi\)

The conditional posterior distribution of \(\varphi\) has density proportional to

$$ p(\varphi|\hbox{rest}) \propto \prod_{i=1}^{n}p(q_{i}|\theta,w_i)p(\varphi) $$

The logarithm of \(p(\varphi|\hbox{rest})\) is equal to

$$ \begin{aligned} \log& \{p(\varphi|\hbox{rest})\} \\ =& \sum_{i=1}^{n}\log\{p(q_{i}|\theta,w_i)\} + \log\{p(\varphi)\} + d_1\\ =& -\frac{1}{2\eta^2}\sum_{i=1}^{n}\frac{\{q_i - a(\varphi)(w_i - c)^b - \sum_{l=1}^{L}\lambda_l G_l(w_i)\}^2}{(w_i - c_2)^{2 b_2}}\\ & -0.5\sigma^{-2}_{\varphi}(\varphi - \mu_{\varphi})^2 + d_2. \\ \end{aligned} $$

1.3.2 The conditional distribution of b

The conditional posterior distribution of b has density proportional to

$$ p(b|\hbox{rest}) \propto \prod_{i=1}^{n}p(q_{i}|\theta,w_i)p(b) $$

The logarithm of \( p(b|\hbox{rest})\) p(b|rest) is equal to

$$ \begin{aligned} \log& \{p(b|\hbox{rest})\} \\ =& \sum_{i=1}^{n}\log\{p(q_{i}|\theta,w_i)\} + \log\{p(b)\} + d_1\\ =& -\frac{1}{2\eta^2}\sum_{i=1}^{n}\frac{\{q_i - a(\varphi)(w_i - c)^b - \sum_{l=1}^{L}\lambda_l G_l(w_i)\}^2}{(w_i - c_2)^{2 b_2}}\\ & -0.5\sigma^{-2}_{b}(b - \mu_{b})^2 + d_2 \\ \end{aligned} $$

for 0.5 < b < 5.

1.3.3 The conditional distribution of c

The conditional posterior distribution of c has density proportional to

$$ p(c|\hbox{rest}) \propto \prod_{i=1}^{n}p(q_{i}|\theta,w_i)p(c) $$

The logarithm of \( p(c|\hbox{rest})\) is equal to

$$ \begin{aligned} \log&\{p(c|\hbox{rest})\} \\ =& \sum_{i=1}^{n}\log\{p(q_{i}|\theta,w_i)\} + \log\{p(c)\} + d_1\\ =& -\frac{1}{2\eta^2}\sum_{i=1}^{n}\frac{\{q_i - a(\varphi)(w_i - c)^b - \sum_{l=1}^{L}\lambda_l G_l(w_i)\}^2}{(w_i - c_2)^{2 b_2}}\\ & -0.5\sigma^{-2}_{c}(c - \mu_{c})^2 + d_2 \\ \end{aligned} $$

for c < w 0.

1.3.4 The conditional distribution of η2

The conditional posterior distribution of η2 has density proportional to

$$ p(\eta^2|\hbox{rest}) \propto \prod_{i=1}^{n}p(q_{i}|\theta,w_i)p(\eta^2) $$

Let \(\kappa = (a(w_1 - c)^b, \ldots, a(w_n - c)^b)^{{\rm T}}\) and \(g_i = (G_1(w_i), \ldots, G_L(w_i)), \) such that g i λ = ∑ L l=1 λ l G l (w i ). Let H be an n × L matrix with ith row equal to g i . Then κ + Hλ is the mean of q. Let

$$ Q=\hbox{diag}((w_1 - c_2)^{-2 b_2}, \ldots, (w_n - c_2)^{-2b_2}) $$

The logarithm of \( p(\eta^2|\hbox{rest}) \) is equal to

$$ \begin{aligned} \log& \{p(\eta^2|{\rm rest})\} \\ =&\sum_{i=1}^{n}\log\{p(q_{i}|\theta,w_i)\} + \log\{p(\eta^2)\} + d_1 \\ =& -\frac{n}{2}\log(\eta^2) -\frac{1}{2\eta^2}(q-\kappa - H\lambda)^{\rm {T}}Q(q-\kappa - H\lambda) \\ & -(\nu_{\eta}/2+1)\log(\eta^2) - \frac{\nu_{\eta}S^2_{\eta}}{2\eta^2} + d_2 \\ \end{aligned} $$

The above density is proportional to an inverse chi-square density, that is,

$$ p(\eta^2|\hbox{rest}) = \hbox{Inv}-\chi^2(\eta^2|\nu_{\eta,{{\rm post}}},S^2_{\eta,{{\rm post}}}) $$

where

$$ \begin{aligned} \nu_{\eta,{{\rm post}}} =& \nu_{\eta}+n \\ S^2_{\eta,{{\rm post}}} =& \nu^{-1}_{\eta,{\rm post}}\left\{s^2_{0} + (q-\kappa - H\lambda)^{\rm {T}}Q(q-\kappa - H\lambda) \right\}, \end{aligned} $$

where s 20  = νη S 2η .

1.3.5 The conditional distribution of b 2

The conditional posterior distribution of b 2 has density proportional to

$$ p(b_2|\hbox{rest}) \propto \prod_{i=1}^{n}p(q_{i}|\theta,w_i)p(b_2) $$

The logarithm of \( p(b_2|\hbox{rest}) \) is equal to

$$ \begin{aligned} \log& \{p(b_2|\hbox{rest})\} \\ =&\sum_{i=1}^{n}\log\{p(q_{i}|\theta,w_i)\} + \log\{p(b_2)\} + d_1\\ =& -b_2 \sum_{i=1}^{n}\log(w_i-c_2) \\ & -\frac{1}{2\eta^2}\sum_{i=1}^{n}\frac{\{q_i - a(\varphi)(w_i - c)^b - \sum_{l=1}^{L}\lambda_l G_l(w_i)\}^2}{(w_i - c_2)^{2 b_2}}\\ & -0.5\sigma^{-2}_{b2}(b_2 - \mu_{b2})^2 + d_2 \\ \end{aligned} $$

for 1 < b 2 < 6.

1.3.6 The conditional distribution of c 2

The conditional posterior distribution of c 2 has density proportional to

$$ p(c_2|\hbox{rest}) \propto \prod_{i=1}^{n}p(q_{i}|\theta,w_i)p(c_2) $$

The logarithm of \( p(c_2|\hbox{rest}) \) is equal to

$$ \begin{aligned} \log& \{p(c_2|\hbox{rest})\} \\ =&\sum_{i=1}^{n}\log\{p(q_{i}|\theta,w_i)\} + \log\{p(c_2)\} + d_1\\ =& -b_2 \sum_{i=1}^{n}\log(w_i-c_2) \\ &-\frac{1}{2\eta^2}\sum_{i=1}^{n}\frac{\{q_i - a(\varphi)(w_i - c)^b - \sum_{l=1}^{L}\lambda_l G_l(w_i)\}^2}{(w_i - c_2)^{2 b_2}} \\ & -0.5\sigma^{-2}_{c2}(c_2 - \mu_{c2})^2 + d_2 \\ \end{aligned} $$

for c 2 < w 0.

1.3.7 The conditional distribution of λ

The conditional posterior distribution of λ has density proportional to

$$ p(\lambda|\hbox{rest}) \propto \prod_{i=1}^{n}p(q_{i}|\theta,w_i)p(\lambda|\tau^2,\phi) $$

where the support of λ is constrained by

$$ a(\varphi)(w_i - c)^b + \sum_{l=1}^{L}\lambda_l G_l(w_i)>0 $$

for all w i  > w 0 and λ L  = 0. Let Q λ = τ−2 M −1(I − ϕC). The logarithm of \( p(\lambda|\hbox{rest}) \) is equal to

$$ \begin{aligned} \log& \{p(\lambda|\hbox{rest})\} \\ =&\sum_{i=1}^{n}\log\{p(q_{i}|\theta,w_i)\} + \log\{p(\lambda|\tau^2,\phi)\} + d_1 \\ =& -\frac{1}{2}(q-\kappa - H\lambda)^{{\rm T}}\eta^{-2}Q(q-\kappa - H\lambda) \\ & -\frac{1}{2}\lambda^{{\rm T}}Q_{\lambda}\lambda + d_2 \\ =& -\frac{1}{2}\lambda^{{\rm T}}(H^{{\rm T}}\eta^{-2}QH + Q_{\lambda})\lambda +\lambda^{\rm {T}}H^{{\rm T}}\eta^{-2}Q(q-\kappa) + d_3\\ \end{aligned} $$

The above density is proportional to a multivariate normal density, that is,

$$ p(\lambda|\hbox{rest}) = \hbox{N}(\lambda|\mu_{\lambda,{\rm post}},\Upsigma_{\lambda,{\rm post}}) $$

where

$$ \begin{aligned} \Upsigma_{\lambda,{\rm post}} =& (H^{{\rm T}}\eta^{-2}QH + Q_{\lambda})^{-1} \\ \mu_{\lambda,{\rm post}} =& \Upsigma_{\lambda,{\rm post}} H^{{\rm T}}\eta^{-2}Q(q-\kappa). \end{aligned} $$

The above density is sampled under the above constraints.

1.3.8 The conditional distribution of τ2

The conditional posterior distribution of τ2 has density proportional to

$$ p(\tau^2|\hbox{rest}) \propto p(\lambda|\tau^2,\phi)p(\tau^2) $$

The logarithm of \( p(\tau^2|\hbox{rest}) \) is equal to

$$ \begin{aligned} \log& \{p(\tau^2|\hbox{rest})\} \\ =&\log\{p(\lambda|\tau^2,\phi)\} + \log\{p(\tau^2)\} + d_1 \\ =&-\frac{L}{2}\log(\tau^2) -\frac{1}{2\tau^2}\lambda^{{\rm T}}M^{-1}(I-\phi C)^{-1}\lambda \\ & -(\nu_{\tau}/2+1)\log(\tau^2) - \frac{\nu_{\tau}S^2_{\tau}}{2\tau^2} + d_2 \\ \end{aligned} $$

The above density is proportional to an inverse chi-square density, that is,

$$ p(\tau^2|\hbox{rest}) = \hbox{Inv}-\chi^2(\tau^2|\nu_{\tau,{\rm post}},S^2_{\tau,{\rm post}}) $$

where

$$ \begin{aligned} \nu_{\tau,{\rm post}} =& \nu_{\tau} + L \\ S^2_{\tau,{\rm post}} =& \nu^{-1}_{\tau,{\rm post}}\{\nu_{\tau} S^2_{\tau} + \lambda^{\rm {T}}M^{-1}(I-\phi C)^{-1}\lambda \}. \end{aligned} $$

1.3.9 The conditional distribution of ϕ

The conditional posterior distribution of ϕ has density proportional to

$$ p(\phi|\hbox{rest}) \propto p(\lambda|\tau^2,\phi)p(\phi) $$

The logarithm of \( p(\phi|\hbox{rest})\) is equal to

$$ \begin{aligned} \log& \{p(\phi|\hbox{rest})\} \\ =& \log\{p(\lambda|\tau^2,\phi)\} + \log\{p(\phi)\} + d_1 \\ =&\frac{1}{2}\sum_{l=1}^{L}\log(1-\phi c_l) -\frac{1}{2\tau^2}\lambda^{\rm {T}}M^{-1}(I-\phi C)^{-1}\lambda \\ &+(\alpha_{\phi}-1)\log(\phi) + (\beta_{\phi}-1)\log(1-\phi) + d_2\\ \end{aligned} $$

where \(c_1, \ldots, c_L\) are the eigenvalues of C. A Metropolis–Hastings step based on the above is used to draw samples from the conditional distribution of ϕ.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hrafnkelsson, B., Ingimarsson, K.M., Gardarsson, S.M. et al. Modeling discharge rating curves with Bayesian B-splines. Stoch Environ Res Risk Assess 26, 1–20 (2012). https://doi.org/10.1007/s00477-011-0526-0

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00477-011-0526-0

Keywords

Navigation