rjmc
is an R package designed to perform Bayesian inference using the Reversible Jump Markov Chain Monte Carlo (RJMCMC) algorithm. This method facilitates efficient exploration of variable-dimension parameter spaces, making it especially suitable for tasks such as model selection and problems where the number of parameters can change. This implementation is inspired by the seminal work of Peter J. Green (1995).
Standard MCMC techniques are limited to fixed-dimensional parameter spaces, which restricts their application to problems where the number of parameters is known and constant. RJMCMC overcomes this limitation by allowing jumps between models with different dimensions, enabling:
By combining the strengths of MCMC with the flexibility of dynamic model spaces, RJMCMC is a powerful tool for tackling complex Bayesian inference problems.
To install the rjmc
package, follow these steps:
Make sure you have R installed on your system. You can download R from https://cran.r-project.org/.
rjmc
from GitHub
You can install the development version of rjmc
from GitHub using the devtools
package. If you don’t already have devtools
installed, you can install it with:
```{r}
install.packages(“devtools”) devtools::install_github(“dchodge/rjmc”)
### Step 3: Load `rjmc` into Your R Session
After installation, you can load the `rjmc` package into your R session with:
```{r}
library(rjmc)
We provide examples of how to implement this package for various scenarios in vignettes:
Refer to the background documentation or vignettes in the package for step-by-step tutorials.
We welcome contributions and suggestions! If you’d like to contribute to the rjmcmc
package or report issues, please feel free to:
For questions or feedback, contact the package maintainer:
David Hodgson
Email: david.hodgson@lshtm.ac.uk