xuebaunion@vip.163.com
3551 Trousdale Rkwy, University Park, Los Angeles, CA
留学生论文指导和课程辅导
无忧GPA:https://www.essaygpa.com
工作时间:全年无休-早上8点到凌晨3点

微信客服:xiaoxionga100

微信客服:ITCS521
UNSW SCIENCE
School of Mathematics and Statistics
MATH5885 Longitudinal Data Analysis
Term 2 2021 Assignment 2
Due Sunday, 23:59, 18th July (end of Week 7). The assignment should be submitted via the Assignment tool. This tool is accessible via a clearly indicated link in the Assessments subfolder on moodle. Please, add a cover page containing a copy of your ID card, and write with your own handwriting:
“I declare that this assignment is my own work, except where acknowledged and I have read and understood the University rules regarding Academic Misconduct”, and sign it.
You must upload one pdf file containing all your working where the R material should be at the back of the assignment, as an appendix to which you refer to throughout the document. Please include sufficient working, computer code (adequately documented) and output (adequately explained) so that I can follow what you have done.
Question 1 is intended to test and extend your understanding of concepts and cases studies covered in Weeks 4 and 5.
Question 2 is theoretical and prepares the way for Lectures in Week 7 onwards. It can be done using the hints provided and general concepts of distributions and expectations.
Your assignment solutions must adhere to the page limit given on the question. This limit relates to the answers to the question and not to the length of the Appendix.
1. (FOUR PAGES MAX) Refer to the VV study, which we considered in Lecture 2 of Week 4. Provide a report in which you summarize your conclusions from the following analyses:
(a) Produce two ”spaghetti plots” of all cases in the Smoker and Ex-smoker groups separately, with the mean response for the group overlaid. Plot these side-by-side and use a common vertical scale for both plots to allow visual comparison of responses from both groups. Sum- marize what you observe about mean levels, variability and possible random effects or other serial dependence in these plots. Give sufficient details to your answer.
(b) Review the analysis presented in lectures and run the code for the linear model with a general covariance structure in the GLS fit. Comment on the fitted model, considering both the regression parameters and estimated covariance matrix. Also, try centering the time variable at 9 years (i.e. use (time−9) as a new time), refit and report on possible differences in the fits.
(c) Similarly to the quadratic trend model, fit a model that also contains cubic terms in the (original) time. Compare to the linear model in time using the G 2 statistic and report your decision.
(d) Look at the estimate of the unstructured covariance matrix. A possible simplification is compound symmetry. Using the linear in time model for the fixed effects, compare these two covariance models using the likelihood ratio test (after fitting the models using REML). Report the p-value and your decision.
(e) Create a model with a change in trend at year = 3. This model should be specified so that the linear model of lectures is a special case (i.e., it is nested within this model). Fit this model and compare your results with part (b). Specify the likelihood ratio test of the null hypothesis that the change in trend is not required. Perform also the similar Wald test and compare the results. Are the change in trend terms required?
(f) Explain in what ways (if any) the model in part (e) could further be simplified. Consider the fixed effects specification as well the residuals covariance structure. Justify your model choice by including the results of significance tests or other appropriate comparisons, based on the concepts studied in the course (note that there is no unigue “right answer” to this question) .
(g) For the choice of covariance model you selected in part (f), can you write down a mixed effects model of the type considered in Week 5, Lecture 2 that would give this covariance structure? Explain why or why not.
2. (THREE PAGES MAX) Recall that if X ∼ N n (µ,Σ), then the moment generating function of X is