MATH454/554: Project II
TO BE HANDED IN BY MONDAY 11/12/2017 (WEEK 10), 10:00.
This project will contribute 17% towards the final mark.
Submission: Upload the pdf of your answer and your R code file to the Moodle site. Your R code should be as .r or .txt file so that it can be copied and pasted to run. Submit also a printed copy of your answers (no need for a printed copy of the R code), together with a plagiarism cover sheet, to the MSc submissions pigeon hole. Please write your student ID on your answers, not your name.
This project looks at modelling the number of movements of a fetal lamb over 240 consecutive periods, each of 5 seconds. The data which is given in lamb.txt comes from Leroux and Puterman (1992) and has also been analysed in Fearnhead (2005).
Let denote the 240 fetal lamb movements. It is assumed that the data arise from the following Markov-dependent mixture model defined in Fearnhead (2005), Section 3.3. There are two underlying (unobserved) states, which we will term states 1 and 2. Let denote the state at time . Then it is assumed that
Furthermore, it is assumed that the unobserved states follow a Markovian structure with and for ,
Thus the process is Markov chain with transition matrix
We are interested in constructing a Gibbs sampler to obtain samples from , where . We will use data augmentation of to achieve this. (Note that is known and therefore fixed.)
Assume independent priors for the four parameters with a prior for and and a prior (uniform prior) for and .
-
1.
Write down , the likelihood of the observed data (number of movements of the fetal lamb) and the augmented data (mixture component). [2]
-
2.
For , show that [1]
Hence, show that [2]
where for ,
Similarly,
-
3.
For , compute the conditional distribution of given and . [2]
-
4.
For , let . Show that for , that the conditional distribution of given and satisfies [2]
-
5.
Write an R routine to implement the Gibbs sampler. [5]
-
6.
Run the R routine to obtain a sample of size 51000 from the posterior and discard the first 1000 iterations as burn-in. Compute the posterior means and standard deviations of the parameters. [3]
References
- [1] Fearnhead, P. (2005) Direct simulation for discrete mixture distributions. Stats & Computing. 15, 125–133.
- [2] Leroux B.G. and Puterman M.L. (1992) Maximum-penalized-likelihood estimation for independent and Markov-dependent mixture models. Biometrics 48 545–558.