Question: Problem 3: Consider Problem 6.4 of your text, where the dataset on coal-mining disasters from 1851 (j = 1) to 1962 (j = 112) is

 Problem 3: Consider Problem 6.4 of your text, where the dataset

Problem 3: Consider Problem 6.4 of your text, where the dataset on coal-mining disasters from 1851 (j = 1) to 1962 (j = 112) is introduced. Let X; be the number of accidents in year j. For these data assume the model X, ~ Poisson(1) for j = 1, ...,40 and X, ~ Poisson(12) for j = 41, ...,112. Assume AilB ~ Gamma(3, B) for i = 1,2, where B ~ Gamma(10,10). This problem aims to estimate the posterior distribution of the model parameters (11, 12, /) via Gibbs sampler. a) [1 point] Write the likelihood of X1, *.., X112 up to a constant of proportionality, for given values of M1, 12- b) [2 points] Write the joint posterior distribution of (11, 12, B) up to a multiplicative constant. c) [ 4 points] Identify the distribution of all the required conditionals. Briefly show how you obtain your conditionals. d) [5 points] Read the data coal.csv in R, and write an R program that implements the Gibbs Sampling to generate values from the posterior of 11, 12, B. Insert your program below. Then, start with an initial value of B = 1, and run your chain for 10,000 iterations. Then use the coda library to make an MCMC object out of the generated values (1, 12, B), and insert the summary of the chain given by the coda library below. e) [2 points] Compute a running mean for each of the three chains of 1, 12, and decide how many values you should burn. Insert the plots of running means below. f) [1 point] Burn the amount that you decided in the previous part and plot the histograms of the estimated distributions of 11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!