Question: Load the ChickWeight data: data (ChickWeight) names (ChickWeight) ## [1] weight Time Chick Diet attach (ChickWeight) 1. Plot the data. You might find this command

Load the ChickWeight data: data (ChickWeight)Load the ChickWeight data: data (ChickWeight)

Load the ChickWeight data: data (ChickWeight) names (ChickWeight) ## [1] "weight" "Time" "Chick" "Diet" attach (ChickWeight) 1. Plot the data. You might find this command useful, which plot Weight agaist Time for different type of Chick. ChickWeight, type "b", coplot(weight show.given Time | Chick, data = FALSE) 2. Extract the data corresponding to the sixth chick. (In other words, where ChickWeight$chick==6). Fit a linear model using time to predict weight. Check the residuals. Does the model fit well? Now try fitting a polynomial model. Show, using a residual plot, that you have improved the fit. Summarize the resulting fitted model. 3. Now use all the data. Ignore the variables Chick and Diet. Fit a linear model to predict weight from time. Summarize the fitted model. Based on a residual plot, do you think the model fits well? See if you can get a better fit using polynomials. Explain why this does or does not help. 4. Repeat the analysis in part (C) but include the variable Diet. Make sure you treat Diet as a categorical variable. Comment on the model and the residuals. You should plot the residuals versus Time and versus Diet. Load the ChickWeight data: data (ChickWeight) names (ChickWeight) ## [1] "weight" "Time" "Chick" "Diet" attach (ChickWeight) 1. Plot the data. You might find this command useful, which plot Weight agaist Time for different type of Chick. ChickWeight, type "b", coplot(weight show.given Time | Chick, data = FALSE) 2. Extract the data corresponding to the sixth chick. (In other words, where ChickWeight$chick==6). Fit a linear model using time to predict weight. Check the residuals. Does the model fit well? Now try fitting a polynomial model. Show, using a residual plot, that you have improved the fit. Summarize the resulting fitted model. 3. Now use all the data. Ignore the variables Chick and Diet. Fit a linear model to predict weight from time. Summarize the fitted model. Based on a residual plot, do you think the model fits well? See if you can get a better fit using polynomials. Explain why this does or does not help. 4. Repeat the analysis in part (C) but include the variable Diet. Make sure you treat Diet as a categorical variable. Comment on the model and the residuals. You should plot the residuals versus Time and versus Diet

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!