Slide 1

Slide 1 text

normal-normal problem z ∼ N(0, 1) θ|z ∼ N(z, 1) corresponding Gibbs sampler 1. θ|z ∼ N(z, 1) mu.new <- rnorm(1, mean=z, sd=1) 2. z|θ ∼ N(θ/2, 1/2) 3. or z|θ ∼ N(0, 1) z <- rnorm(1, mean=0, sd=1)

Slide 2

Slide 2 text

normal-normal problem (2) in a cut model, the dependence of z on θ is “cut” corresponding random-walk sampler 1. z ∼ N(0, 1) 2. θ|z, θt−1 ∼ MH(N(z, 1); θt−1) mu.new <- rnorm(1, mean=mu, sd=STEP) R <- dnorm(z, mean=mu.new, sd=1)/dnorm(z, mean=mu, ifelse(runif(1) < R, mu.new, mu) i.e. 1. zt ∼ N(0, 1) 2. propose η = θt−1 + εt 3. compute ρ = ϕ(η − zt)/ϕ(θt−1 − zt) 4. θt = ifelse(ut < ρ, η, θt−1)

Slide 3

Slide 3 text

normal-normal problem (2.5) in a cut model, the dependence of z on θ is “cut” corresponding independence sampler 1. z ∼ N(0, 1) 2. θ|z, θt−1 ∼ MH(N(z, 1); θt−1) mu.new <- rnorm(1, mean=0, sd=SD) R <- (dnorm(mu, mean=0, sd=SD)*dnorm(z, mean=mu.new (dnorm(mu.new, mean=0, sd=SD)*dnorm(z, mean=mu, ifelse(runif(1) < R, mu.new, mu) i.e. 1. zt ∼ N(0, 1) 2. propose η ∼ N(1, 1) 3. compute ρ = ϕ(η − zt)/ϕ(θt−1 − zt) ϕ(η − 1)/ϕ(θt−1 − 1)

Slide 4

Slide 4 text

normal-normal problem (end) different stationary distributions

Slide 5

Slide 5 text

Poisson-binomial case use of π(φ|z)π(θ|φ, y) = π(φ)f (z|φ) m(z) π(θ|φ)f (y|θ, φ) m(y|φ) instead of π(φ|z, y)π(θ|φ, y) ∝ π(φ)f (z|φ)π(θ|φ)f (y|θ, φ)