1. LON-CAPA Logo
  2. Help
  3. Log In
 

Browsing resource, all submissions are temporary.


Weight versus age of chicks on different diets

Take a look at the 'ChickWeight' dataset that comes with R. The data can be loaded with the command data(ChickWeight). A description of the dataset can be found by running ?ChickWeight.

A data frame ChickWeight is loaded to your workspace after running data(ChickWeight).

a. Fit a linear model predicting the chick's weight (variable 'weight') from its time of birth (variable 'Time'). What are the numerical values of the intercept and slope? Give your answers to at least 4 significant figures outputed by R's lm() function.

Intercept =

 Tries 0/3

Slope =

 Tries 0/3

b. What is the meaning of the numerical value of the intercept? (Hint: You need to read the data description in ?ChickWeight to be able to fully answer this question.)




 Tries 0/1

c. What is the meaning of the numerical value of the slope?






 Tries 0/2

d. Now fit a linear model predicting the chick's weight from its time of birth and the type of diet used to feed them (variable 'Diet'), including interaction terms. Note that 'Diet' is a factor variable with 4 levels. Fill in the following table. Give your answers to at least 4 significant figures.

Coefficients
Intercept
Time
Diet2
Diet3
Diet4
Time · Diet2
Time · Diet3
Time · Diet4
 Tries 0/5

e. What is the meaning of the intercept in (d)?




 Tries 0/2

f. What is the meaning of the slope for 'Diet3'?








 Tries 0/3

g. Use the coefficients in part (d) to determine the growth rate of weight (in gm/day) for chicks fed by 'Diet1', 'Diet2', 'Diet3' and 'Diet4'? Give your answers to at least 4 significant figures.

Growth rate of weight for chicks fed by 'Diet1' = gm/day

 Tries 0/3

Growth rate of weight for chicks fed by 'Diet2' = gm/day

 Tries 0/3

Growth rate of weight for chicks fed by 'Diet3' = gm/day

 Tries 0/3

Growth rate of weight for chicks fed by 'Diet4' = gm/day

 Tries 0/3

h. In the object ChickWeight, the column Chick gives a unique identifier for the chicks in the experiment. Find the prediction error (i.e. residual) of the linear model in part (d) in the weight of Chick "34" 10 days after its birth. Give your answer in gm and to at least 4 significant figures, but don't include units in your answer. (Hint: You will need to remember how to subset a vector using a logical sequence.)

Residual of the weight of Chick "34" 10 days after birth = gm

 Tries 0/5

i. Suppose a chick is fed by Diet 4. Use the model in part (d) to predict the chick's weight 9 days after birth. Give your answer to at least 4 significant figures.

Predicted chick's weight = gm

 Tries 0/3

j. Make plots for (1) chick weight versus time for each diet, and (2) resiudals versus time for each diet. This type of plots is more conveniently made using lattice graphics's xyplot function. From the plots, what can you say about the residuals?




 Tries 0/1