Where we have got to

Model fitting and inference for infectious disease dynamics

The likelihood

Each observation gets a distribution around the model output, p(data point i∣θ)p(\text{data point } i \mid \theta). If they are conditionally independent given θ\theta:

log⁡p(data∣θ)=∑ilog⁡p(data point i∣θ)\log p(\text{data} \mid \theta) = \sum_{i} \log p(\text{data point } i \mid \theta)

p(θ∣data)∝p(data∣θ)p(θ)p(\theta \mid \text{data}) \propto p(\text{data} \mid \theta)\, p(\theta)

Why sample?

Samples θ1\theta_1, θ2\theta_2, θ3\theta_3, …\ldots let us calculate parameter means, quantiles etc. and make predictions from the model.

Rejection sampling

It draws from the posterior, but the acceptance rate collapses as the number of parameters grows.

Metropolis-Hastings

Propose θ*\theta^* from where you are, and accept with probability

r=min⁡(1,f(θ*)q(θ∣θ*)f(θ)q(θ*∣θ))r = \min\left(1, \frac{f(\theta^*)\,q(\theta \mid \theta^*)}{f(\theta)\,q(\theta^* \mid \theta)}\right)

NUTS

Hamiltonian Monte Carlo uses the gradient to move with the shape of the posterior, and NUTS adapts the step size and stops each trajectory when it turns back on itself. Usually no proposal tuning at all, and therefore a sensible default if it can be used.

Questions?

Anything from yesterday worth revisiting.

Introduction · MCMC