Question: 4. Bayesian inference in the Normal linear regression model: prior sensitivity. (a) Generate an artificial data set with D 2, h D 1 and
4. Bayesian inference in the Normal linear regression model: prior sensitivity.
(a) Generate an artificial data set with þ D 2, h D 1 and N D 100 using the U.0; 1/ distribution to generate the explanatory variable.
(b) Assume a prior of the form þ; h ¾ NG.þ; V ; s2; ¹/ with þ D 2; V D 1; s2 D 1; ¹ D 1, and calculate the posterior means and standard deviations of þ and h. Calculate the Bayes factor comparing the model with
þ D 0 to that with þ 6D 0. Calculate the predictive mean and standard deviation for an individual with x D 0:5.
(c) How does your answer to part
(b) change if V D 0:01? What if V D 0:1?
What if V D 10? What if V D 100? What if V D 1 000 000?
(d) How does your answer to part
(b) change if ¹ D 0:01? What if ¹ D 0:1?
What if ¹ D 10? What if ¹ D 100? What if ¹ D 1 000 000?
(e) Set the prior mean of þ different from the value used to generate the data
(e.g. þ D 0) and repeat part (c).
(f) Set the prior mean of h far from its true value (e.g. s2 D 100) and repeat part (d).
(g) In light of your findings in parts
(b) through
(f) discuss the sensitivity of posterior means, standard deviations and Bayes factors to changes in the prior.
(h) Repeat parts
(a) through (g) using more informative (e.g. N D 1000) and less informative (e.g. N D 10) data sets.
(i) Repeat parts
(a) through (h) using different values for þ and h to generate artificial data.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
