Package: Rtwalk 2.2.0

Rodrigo Fonseca Villa

Rtwalk: An MCMC Sampler Using the t-Walk Algorithm

Implements the t-walk algorithm, a general-purpose, self-adjusting Markov Chain Monte Carlo (MCMC) sampler for continuous distributions as described by Christen & Fox (2010) <doi:10.1214/10-BA603>. The t-walk requires no tuning and is robust for a wide range of target distributions, including high-dimensional and multimodal problems. The sampler is implemented in C++ and validated against a pure R reference implementation of the published algorithm. The package supports reproducible parallel chains, continuation of runs, single transitions for hybrid samplers, and convergence diagnostics following Vehtari et al. (2021) <doi:10.1214/20-BA1221>.

Authors:Rodrigo Fonseca Villa [aut, cre]

Rtwalk_2.2.0.tar.gz
Rtwalk_2.2.0.zip(r-4.7-x86_64)Rtwalk_2.2.0.zip(r-4.7-arm64)Rtwalk_2.2.0.zip(r-4.6-x86_64)Rtwalk_2.2.0.zip(r-4.6-arm64)
Rtwalk_2.2.0.tar.gz(r-4.7-arm64)Rtwalk_2.2.0.tar.gz(r-4.7-x86_64)Rtwalk_2.2.0.tar.gz(r-4.6-arm64)Rtwalk_2.2.0.tar.gz(r-4.6-x86_64)
Rtwalk_2.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
Rtwalk/json (API)

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

Bug tracker:https://github.com/rodrigosqrt3/rtwalk/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

4.32 score 35 scripts 273 downloads 6 exports 4 dependencies

Last updated from:84410ea4c7. Checks:10 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK163
linux-devel-x86_64OK153
source / vignettesOK251
linux-release-arm64OK114
linux-release-x86_64OK126
windows-devel-arm64OK201
windows-devel-x86_64OK156
windows-release-arm64OK251
windows-release-x86_64OK121
wasm-releaseOK115

Exports:calculate_diagnosticstwalktwalk_continuetwalk_controltwalk_stepvisualize_results

Dependencies:codacodetoolslatticeRcpp

Benchmarking the t-walk against other general-purpose samplers
Purpose | Samplers | Targets | Protocol | Results | Efficiency | Accuracy | Curved and funnel-shaped targets | Invariance to scale | Strong correlation | Wall-clock time | Discussion | References | Appendix: code

Last update: 2026-10-30
Started: 2026-10-30

Reproducing Christen & Fox (2010)
1. Where each piece of the paper lives in the code | 2. The proposal distributions | The Traverse move (Section 2.2, Figure 1) | The Walk move (Section 2.1) | The Hop and Blow moves (Section 2.3) | 3. Invariance (Section 2.6, Theorem 1) | 4. Two-dimensional examples (Section 3.1) | Figure 2 | Figure 3 | 5. Comparison with optimally tuned Metropolis (Section 4, Figure 5) | 6. Acceptance rates | 7. What is not reproduced | References

Last update: 2026-10-30
Started: 2026-10-30

Validation and Simulation Study for the Rtwalk Package
1. A first example: the standard normal | 2. Correlated bivariate normal, four chains | 3. A constrained parameter: Gamma posterior | 4. Ten correlated dimensions | 5. Bayesian logistic regression | 6. Continuing a run | 7. Interoperability | 8. How the two points and the rates are reported

Last update: 2026-10-30
Started: 2026-02-02

Readme and manuals

Help Manual

Help pageTopics
Calculate MCMC diagnosticscalculate_diagnostics
Convert t-walk output to coda objectsas.mcmc.list.twalk as.mcmc.twalk coda-methods
Plot t-walk outputplot.twalk
Convert t-walk output to posterior draws objectsas_draws.twalk as_draws_array.twalk as_draws_df.twalk posterior-methods
Run the t-walk MCMC Algorithmtwalk
Continue a t-walk runtwalk_continue
Control parameters for the t-walktwalk_control
Perform a single t-walk transitiontwalk_step
Methods for objects of class 'twalk'print.summary.twalk print.twalk summary.twalk twalk-methods
Visualize MCMC resultsvisualize_results