powerbrmsinla
updated app for Bayesian sample size and power calculations
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.9%) to scientific vocabulary
Repository
updated app for Bayesian sample size and power calculations
Basic Info
- Host: GitHub
- Owner: Tony-Myers
- License: other
- Language: R
- Default Branch: main
- Size: 510 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
powerbrmsINLA
Overview
powerbrmsINLA provides tools for Bayesian power analysis and
assurance calculations using the statistical frameworks of
brms and
INLA.
It includes simulation-based and analytical approaches, support for
multiple decision rules (direction, threshold, rope), sequential
and two-stage designs, and visualisation helpers for power curves,
precision, Bayes factors, and robustness.
Installation
You can install the development version from GitHub:
``` r
install.packages("remotes")
remotes::install_github("https://github.com/Tony-Myers/powerbrmsINLA") ```
Example
Here is a minimal example to get started. For speed in a README, the code is not evaluated on knit.
``` r library(powerbrmsINLA)
Run Bayesian power analysis
results <- brmsinlapower( formula = outcome ~ treatment, effectname = "treatment", effectgrid = c(0.2, 0.5, 0.8), sample_sizes = c(50, 100), nsims = 5 # Reduced for speed )
Inspect summary results
results$summary
Plot power heatmap
plotpowerheatmap(results) ```
Model Complexity Considerations
For optimal performance:
- Simple to moderate models: All sample sizes supported
- Complex random effects (e.g.,
(1 + time | subject)): Recommend n ≥ 50 subjects - Large effect grids: Consider starting with fewer simulations (nsims = 50-100) for initial exploration
The package handles the vast majority of Bayesian power analysis scenarios. For computationally demanding models, standard Bayesian modeling best practices apply (adequate sample sizes, model complexity appropriate to data).
Package documentation
If you use pkgdown you can build a
website:
``` r usethis::usepkgdown() # once, to set up pkgdown pkgdown::buildsite() # build the site locally
usethis::usepkgdowngithub_pages() # set up GitHub Pages
```
License
This package is released under the MIT License.
See the LICENSE file for details.
Owner
- Login: Tony-Myers
- Kind: user
- Repositories: 1
- Profile: https://github.com/Tony-Myers
GitHub Events
Total
- Push event: 10
- Create event: 4
Last Year
- Push event: 10
- Create event: 4
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: powerbrmsINLA
Bayesian Power Analysis Using 'brms' and 'INLA'
- Homepage: https://github.com/Tony-Myers/powerbrmsINLA
- Documentation: http://cran.r-project.org/web/packages/powerbrmsINLA/powerbrmsINLA.pdf
- License: MIT + file LICENSE
-
Latest release: 1.0.0
published 10 months ago
Rankings
Maintainers (1)
Dependencies
- JamesIves/github-pages-deploy-action v4 composite
- actions/checkout v4 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- INLA * imports
- MASS * imports
- MatrixModels * imports
- dplyr * imports
- ggplot2 * imports
- magrittr * imports
- rlang * imports
- scales * imports
- stats * imports
- tibble * imports
- utils * imports
- withr * imports
- Hmisc * suggests
- circular * suggests
- fmesher * suggests
- lifecycle * suggests
- sn * suggests
- testthat >= 3.0.0 suggests
- viridisLite * suggests