mcmcderive
Calculate derived parameters from MCMC samples
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
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.6%) to scientific vocabulary
Keywords
cran
derived-parameters
mcmc
mcmcr
Keywords from Contributors
chk
assertion
checkr
fish
kootenay-lake
species-sensitivity-distribution
ssd
water-quality-guideline
Last synced: 9 months ago
·
JSON representation
Repository
Calculate derived parameters from MCMC samples
Basic Info
- Host: GitHub
- Owner: poissonconsulting
- License: other
- Language: R
- Default Branch: main
- Homepage: https://poissonconsulting.github.io/mcmcderive/
- Size: 2.08 MB
Statistics
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 6
- Releases: 1
Topics
cran
derived-parameters
mcmc
mcmcr
Created over 8 years ago
· Last pushed 12 months ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
Support
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# mcmcderive
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://github.com/poissonconsulting/mcmcderive/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/poissonconsulting/mcmcderive)
[](https://opensource.org/license/mit/)
[](https://cran.r-project.org/package=mcmcderive)

## Why `mcmcderive`?
`mcmcderive` is an R package to generate derived parameter(s) from Monte Carlo Markov Chain (MCMC) samples using R code.
This is useful because it means Bayesian models can be fitted without the inclusion of derived parameters which add unnecessary clutter and slows model fitting.
For more information on MCMC samples see Brooks et al. (2011).
## Demonstration
```{r}
library(mcmcderive)
mcmcr::mcmcr_example
expr <- "
log(alpha2) <- alpha
gamma <- sum(alpha) * sigma
"
mcmc_derive(mcmcr::mcmcr_example, expr, silent = TRUE)
```
### Parallel Chains
If the MCMC object has multiple chains the run time can be substantially reduced by generating the derived parameters for each chain in parallel.
In order for this to work it is necessary to:
1) Ensure plyr and doParallel are installed using `install.packages(c("plyr", "doParallel"))`.
2) Register a parallel backend using `doParallel::registerDoParallel(4)`.
3) Set `parallel = TRUE` in the call to `mcmc_derive()`.
### Extras
To facilitate the translation of model code into R code the `extras` package provides the R equivalent to common model functions such as `pow()`, `phi()` and `log() <- `.
## Installation
### Release
To install the release version from [CRAN](https://CRAN.R-project.org/package=mcmcderive).
```r
install.packages("mcmcderive")
```
The website for the release version is at .
### Development
To install the development version from [GitHub](https://github.com/poissonconsulting/mcmcderive)
```r
# install.packages("remotes")
remotes::install_github("poissonconsulting/mcmcderive")
```
or from [r-universe](https://poissonconsulting.r-universe.dev/mcmcderive).
```r
install.packages("mcmcderive", repos = c("https://poissonconsulting.r-universe.dev", "https://cloud.r-project.org"))
```
## Contribution
Please report any [issues](https://github.com/poissonconsulting/mcmcderive/issues).
[Pull requests](https://github.com/poissonconsulting/mcmcderive/pulls) are always welcome.
## Code of Conduct
Please note that the mcmcderive project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.
## References
Brooks, S., Gelman, A., Jones, G.L., and Meng, X.-L. (Editors). 2011. Handbook for Markov Chain Monte Carlo. Taylor & Francis, Boca Raton.
Owner
- Name: Poisson Consulting Ltd.
- Login: poissonconsulting
- Kind: organization
- Email: software@poissonconsulting.ca
- Location: Nelson, BC, Canada
- Website: http://www.poissonconsulting.ca
- Repositories: 68
- Profile: https://github.com/poissonconsulting
Computational Biology and Statistical Ecology
GitHub Events
Total
- Push event: 15
- Pull request event: 2
- Create event: 2
Last Year
- Push event: 15
- Pull request event: 2
- Create event: 2
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| joethorley | j****e@p****a | 125 |
| Ayla Pearson | a****a@p****a | 22 |
| Kirill Müller | k****r@m****g | 16 |
| Ayla Pearson | a****3@g****m | 4 |
| Nadine Hussein | n****3@g****m | 3 |
| Kirill Müller | k****l@c****m | 1 |
| Mowahid Latif | m****f@M****l | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 12
- Total pull requests: 13
- Average time to close issues: 5 months
- Average time to close pull requests: 1 day
- Total issue authors: 2
- Total pull request authors: 6
- Average comments per issue: 1.0
- Average comments per pull request: 0.15
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: about 21 hours
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- joethorley (11)
Pull Request Authors
- dunkenwg (5)
- aylapear (4)
- krlmlr (3)
- joethorley (1)
- nadinehussein (1)
- MowahidLatif (1)
Top Labels
Issue Labels
Type: Refactor (1)
Difficulty: Intermediate (1)
Effort: Small (1)
Importance: Medium (1)
Timeline: Soon (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 164 last-month
- Total dependent packages: 0
- Total dependent repositories: 3
- Total versions: 4
- Total maintainers: 1
cran.r-project.org: mcmcderive
Derive MCMC Parameters
- Homepage: https://github.com/poissonconsulting/mcmcderive
- Documentation: http://cran.r-project.org/web/packages/mcmcderive/mcmcderive.pdf
- License: MIT + file LICENSE
-
Latest release: 0.1.2
published almost 5 years ago
Rankings
Dependent repos count: 16.5%
Forks count: 27.8%
Dependent packages count: 28.8%
Average: 32.5%
Stargazers count: 34.6%
Downloads: 54.9%
Maintainers (1)
Last synced:
9 months ago
Dependencies
DESCRIPTION
cran
- R >= 3.5 depends
- abind * imports
- chk * imports
- extras * imports
- mcmcr * imports
- nlist * imports
- purrr * imports
- universals * imports
- coda * suggests
- covr * suggests
- doParallel * suggests
- plyr * suggests
- testthat * suggests