A uniform prior on makes the posterior density proportional to the Poisson change-point posterior likelihood above. The zeros trick introduces an observed zero with Poisson distribution mean , making its likelihood function equal to . Choose ; since , this mean is strictly positive. Rough BUGS code, with zero=0 supplied as data, is
model {
  theta ~ dunif(0,T)
  for (i in 1:n) {
    before[i] <- step(theta-time[i])
  }
  j <- sum(before[])
  logL <- theta-2*T+(n-j)*log(2)
  zero ~ dpois(K-logL)
}
For , omit the array and set j <- 0. Monitor the sampled theta to obtain its posterior mean, credible interval and interval probabilities.
There is also an exact sampling method. On the posterior density is proportional to , so choose the interval with weights
Then draw from a uniform distribution on and set . These weighted interval draws sample the posterior directly, without asking a local Markov chain Monte Carlo update to cross its discontinuities.

Articles by others on the same topic (0)

There are currently no matching articles.