As part of a new animal feed trial, veterinary scientists wish to compare the perfor- mance of a new formula with that of an old diet. 50 pigs are assigned to an identical handling procedure but half are randomly selected and given the new feed (feed = 1) while the other half are given normal food (feed = 0). The weight of the animals l of is measured at the beginning (preweight) and at the end of the trial (postweight). Both preweight and postweight are measured in kilograms, and the difference (weightdiff) is calculated using weightdiff = postweight – preweight. The experimenters begin their analysis by fitting the following regression model: weightdiff = B + Bifeed + Bapreweight + Bzfeed : preweight +e from which the following R output is obtained: Coefficients:
As part of a new animal feed trial, veterinary scientists wish to compare the perfor- mance of a new formula with that of an old diet. 50 pigs are assigned to an identical handling procedure but half are randomly selected and given the new feed (feed = 1) while the other half are given normal food (feed = 0). The weight of the animals l of is measured at the beginning (preweight) and at the end of the trial (postweight). Both preweight and postweight are measured in kilograms, and the difference (weightdiff) is calculated using weightdiff = postweight – preweight. The experimenters begin their analysis by fitting the following regression model: weightdiff = B + Bifeed + Bapreweight + Bzfeed : preweight +e from which the following R output is obtained: Coefficients:
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
![As part of a new animal feed trial, veterinary scientists wish to compare the perfor-
mance of a new formula with that of an old diet. 50 pigs are assigned to an identical
handling procedure but half are randomly selected and given the new feed (feed =
1) while the other half are given normal food (feed = 0). The weight of the animals
is measured at the beginning (preweight) and at the end of the trial (postweight).
Both preweight and postweight are measured in kilograms, and the difference
(veightdiff) is calculated using weightdiff = postweight – preweight. The
experimenters begin their analysis by fitting the following regression model:
weightdiff = B + Bifeed + Bapreweight + Bzfeed : preveight +e
from which the following R output is obtained:
Coefficients:
Estimate
Std. Error t value Pr(>|tI)
(Intercept)
0.438815
0.181572
2.417
0.0175 *
feed
4.892093
0.250430
19.535
<2e-16 ***
preweight
0.048143
0.001699 28.335
<2e-16 ***
feed:preweight -0.029225
0.002308 -12.664
<2e-16 ***
(a) Using the R output above, interpret the linear relationship between an animal
weightdiff and their preweight under the old diet and explain how this
differs when using the new feed. Sketch two straight lines representing the fit.
(b) State the assumptions associated with a linear regression model. Using the
plots provided at the end of the paper, in addition to any other relevant in-
formation, discuss whether the modelling assumptions have been met. Clearly
explain your reasoning.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7b9bfc34-855c-44c2-9d25-87973dbac7ae%2Fda66db7f-b72a-4ba3-bd0d-883f992bfdde%2Fyrrncy_processed.png&w=3840&q=75)
Transcribed Image Text:As part of a new animal feed trial, veterinary scientists wish to compare the perfor-
mance of a new formula with that of an old diet. 50 pigs are assigned to an identical
handling procedure but half are randomly selected and given the new feed (feed =
1) while the other half are given normal food (feed = 0). The weight of the animals
is measured at the beginning (preweight) and at the end of the trial (postweight).
Both preweight and postweight are measured in kilograms, and the difference
(veightdiff) is calculated using weightdiff = postweight – preweight. The
experimenters begin their analysis by fitting the following regression model:
weightdiff = B + Bifeed + Bapreweight + Bzfeed : preveight +e
from which the following R output is obtained:
Coefficients:
Estimate
Std. Error t value Pr(>|tI)
(Intercept)
0.438815
0.181572
2.417
0.0175 *
feed
4.892093
0.250430
19.535
<2e-16 ***
preweight
0.048143
0.001699 28.335
<2e-16 ***
feed:preweight -0.029225
0.002308 -12.664
<2e-16 ***
(a) Using the R output above, interpret the linear relationship between an animal
weightdiff and their preweight under the old diet and explain how this
differs when using the new feed. Sketch two straight lines representing the fit.
(b) State the assumptions associated with a linear regression model. Using the
plots provided at the end of the paper, in addition to any other relevant in-
formation, discuss whether the modelling assumptions have been met. Clearly
explain your reasoning.
![(c) The scientists wish to obtain a prediction and prediction interval for the likely
weight difference for an animal weighing 121 kilograms. They use the following
R command:
predict (weighttrial.lm,
newdata = data.frame (preweight = 121, feed = 1),
interval = "confidence", level = 0.95)
fit
lwr
upr
7.620016 7.550133 7.6899
Explain why this calculation is incorrect and explain what the consequence of
this mistake would be. Interpret the interval that has been calculated.
Residuals vs Fitted
Normal Q-Q
o18
450
04
00
-02
04
o Ocg
Fitted values
Theoretical Quantiles
Figure 1: Residual plots for the model in question R1(b)
Serpise pezpiepuRS
8
gerpseu](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7b9bfc34-855c-44c2-9d25-87973dbac7ae%2Fda66db7f-b72a-4ba3-bd0d-883f992bfdde%2Fd19dafq_processed.png&w=3840&q=75)
Transcribed Image Text:(c) The scientists wish to obtain a prediction and prediction interval for the likely
weight difference for an animal weighing 121 kilograms. They use the following
R command:
predict (weighttrial.lm,
newdata = data.frame (preweight = 121, feed = 1),
interval = "confidence", level = 0.95)
fit
lwr
upr
7.620016 7.550133 7.6899
Explain why this calculation is incorrect and explain what the consequence of
this mistake would be. Interpret the interval that has been calculated.
Residuals vs Fitted
Normal Q-Q
o18
450
04
00
-02
04
o Ocg
Fitted values
Theoretical Quantiles
Figure 1: Residual plots for the model in question R1(b)
Serpise pezpiepuRS
8
gerpseu
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![MATLAB: An Introduction with Applications](https://www.bartleby.com/isbn_cover_images/9781119256830/9781119256830_smallCoverImage.gif)
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
![Probability and Statistics for Engineering and th…](https://www.bartleby.com/isbn_cover_images/9781305251809/9781305251809_smallCoverImage.gif)
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
![Statistics for The Behavioral Sciences (MindTap C…](https://www.bartleby.com/isbn_cover_images/9781305504912/9781305504912_smallCoverImage.gif)
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
![MATLAB: An Introduction with Applications](https://www.bartleby.com/isbn_cover_images/9781119256830/9781119256830_smallCoverImage.gif)
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
![Probability and Statistics for Engineering and th…](https://www.bartleby.com/isbn_cover_images/9781305251809/9781305251809_smallCoverImage.gif)
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
![Statistics for The Behavioral Sciences (MindTap C…](https://www.bartleby.com/isbn_cover_images/9781305504912/9781305504912_smallCoverImage.gif)
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
![Elementary Statistics: Picturing the World (7th E…](https://www.bartleby.com/isbn_cover_images/9780134683416/9780134683416_smallCoverImage.gif)
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
![The Basic Practice of Statistics](https://www.bartleby.com/isbn_cover_images/9781319042578/9781319042578_smallCoverImage.gif)
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
![Introduction to the Practice of Statistics](https://www.bartleby.com/isbn_cover_images/9781319013387/9781319013387_smallCoverImage.gif)
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman