The code is here. This analysis is performed on British coal mining accident data, which is included in the zip file as well. The function coal() performs change point analysis using MCMC Gibbs sampling which models the data using two Poisson distributions. Change point analysis finds the point k when the second Poisson distribution, instead of the first comes into effect which means a change in regulations, etc. at that point in time. I wrote the Python script looking at Peter Neil's R code from Manchester University.

Also included is the same analysis performed using Bugs (JAGS). This code is adapted from Bayesian Computation with R book.

Subscribe to:
Post Comments (Atom)

Hi! The link to the code seems to be broken. Could you reupload it somewhere, please?

ReplyDeleteOk reload the post and click on the link again.

ReplyDeleteThanks

ReplyDelete