Skip to content

hdbayes

0.2.0

Bayesian Analysis of Generalized Linear Models with Historical Data

0packages depend
2.6Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Ethan M. AltFirst published 2024-04-083 releasesCRAN page ↗GitHub ↗

User-friendly functions for leveraging (multiple) historical data set(s) in Bayesian analysis of generalized linear models (GLMs) and survival models, along with support for Bayesian model averaging (BMA). The package provides functions for sampling from posterior distributions under various informative priors, including the prior induced by the Bayesian hierarchical model, power prior by Ibrahim and Chen (2000) doi:10.1214/ss/1009212673, normalized power prior by Duan et al. (2006) doi:10.1002/env.752, normalized asymptotic power prior by Ibrahim et al. (2015) doi:10.1002/sim.6728, commensurate prior by Hobbs et al. (2011) doi:10.1111/j.1541-0420.2011.01564.x, robust meta-analytic-predictive prior by Schmidli et al. (2014) doi:10.1111/biom.12242, latent exchangeability prior by Alt et al. (2024) doi:10.1093/biomtc/ujae083, and a normal (or half-normal) prior. The package also includes functions for computing model averaging weights, such as BMA, pseudo-BMA, pseudo-BMA with the Bayesian bootstrap, and stacking (Yao et al., 2018 doi:10.1214/17-BA1091), as well as for generating posterior samples from the ensemble distributions to reflect model uncertainty. In addition to GLMs, the package supports survival models including: (1) accelerated failure time (AFT) models, (2) piecewise exponential (PWE) models, i.e., proportional hazards models with piecewise constant baseline hazards, and (3) mixture cure rate models that assume a common probability of cure across subjects, paired with a PWE model for the non-cured population. Functions for computing marginal log-likelihoods under each implemented prior are also included. The package compiles all the 'CmdStan' models once during installation using the 'instantiate' package.

Install

Health

CRAN checks
13OK
Slowest check: 4.2 min · r-oldrel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
10
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-03-10
    11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
86%
Documented parameters
100%
Return-value docs
100%
References docs
86%

Downloads

2.6K
CRAN downloads in the past year
Rank #14,750 · ~7/day · ~219/mo
Daily download trend is not available in this view yet.
16530 days
70090 days
2.6K1 year
Compare downloads with other packages →
Also on419 r2u21 autocran

Repository

Repository
15Stars
3Forks
0Open issues
2Open PRs
2Releases
377Commits
5Contributors
377 commits · Last activity 2025-11-14 · 0% stars, 30d

Stars over time

2025-08-03 · 122026-07-07 · 15

Repository practices

Upstream repositoryBeta

3 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/ethan-alt/hdbayes on 2026-08-16.

Continuous integration (1)
GitHub Actions
Docs source (1)
README.Rmd
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
16 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.2.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Datasets

People & History

People (5)
Maintainer (1)
Author, Maintainer, Copyright holder
Authors (4)
Author, Maintainer, Copyright holder
Contributors (1)
Contributor
Copyright holders (1)
Author, Maintainer, Copyright holder
Package Timeline

3 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.0Latest
    2025-11-15 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.1
    2024-08-23 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 0.0.3
    2024-04-08
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2024-04-08
Total releases
3 / 2 yrs
License
MIT + file LICENSE OSI
Additional repositories
mc-stan.org
Minimum R
≥ 4.2.0
Bundled data
27 KB / 8 files
Download size
474 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("hdbayes")
Alt, E. M., Carvalho, L. M., Chang, X., Chen, X., & Ibrahim, J. G. (2025). hdbayes: Bayesian Analysis of Generalized Linear Models with Historical Data (Version 0.2.0) [Computer software]. https://doi.org/10.32614/CRAN.package.hdbayes

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for hdbayes version 0.2.0 [Data set]. HJJB, LLC. Data release v2026-08-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy