Skip to content

rmcmc

0.1.2

Robust Markov Chain Monte Carlo Methods

0packages depend
6.3Kdownloads / year
89.6%test coverage
13/13checks pass

Overview

About
Maintained by Matthew M. GrahamFirst published 2025-02-042 releasesCRAN page ↗GitHub ↗

Functions for simulating Markov chains using the Barker proposal to compute Markov chain Monte Carlo (MCMC) estimates of expectations with respect to a target distribution on a real-valued vector space. The Barker proposal, described in Livingstone and Zanella (2022) doi:10.1111/rssb.12482, is a gradient-based MCMC algorithm inspired by the Barker accept-reject rule. It combines the robustness of simpler MCMC schemes, such as random-walk Metropolis, with the efficiency of gradient-based methods, such as the Metropolis adjusted Langevin algorithm. The key function provided by the package is sample_chain(), which allows sampling a Markov chain with a specified target distribution as its stationary distribution. The chain is sampled by generating proposals and accepting or rejecting them using a Metropolis-Hasting acceptance rule. During an initial warm-up stage, the parameters of the proposal distribution can be adapted, with adapters available to both: tune the scale of the proposals by coercing the average acceptance rate to a target value; tune the shape of the proposals to match covariance estimates under the target distribution. As well as the default Barker proposal, the package also provides implementations of alternative proposal distributions, such as (Gaussian) random walk and Langevin proposals. Optionally, if 'BridgeStan's R interface https://roualdes.us/bridgestan/latest/languages/r.html, available on GitHub https://github.com/roualdes/bridgestan, is installed, then 'BridgeStan' can be used to specify the target distribution to sample from.

Install

Health

CRAN checks
13OK
Slowest check: 2.8 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 0.95
89.6%
Coverage · measured lines
100%
Documentation · exports
3
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-03-10
    11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 438 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
97%
Return-value docs
100%
References docs
36%

Downloads

6.3K
CRAN downloads in the past year
Rank #7,757 · ~17/day · ~527/mo
Daily download trend is not available in this view yet.
24730 days
1.1K90 days
6.3K1 year
Compare downloads with other packages →
Also on112 r2u22 autocran

Repository

Repository
8Stars
8Forks
9Open issues
4Open PRs
2Releases
95Commits
3Contributors
approximate-inferencemcmcr
95 commits · Last activity 2026-08-17 · 0% stars, 30d

Stars over time

2025-02-18 · 52026-07-07 · 8

Repository practices

Upstream repositoryBeta

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

Checks run against github.com/ucl/rmcmc on 2026-08-16.

Continuous integration (1)
GitHub Actions
CRAN release process (1)
cran-comments.md
Docs source (1)
README.Rmd
Automation and maintenance (2)
Dependabotpre-commit
Show all practices
Lint, format, editor (2)
lintrRStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
9 external dependencies (excludes base and recommended)
Depends (0)
none
Imports (3)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

People & History

People (4)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Copyright holders (1)
Funders (1)
Listed in earlier versions (1)
no longer listed · 0.1.1 to 0.1.2
Package Timeline

2 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.2Latest
    2025-10-18 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.1
    2025-02-04
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2025-02-04
Total releases
2 / 1 yrs
License
MIT + file LICENSE OSI
Download size
212 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("rmcmc")
Graham, M. M., Engineering and Physical Sciences Research Council, University College London, & Livingstone, S. (2025). rmcmc: Robust Markov Chain Monte Carlo Methods (Version 0.1.2) [Computer software]. https://doi.org/10.32614/CRAN.package.rmcmc

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

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 rmcmc version 0.1.2 [Data set]. HJJB, LLC. Data release v2026-08-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-21, 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