Skip to content

Bayesian Simultaneous Credible Bands for Polynomial Regression

0packages depend
976downloads / year
59.3%test coverage
13/13flavors OK

Overview

About

Provides functions to construct two-sided Bayesian simultaneous credible bands (BSCBs) for the regression curve in univariate polynomial regression over a finite covariate interval. Six methods are implemented, including Normal-Gamma conjugate priors (with empirical Bayes, unit-information, and g-prior hyperparameter specifications), non-conjugate priors fitted via Hamiltonian Monte Carlo (HMC) using 'cmdstanr', and a non-informative independent Jeffreys prior approach. Also includes functions for computing the empirical simultaneous coverage rate (ESCR) and posterior simultaneous coverage probability (PSCP), enabling performance comparison across methods. The methodology is described in: Yang et al. (2026). "Bayesian simultaneous credible bands for polynomial regression" doi:10.48550/arXiv.2606.28015.

Changes in 1.0.2

Changes

  • Added Yang Han, Wei Liu, and Ian Hall as co-authors, reflecting their contributions to the methodology described in the accompanying paper (arXiv:2606.28015) as well as suggestions on optimize_function.R.

Features

  • Implements six methods for constructing two-sided Bayesian simultaneous credible bands (BSCBs) for the regression curve in univariate polynomial regression over a finite covariate interval:
  • Conjugate Normal-Gamma priors, with empirical Bayes, unit-information, and g-prior hyperparameter specifications
  • Non-conjugate priors fitted via Hamiltonian Monte Carlo (HMC) using 'cmdstanr' (Normal-half-Normal and Normal-half-Cauchy priors)
Show all changes in 1.0.2Hide the rest of the changes in 1.0.2
  • A non-informative independent Jeffreys prior approach
  • Provides functions for evaluating and comparing method performance:
  • ESCR() for computing the empirical simultaneous coverage rate
  • PSCP() for computing the posterior simultaneous coverage probability
  • Includes a vignette demonstrating usage and comparing methods.

Documentation

  • The methodology is described in Yang, F., Han, Y., Liu, W., & Hall, I. (2026), "Bayesian Simultaneous Credible Bands for Polynomial Regression."

Bug fixes

  • Fixed an issue where generate_simulation_data() with design_index = 2 (D-optimal design) could produce non-reproducible results even when seed was supplied. The underlying call to OptimalDesign::od_KL() previously relied on a time-based stopping rule (t.max), which made the number of completed restarts—and hence the result—dependent on machine speed. The search now stops after a fixed number of restarts (rest.max), ensuring full reproducibility given a fixed seed.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 7.9 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK11 OK2026-07-13
  • ERROR7 OK, 1 ERROR2026-07-11
Advisories

none known

Documentation

In release 1.0.2
READMEYes · 321 wordsVignettesYes · 1 · dynamicNEWSYes · 67% structured · mentions 1.0.2Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
23
Examples that run
38%3 run in a plain check · 5 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
35%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%
Vignettes (1)

Downloads

976
CRAN downloads in the past year
Rank #13,972 · ~3/day · ~81/mo
Daily download trend is not available in this view yet.
32330 days
83390 days
9761 year
Compare downloads with other packages →
Also on68 r2u

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-07-23
Responsiveness
not measured
PracticesBeta

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

Checks run against github.com/fannyyang73/bscb on 2026-10-18.

Docs source (1)
README.Rmd
Reproducibility and dev environment (1)
renv
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (1)
RStudio project
Show all practicesHide 1 practice
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing BSCB adds 55 packages (32 with compiled code, 31 MB of source tarballs). Heaviest: bslib 5.6 MB, rgl 4.0 MB, sass 2.9 MB.

Depends (1)
R >= 4.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (4)
Author, Maintainer since 1.0.0 (2026), Copyright holder
Author, Copyright holder · added in 1.0.2
Author, Copyright holder · added in 1.0.2
Author, Copyright holder · added in 1.0.2
Releases (3)

Pick two releases to compare their code metrics.

Package metadata

First published
2026-07-10
Total releases
3 / 1 yrs
License
MIT + file LICENSE OSI
Additional repositories
stan-dev.r-universe.dev
Minimum R
≥ 4.0
Download size
345 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("BSCB")
Yang, F., Hall, I., Han, Y., & Liu, W. (2026). BSCB: Bayesian Simultaneous Credible Bands for Polynomial Regression (Version 1.0.2) [Computer software]. https://doi.org/10.32614/CRAN.package.BSCB

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for BSCB version 1.0.2 [Data set]. HJJB, LLC. Data release v2026-10-20. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-20, 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