Package: rmcmc 0.1.2.9000

Matthew M. Graham

rmcmc: Robust Markov Chain Monte Carlo Methods

Functions for simulating Markov chains to compute Markov chain Monte Carlo (MCMC) estimates of expectations with respect to a target distribution on a real-valued vector space. The package has built-in support for using Metropolis-Hastings transitions with random-walk, Langevin, Hamiltonian or Barker proposals, and is designed to be easy to extend with additional algorithms. Proposal shape and scale parameters can be automatically adapted in an initial warm-up stage. The package has a modular design allowing different algorithmic components such as proposals and adapters to be mixed and matched. If 'BridgeStan's R interface <https://roualdes.us/bridgestan/latest/languages/r.html>, available on GitHub <https://github.com/roualdes/bridgestan>, is installed, then it can be used to specify the target distribution to sample from.

Authors:Matthew M. Graham [aut, cre], Samuel Livingstone [aut], Jenna Jia Li [aut], University College London [cph], Engineering and Physical Sciences Research Council [fnd]

rmcmc_0.1.2.9000.tar.gz
rmcmc_0.1.2.9000.zip(r-4.7-any)rmcmc_0.1.2.9000.zip(r-4.6-any)rmcmc_0.1.2.9000.zip(r-4.5-any)
rmcmc_0.1.2.9000.tgz(r-4.6-any)rmcmc_0.1.2.9000.tgz(r-4.5-any)
rmcmc_0.1.2.9000.tar.gz(r-4.7-any)rmcmc_0.1.2.9000.tar.gz(r-4.6-any)
rmcmc_0.1.2.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
rmcmc/json (API)

# Install 'rmcmc' in R:
install.packages('rmcmc', repos = c('https://ucl.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ucl/rmcmc/issues

Pkgdown/docs site:https://github-pages.ucl.ac.uk

On CRAN:

Conda:

approximate-inferencemcmc

6.06 score 8 stars 13 scripts 394 downloads 19 exports 4 dependencies

Last updated from:8bd5c15cdf. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK148
source / vignettesOK191
linux-releaseOK135
macos-releaseOK173
macos-oldrelOK225
windows-develOK124
windows-releaseOK115
windows-oldrelOK117
wasm-releaseOK87

Exports:adam_scale_adapterbarker_proposalbimodal_barker_proposalchain_statecovariance_shape_adapterdual_averaging_scale_adapterexample_gaussian_stan_modelhamiltonian_proposallangevin_proposalprogressive_adaptation_schedulerandom_walk_proposalrobust_shape_adaptersample_chainscale_adaptershape_adapterstochastic_approximation_scale_adaptertarget_distribution_from_log_density_formulatarget_distribution_from_stan_modelvariance_shape_adapter

Dependencies:latticeMatrixrlangwithr

Adjusting the noise distribution in the Barker proposal
Example target distribution | Creating Barker proposal with a custom noise distribution | Sampling chains with proposals | Comparing performance of proposals | References

Last update: 2025-02-17
Started: 2025-01-06

Robust gradient-based MCMC with the Barker proposal
Example target distribution | Creating proposal distribution | Setting up adaptation of tuning parameters | Sampling a chain | Summarizing results using posterior package | Sampling using a Langevin proposal | Comparing adaptation using Barker and Langevin proposal | References

Last update: 2025-02-04
Started: 2024-10-14

Readme and manuals

Help Manual

Help pageTopics
Create object to adapt proposal scale to coerce average acceptance rate using the Adam optimizer of Kingma and Ba (2014).adam_scale_adapter
Create a new Barker proposal object.barker_proposal
Create a new Barker proposal object with bimodal noise distribution.bimodal_barker_proposal
Construct a new chain state.chain_state
Create object to adapt proposal with shape based on estimate of target distribution covariance matrix.covariance_shape_adapter
Create object to adapt proposal scale to coerce average acceptance rate using dual averaging scheme of Nesterov (2009) and Hoffman and Gelman (2014).dual_averaging_scale_adapter
Construct an example BridgeStan 'StanModel' object for a Gaussian model.example_gaussian_stan_model
Create a new Hamiltonian proposal object.hamiltonian_proposal
Create a new Langevin proposal object.langevin_proposal
Create a progressive adaptation schedule for use with 'sample_chain()'.progressive_adaptation_schedule
Create a new (Gaussian) random walk proposal object.random_walk_proposal
Create object to adapt proposal shape (and scale) using robust adaptive Metropolis algorithm of Vihola (2012).robust_shape_adapter
Sample a Markov chainsample_chain
Create object to adapt proposal scale to coerce average acceptance rate.scale_adapter
Create object to adapt proposal shape.shape_adapter
Create object to adapt proposal scale to coerce average acceptance rate using a Robbins and Monro (1951) scheme.stochastic_approximation_scale_adapter
Construct target distribution from a formula specifying log density.target_distribution_from_log_density_formula
Construct target distribution from a BridgeStan 'StanModel' object.target_distribution_from_stan_model
Create object to adapt proposal with per dimension scales based on estimates of target distribution variances.variance_shape_adapter