Bayesian Discharge Rating Curves
Overview
Fits a discharge rating curve based on the power-law and the generalized power-law from data on paired stage and discharge measurements in a given river using a Bayesian hierarchical model as described in Hrafnkelsson et al. (2022) doi:10.1002/env.2711.
- Fixed phantom observation variance bug in gplm0 and gplm: the phantom observation that centers the GP used zero variance, acting as an infinitely precise constraint that collapsed the posterior of b. Fixed by using the prior variance sig_b^2.
- Fixed eta posterior scaling bug in plm and gplm: the standardized eta coefficients were not scaled by sigma_eta before applying the basis transformation P, resulting in incorrect B-spline coefficient posteriors.
- Fixed sigma_beta back-transform bug in gplm0: stored values were sqrt(sigma_beta) instead of sigma_beta due to an incorrect sqrt(exp()) transform. This affected posterior summaries and plots for the sigma_beta parameter in the gplm0 model.
- Updated reference in DESCRIPTION from arXiv preprint to the published Environmetrics paper (doi:10.1002/env.2711).
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
Show 3 earlier changesHide 3 earlier changes
- NOTE12 OK, 2 NOTE2026-04-22
- ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 32 (4 internal)
- Examples that run
- 0%16 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 91%
- Return-value docs
- 100%
- Help pages citing references
- 25%
- Background HTML
- Introduction HTML
- Tournament - Model comparison HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 8
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
10 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/sor16/bdrc on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-02-14 · The repository has a site deploy workflow
pkgdown site last built 2026-02-13, before release 2.0.1 (2026-02-17)
Show all practicesHide 2 practices
Dependencies
Code & Tests
Datasets
People & History
Previously maintained by Solvi Rognvaldsson (1.0.0 to 1.1.0).
Package metadata
- First published
- 2021-07-28
- Total releases
- 4 / 5 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 7.0 KB / 10 files
- Download size
- 3.1 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("bdrc")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.