5 trials; 4 ‘successes’
This is the same as an intercept-only logistic distribution with a logit-transformed uniform for the prior on
Density based on 50,000 posterior observations
Simulate a
physical system
“Energy” at any point in the parameter space is proportional to the negative log posterior probability:
Get random draws
by ‘perturbing’ a particle in that field
Place a particle in that system, give it a push in a random direction, and use Hamiltonian dynamics to simulate its motion.
Wherever the particle ends up after a fixed amount of time is the next candidate draw from the posterior.
Takes advantage
of gradient
Gradient (slope) information helps HMC adjust to the shape of the posterior.
Reduces autocorrelation
HMC tends to explore the plausible areas of the parameter space much more quickly than ‘standard’ MCMC like Metropolis–Hastings. It is not likely to spend too much time in one small area.
“No-U-Turn sampler”
(NUTS)
A version of HMC that automatically optimizes some of the meta-parameters of the algorithm.
brms
) will warn you about theseFigures by Peter McMahan (source code)
Still from Batman (1966)
Still from The Legend of the Drunken Master (1994)
Clip from Gleaming the Cube (1989)
Clip from Raiders of the Lost Ark (1981)