Question: Question 1 In the computer lab you considered ways to model the growth of 30 pigs through time.The following questions relate to a different set
Question 1
In the computer lab you considered ways to model the growth of 30 pigs through time.The following questions relate to a different set of 18 pigs. The issues considered are the same as those considered in the computer lab. The models to consider are of the same form ie linear-linear models where we use time (measured in weeks) to explain pig weight.Reflecting my limited ability to come up with file names the data is in the pigwt2 data file.
id.num num.weeks weight 1 1 24.5 1 2 30 1 3 38.5 1 4 42 1 5 47.5 1 6 54 1 7 62.5 1 8 71.5 1 9 77 2 1 24.5 2 2 31.5 2 3 40.5 2 4 46.5 2 5 51.5 2 6 61.5 2 7 68.5 2 8 77.5 2 9 84.5 3 1 24.5 3 2 32 3 3 39 3 4 45 3 5 51 3 6 55.5 3 7 61.5 3 8 69 3 9 75.5 4 1 24 4 2 32.5 4 3 40 4 4 48 4 5 54.5 4 6 61.5 4 7 68 4 8 74.5 4 9 81 5 1 24 5 2 31.5 5 3 38.5 5 4 44 5 5 51.5 5 6 57.5 5 7 64 5 8 72.5 5 9 79 6 1 24.5 6 2 32.5 6 3 39.5 6 4 44.5 6 5 52.5 6 6 56.5 6 7 62 6 8 67.5 6 9 72.5 7 1 24.5 7 2 32 7 3 38.5 7 4 44 7 5 50 7 6 56 7 7 63.5 7 8 69.5 7 9 76 8 1 25.5 8 2 33 8 3 41.5 8 4 47 8 5 55.5 8 6 60.5 8 7 66.5 8 8 77 8 9 82 9 1 25.5 9 2 32 9 3 39 9 4 45.5 9 5 51 9 6 57.5 9 7 63.5 9 8 72 9 9 78.5 10 1 25 10 2 31 10 3 36.5 10 4 43 10 5 50.5 10 6 55 10 7 62.5 10 8 69 10 9 75.5 11 1 26.5 11 2 30.5 11 3 33 11 4 39 11 5 43.5 11 6 49.5 11 7 56.5 11 8 61 11 9 65 12 1 24 12 2 32 12 3 39 12 4 44.5 12 5 50 12 6 56 12 7 63 12 8 67.5 12 9 74 13 1 24.5 13 2 31 13 3 37.5 13 4 43.5 13 5 48 13 6 56 13 7 62.5 13 8 66.5 13 9 70.5 14 1 27 14 2 34.5 14 3 42 14 4 48.5 14 5 53 14 6 60 14 7 67 14 8 73 14 9 76 15 1 31 15 2 39 15 3 47.5 15 4 51 15 5 57 15 6 64 15 7 71 15 8 77 15 9 80.5 16 1 27 16 2 33.5 16 3 40 16 4 46.5 16 5 53 16 6 60 16 7 66.5 16 8 72.5 16 9 80 17 1 29.5 17 2 37 17 3 46 17 4 52.5 17 5 60 17 6 67.5 17 7 76 17 8 81.5 17 9 88 18 1 28.5 18 2 36 18 3 42.5 18 4 49 18 5 55 18 6 63.5 18 7 72 18 8 78.5 18 9 85.5
- For the data set estimate a pooled simple linear regression model that ignores the fact that we have repeat measures on individual pigs. For this model conduct a reset test to check for functional form. Does the model fail this functional form test. If it fails answer yes, it the model does not fail answer no. (This is quiz question 1). (Marks 0.5)
- Using appropriate methods compare the random intercept model, the random slope model, and the random slope and random intercept model. (These are the same models considered in the computer lab). Decide which of these three models is the most appropriate model (At this stage do not consider the issue of heteroskedasticty and autocorrelation). You select the correct option from the list of options presented. (This is quiz question 2). (Marks 0.5)
- For the model you decide is most appropriate as part of Question 1 part (ii), first test to see whether you need to consider an AR(1) process for the error terms; and second, consider whether you need to allow for heteroskedasticty in the model, where, as is the computer lab, the heteroskedasticty is related to the fitted values. For the model that you decide is most appropriate, what is the point estimate for the slope. Report the value to THREE decimal places. (This is quiz question 3). Note you may need to usectrl <- lmeControl(opt='optim') to reset the nlme settings so that the model estimates. Check the relevant section of the example script files for how to implement this (Marks 0.5)
Question 2 Power of the test
The RatsQuiz2.csv file contains measurements on the weight gain (in grams) of rats on two different diets over a fixed period of time.From a biological point of view, a difference of 3 grams is significant. Use the sample data and the formula in the script to generate an estimate of the pooled standard deviation. Use the estimate of the pooled standard deviation and 3 grams as the difference in the mean to generate an effect size estimate. Using this effect size estimate determine the power of the test to detect this difference.(This is quiz question 4). (Report your estimate of test power to four decimal points) (Marks 0.5) weight Diet 5 A 6 A 7 A 5 A 4 A 4 B 3 B 0 B 2 B 1 B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
