程序代写代做 Homework 4

Homework 4
Using data from the China Health and Nutrition Study, we are interested in studying the change in body mass index (BMI) over time. The following data are on the canvas website in ASCII format in the file hw4_1.dat.
• BMIij: body mass index (in kg/m2) for participant i in year j, j = 1989, 1991, 1993, 1997, 2000, 2004, 2006
• MALEi: takes value 1 if subject i is male and 0 otherwise
1. (8 points) Provide a clearly labeled plot showing the mean BMI for each gender over
time.
2. (15 points) Present the simple covariance and correlation matrices for the multiple BMI measures. Based on visual inspection of these matrices, does univariate repeated measures ANOVA or MANOVA seem more appropriate? Explain your choice. (hint: the code for fitting manova in R is the manova function, its use is similar as anova but outcome is a matrix with each row being the outcome vector for each individual)
3. Define M2⇥7 as the mean BMI for each gender over time. Test the hypothesis that changes in body mass index over time do not depend on gender. Report the results of this hypothesis test (providing the test statistic, reference distribution, and p-value), and provide a clear interpretation suitable for inclusion in a manuscript, using
(a) (15 points) Univariate repeated measures ANOVA (b) (15 points) MANOVA
4. Provide the estimated correlations between BMI in 1989 and BMI in subsequent years based on the fitted
(a) (6 points) univariate repeated measures ANOVA model (b) (6 points) MANOVA model
5. (10 points) Assume that the change in BMI over time does not depend on gender. Using the parameters in M to express the null hypothesis that BMI does not change over time.
1

2
6. (10 points) Assume that the change in BMI over time does not depend on gender. Using the parameters in M to express the null hypothesis that there are no di↵erences between the genders in BMI.