# \#mcmc

**URL:** https://discourse.julialang.org/tag/mcmc/1202.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [\[ANN\] AdaptEllipticalSliceSampler.jl: Adaptive Generalized Elliptical Slice Sampling](https://discourse.julialang.org/t/ann-adaptellipticalslicesampler-jl-adaptive-generalized-elliptical-slice-sampling/138167)

<div class="topic-metadata">

**Author:** [@ndmarco](https://discourse.julialang.org/u/ndmarco)\
**Replies:** 0\
**Last updated:** [July 13, 2026, 10:55pm UTC](https://discourse.julialang.org/t/ann-adaptellipticalslicesampler-jl-adaptive-generalized-elliptical-slice-sampling/138167 "2026-07-13T22:55:24Z")

</div>

I’d like to announce AdaptEllipticalSliceSampler.jl — a Julia implementation of an adaptive generalized elliptical slice sampler (AGESS) from a recent paper that we have been working on. Elliptical slice sampling (ESS) …

---

## [New to Julia - questions about optimizing my Turing code](https://discourse.julialang.org/t/new-to-julia-questions-about-optimizing-my-turing-code/137008)

<div class="topic-metadata">

**Author:** [@petalmokryn](https://discourse.julialang.org/u/petalmokryn)\
**Replies:** 8\
**Last updated:** [May 9, 2026, 8:53pm UTC](https://discourse.julialang.org/t/new-to-julia-questions-about-optimizing-my-turing-code/137008 "2026-05-09T20:53:58Z")

</div>

Hi everyone, nice to meet you I’m trying to write a custom multivariate model in Julia using banded matrix operations, starting with the simple example of a Gaussian random walk with IID innovations and IID observation …

---

## [On-line storage of MCMC output](https://discourse.julialang.org/t/on-line-storage-of-mcmc-output/136178)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [March 21, 2026, 2:27am UTC](https://discourse.julialang.org/t/on-line-storage-of-mcmc-output/136178 "2026-03-21T02:27:57Z")

</div>

I frequently run MCMC for Bayesian estimation which takes a long time (weeks), had a large dimension (10^5–10^6) It would be great to have a means to save the results to disk while in progress, “peek into”…

---

## [Compute Deviance Information Criterion for a Bayesian Model](https://discourse.julialang.org/t/compute-deviance-information-criterion-for-a-bayesian-model/132195)

<div class="topic-metadata">

**Author:** [@dhruva-ahuja](https://discourse.julialang.org/u/dhruva-ahuja)\
**Replies:** 1\
**Last updated:** [September 9, 2025, 9:05am UTC](https://discourse.julialang.org/t/compute-deviance-information-criterion-for-a-bayesian-model/132195 "2025-09-09T09:05:46Z")

</div>

Hello, I am struggling to compute Deviance Information Criterion (DIC) in Julia as Turing/MCMCDiagnosticTools do not have an implementation of DIC as in R dic.samples(mod2, n.iter=1e3). Backdrop: I am enrolled in a cou…

---

## [MCMCTempering public consumption? (2024)](https://discourse.julialang.org/t/mcmctempering-public-consumption-2024/122600)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 1\
**Last updated:** [February 28, 2025, 1:40am UTC](https://discourse.julialang.org/t/mcmctempering-public-consumption-2024/122600 "2025-02-28T01:40:39Z")

</div>

What’s the situation with MCMCTempering.jl? I see 10 months back or so there was some discussion of reviving it, Hamiltonian Monte Carlo gets stuck at tiny local maxima - #14 by torfjelde I’ve tried the following simpl…

---

## [Extracting warmup samples in turing.jl](https://discourse.julialang.org/t/extracting-warmup-samples-in-turing-jl/125262)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [February 11, 2025, 1:08pm UTC](https://discourse.julialang.org/t/extracting-warmup-samples-in-turing-jl/125262 "2025-02-11T13:08:50Z")

</div>

Hello, Im running inference for my model in turing.jl. Im using NUTS() sampler where I give some warmup. I was wondering that if I can extract these warmup samples ? rather than getting chain plot with just samples afte…

---

## [Signalling towards convergence of chain/ chains in turing](https://discourse.julialang.org/t/signalling-towards-convergence-of-chain-chains-in-turing/118441)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 5\
**Last updated:** [September 13, 2024, 8:31am UTC](https://discourse.julialang.org/t/signalling-towards-convergence-of-chain-chains-in-turing/118441 "2024-09-13T08:31:31Z")

</div>

Hello everyone :)… Based on my understanding of Turing based inference(case of NUTS). We see that during warmup time chain gets to convergence and then we collect samples. Now there are two things . when model is sim…

---

## [Function for resuming mcmc chain](https://discourse.julialang.org/t/function-for-resuming-mcmc-chain/102308)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 13\
**Last updated:** [September 12, 2024, 1:01am UTC](https://discourse.julialang.org/t/function-for-resuming-mcmc-chain/102308 "2024-09-12T01:01:11Z")

</div>

I want to write a function so I will not have to wait for my long inference and get an end result but I will be able to get intermediate results. let’s say if I want to do inference for 100000 iteration. I can get resu…

---

## [Warmup, samples and discard\_adapt](https://discourse.julialang.org/t/warmup-samples-and-discard-adapt/118412)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 0\
**Last updated:** [August 20, 2024, 10:42am UTC](https://discourse.julialang.org/t/warmup-samples-and-discard-adapt/118412 "2024-08-20T10:42:55Z")

</div>

Hello everyone, I want to know simple explanation of difference between warm up and samples and what happens when we do discard\_adapt = false. Below you can see plots for two different conditions with and without disca…

---

## [\[ANN\] SliceSampling.jl - Efficient zeroth-order MCMC algorithms](https://discourse.julialang.org/t/ann-slicesampling-jl-efficient-zeroth-order-mcmc-algorithms/114756)

<div class="topic-metadata">

**Author:** [@Red-Portal](https://discourse.julialang.org/u/Red-Portal)\
**Replies:** 2\
**Last updated:** [May 27, 2024, 2:53am UTC](https://discourse.julialang.org/t/ann-slicesampling-jl-efficient-zeroth-order-mcmc-algorithms/114756 "2024-05-27T02:53:28Z")

</div>

Hi all, As part of the Turing ecosystem, we recently created a collection of slice-sampling MCMC algorithms: Why slice sampling algorithms are great: Don’t need gradients! For low dimensional problems, they perform…

---

## [Differential evolution MCMC in Julia?](https://discourse.julialang.org/t/differential-evolution-mcmc-in-julia/104713)

<div class="topic-metadata">

**Author:** [@fnoessler](https://discourse.julialang.org/u/fnoessler)\
**Replies:** 18\
**Last updated:** [May 26, 2024, 10:32pm UTC](https://discourse.julialang.org/t/differential-evolution-mcmc-in-julia/104713 "2024-05-26T22:32:47Z")

</div>

Hello, is there a Julia package that implements the Differential Evolution MCMC sampler? Is this possible with Turing.jl (I like Turing.jl quite a lot)? At the moment, I use the BayesianTools R package that implements…

---

## [\[ANN\] BarkerMCMC.jl - robust gradient-based MCMC](https://discourse.julialang.org/t/ann-barkermcmc-jl-robust-gradient-based-mcmc/109381)

<div class="topic-metadata">

**Author:** [@scheidan1](https://discourse.julialang.org/u/scheidan1)\
**Replies:** 3\
**Last updated:** [May 22, 2024, 7:55am UTC](https://discourse.julialang.org/t/ann-barkermcmc-jl-robust-gradient-based-mcmc/109381 "2024-05-22T07:55:16Z")

</div>

BarkerMCMC.jl The package isn’t new, but it hasn’t been introduced here yet and might be beneficial for some. BarkerMCMC.jl Implements the surprisingly simple, gradient based MCMC sampler proposed by Livingstone & Zanel…

---

## [What is the actual difference between AvancedMH.jl's Static and RandomWalk Prposals](https://discourse.julialang.org/t/what-is-the-actual-difference-between-avancedmh-jls-static-and-randomwalk-prposals/110838)

<div class="topic-metadata">

**Author:** [@caesoma](https://discourse.julialang.org/u/caesoma)\
**Replies:** 0\
**Last updated:** [February 27, 2024, 9:59am UTC](https://discourse.julialang.org/t/what-is-the-actual-difference-between-avancedmh-jls-static-and-randomwalk-prposals/110838 "2024-02-27T09:59:05Z")

</div>

I am trying to modify the proposal distributions in the Metropolis-Hastings sampler in the AdvancedMH.jl package. It is not clear to me what the Static and RandomWalk proposals do. As I understand it, the former draws a…

---

## [Adaptive proposals in AdvancedMH.jl (or other Metropolis-capable) package](https://discourse.julialang.org/t/adaptive-proposals-in-advancedmh-jl-or-other-metropolis-capable-package/110837)

<div class="topic-metadata">

**Author:** [@caesoma](https://discourse.julialang.org/u/caesoma)\
**Replies:** 0\
**Last updated:** [February 27, 2024, 9:42am UTC](https://discourse.julialang.org/t/adaptive-proposals-in-advancedmh-jl-or-other-metropolis-capable-package/110837 "2024-02-27T09:42:03Z")

</div>

I am trying to run an MCMC chain with a Metropolis-Hastings sampler, but a fixed proposal distribution normally yields poor results. Apparently the AdvancedMH.jl package doesn’t have the feature for tuning the variance o…

---

## [Issue with the Metropolis adjusted Langevin sampler from AdvancedMH.jl](https://discourse.julialang.org/t/issue-with-the-metropolis-adjusted-langevin-sampler-from-advancedmh-jl/110155)

<div class="topic-metadata">

**Author:** [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Replies:** 1\
**Last updated:** [February 13, 2024, 10:13pm UTC](https://discourse.julialang.org/t/issue-with-the-metropolis-adjusted-langevin-sampler-from-advancedmh-jl/110155 "2024-02-13T22:13:39Z")

</div>

I am trying to use a Metropolis adjusted Langevin sampler, from AdvancedMH.MALA. I did a simple test to see if things are working correctly, which is to sample from a multivariate normal distribution. Here is the code: i…

---

## [Memoization in mcmc](https://discourse.julialang.org/t/memoization-in-mcmc/109694)

<div class="topic-metadata">

**Author:** [@swsw](https://discourse.julialang.org/u/swsw)\
**Replies:** 0\
**Last updated:** [February 4, 2024, 9:13am UTC](https://discourse.julialang.org/t/memoization-in-mcmc/109694 "2024-02-04T09:13:04Z")

</div>

Hi there, I wondered if how Turing or RxInfer deals w/ the following situation. For example, I have 10 parameters x1,…x10, the likelihood function is as follows. x1^2 + … + x10^2 Apparently, when updating x1, the o…

---

## [Tune Metropolis-Hastings (normal distribution) scale parameters (and algorithms parameters in general)](https://discourse.julialang.org/t/tune-metropolis-hastings-normal-distribution-scale-parameters-and-algorithms-parameters-in-general/104925)

<div class="topic-metadata">

**Author:** [@caesoma](https://discourse.julialang.org/u/caesoma)\
**Replies:** 10\
**Last updated:** [October 13, 2023, 5:32pm UTC](https://discourse.julialang.org/t/tune-metropolis-hastings-normal-distribution-scale-parameters-and-algorithms-parameters-in-general/104925 "2023-10-13T17:32:38Z")

</div>

I am doing Bayesian inference of a few parameters (~3), albeit of a highly nonlinear model, and I am interested in the performance of random-walk Metropolis-Hastings versus Hamiltonian Monte Carlo methods. I don’t expect…

---

## [Static HMC mass matrix/metric parameter](https://discourse.julialang.org/t/static-hmc-mass-matrix-metric-parameter/104926)

<div class="topic-metadata">

**Author:** [@caesoma](https://discourse.julialang.org/u/caesoma)\
**Replies:** 0\
**Last updated:** [October 13, 2023, 10:13am UTC](https://discourse.julialang.org/t/static-hmc-mass-matrix-metric-parameter/104926 "2023-10-13T10:13:46Z")

</div>

I am running inference of a nonlinear model as described here it will run (albeit poorly) even with Metropolis-Hastings, and with acceptable results with NUTS and HMC with Dual averaging tuning of path length: With va…

---

## [Slow MCMC sampling of complex polynomial model \[Turing.jl\]](https://discourse.julialang.org/t/slow-mcmc-sampling-of-complex-polynomial-model-turing-jl/102184)

<div class="topic-metadata">

**Author:** [@rubisco](https://discourse.julialang.org/u/rubisco)\
**Replies:** 2\
**Last updated:** [September 2, 2023, 10:25am UTC](https://discourse.julialang.org/t/slow-mcmc-sampling-of-complex-polynomial-model-turing-jl/102184 "2023-09-02T10:25:25Z")

</div>

In my model functions I use several complicated functions (long equations for Q and cd functions with many terms). Basically \[look in Q\_generated function\] they are some polynomials of v and w parameter - where v is scal…

---

## [Workflow for MCMC parameter estimation](https://discourse.julialang.org/t/workflow-for-mcmc-parameter-estimation/98960)

<div class="topic-metadata">

**Author:** [@PeX](https://discourse.julialang.org/u/PeX)\
**Replies:** 3\
**Last updated:** [May 18, 2023, 3:04am UTC](https://discourse.julialang.org/t/workflow-for-mcmc-parameter-estimation/98960 "2023-05-18T03:04:20Z")

</div>

Hi, I would like to use Julia for the parameter estimation of an ODE system using MCMC. I have empirical data sets and ODE model that I can successfully solve using DifferentialEquations.jl. What packages/ workflow I …

---

## [A simple MCMC code for beginners for learning](https://discourse.julialang.org/t/a-simple-mcmc-code-for-beginners-for-learning/31641)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 14\
**Last updated:** [March 31, 2023, 8:48am UTC](https://discourse.julialang.org/t/a-simple-mcmc-code-for-beginners-for-learning/31641 "2023-03-31T08:48:00Z")

</div>

If you try to understand how Metropolis-Hastings MCMC works in producing a posterior for a parameter. You can read various website like this But unless you understand R very well, it would make your head spin. But you…

---

## [Recording an MCMC Chain](https://discourse.julialang.org/t/recording-an-mcmc-chain/90243)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.julialang.org/u/clinton)\
**Replies:** 9\
**Last updated:** [November 14, 2022, 9:35pm UTC](https://discourse.julialang.org/t/recording-an-mcmc-chain/90243 "2022-11-14T21:35:15Z")

</div>

I’ve written my own MCMC code. MCMCChains provides some helper functions wrt working with already completed chains. As I iterate through the chain, what is the best way to store the each pass? E.g., if I complete non-bu…
