Question: 3. Use the methods of Section 8.3 for the general state space model to answer this question. Use either real data (e.g. the industrial production
3. Use the methods of Section 8.3 for the general state space model to answer this question. Use either real data (e.g. the industrial production data from the empirical illustration in Section 8.3.2) or artificial data generated according to various data generating processes of your choice.
(a) Write a program which carries out posterior simulation in the local level model described in Section 8.3.
(b) Write a program which carries out posterior simulation in the local linear trend model described in Section 8.3.
(c) Test the programs you have written in parts
(a) and
(b) using your data set(s).
(d) Modify your programs to calculate the marginal likelihood for each model and, hence, calculate the Bayes factor comparing the local level model to local linear trend model and test your program using your data set(s).
Remember that meaningful marginal likelihoods can only be calculated with informative priors and, hence, choose informative priors of your choice.
(e) Carry out a prior sensitivity analysis to investigate which aspects of prior elicitation seem to be most important for model comparison involving the local level and local linear trend models.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
