bage-package: bage: Bayesian Estimation and Forecasting of Age-Specific...

bage-packageR Documentation

bage: Bayesian Estimation and Forecasting of Age-Specific Rates

Description

Modeling of rates, probabilities, and other values, typically disaggregated by age. Estimation is done using TMB, which makes it fast and scalable.

Example workflow

  1. Specify model using mod_pois()

  2. Fit model using fit()

  3. Extract results using augment()

  4. Check model using replicate_data()

Functions

Specify model

  • mod_pois() Specify a Poisson model

  • mod_binom() Specify a binomial model

  • mod_norm() Specify a normal model

  • set_prior() Specify prior for main effect or interaction

  • priors Overview of priors for main effects or interactions

  • set_disp() Specify prior for dispersion/variance

  • set_covariates() Add covariates to model

  • datamods Overview of data models (measurement error models)

  • confidential Overview of confidentialization models

Fit model

  • fit() Derive posterior distribution

Extract results

  • augment() Original data, plus observation-level estimates

  • components() Hyper-parameters

  • dispersion() Dispersion parameter (a type of hyper-parameter)

  • tidy() One-line summary

  • set_n_draw() Specify number of prior or posterior draws

Forecast

  • forecast() Use model to obtain estimates for future periods

Check model

  • replicate_data() Compare real and simulated data

  • report_sim() Simulation study of model

Data

  • datasets Overview of datasets

  • svds Overview of scaled SVDs

Author(s)

Maintainer: John Bryant john@bayesiandemography.com

Authors:

Other contributors:

  • Bayesian Demography Limited [copyright holder]

See Also

Useful links:


bage documentation built on May 20, 2026, 9:10 a.m.