Question: Consider data from one stressful event. The responses are 3,918 where y, represents the number of events recalled at i months before the interview.

Consider data from one stressful event. The responses are 3,918 where y,

 

Consider data from one stressful event. The responses are 3,918 where y, represents the number of events recalled at i months before the interview. Suppose y follows Poisson distribution with mean A, which follows a log-linear regression model, that is, log = Bo + Bi. The data is shown below. Months 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 15 11 14 17 5 11 10 4 8 10 7 9 11 3 6 1 14 Yi (a) If (Bo, B1) is assigned a uniform prior [0,1], show that the logarithm of the posterior density is given, up to an additive constant, by 18 logn (o, B|data) = [[3: (0 + i) exp(o + Bi)] i=1 (b) Write a R function to compute the logarithm of the posterior density of (Bo, B). (c) Construct a Metropolis-Hastings algorithm using independence chain. You will choose your own proposal distribution. Generate 10000 samples using the constructed algorithm and use these samples to estimate posterior mean and standard deviation of .

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a To find the logarithm of the posterior density we need to calculate the likelihood function and co... View full answer

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!