ratiod v1.0.0
First stable release of ratiod - Bayesian hierarchical modelling of ratios, rates, and proportions.
Philosophy
Ratios are not data - they are derived quantities. All inference is performed on the latent processes generating the numerator and denominator, never on their quotient.
Features
- Three model families:
ratiod_negbin_negbin(),ratiod_binomial(),ratiod_poisson_gamma() - Shared random effects by default - prevents spurious ratio effects from common unmeasured drivers
- Spatial priors: CAR and BYM2 for areal data
- Native HMC/NUTS backend - no Stan dependency required
- Model comparison: LOO and WAIC via the loo package
- Random slopes: correlated
(1 + x | site)and uncorrelated(1 + x || site) - Nested RE:
(1 | site/plot)automatic expansion - Crossed RE: multiple grouping factors
- Temporal effects: AR(1) and random walk priors
Installation
remotes::install_github("gcol33/ratiod")