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, 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
a To find the logarithm of the posterior density we need to calculate the likelihood function and co... View full answer
Get step-by-step solutions from verified subject matter experts
