# Exercise 2 determine whether there are differences in

• Homework Help
• 7
• 100% (10) 10 out of 10 people found this document helpful

This preview shows page 2 - 6 out of 7 pages.

Exercise 2Determine whether there are differences in the weights of chickens according to their feed in the chickwtsdata. Perform appropriate model diagnostics.
2
-2-1012-2-1012Theoretical QuantilesStandardized residualslm(weight ~ feed)Normal Q-Q5468533
2002503000.00.51.01.5Fitted valuesStandardized residualslm(weight ~ feed)Scale-Location5468534
0.000.020.040.060.080.10-2-1012LeverageStandardized residualslm(weight ~ feed)Cook's distanceResiduals vs Leverage545368TukeyHSD(aov(weight~feed,data =chickwts))\$feed##difflwruprp adj## horsebean-casein-163.383333 -232.346876 -94.41979 3.070197e-08## linseed-casein-104.833333 -170.587491 -39.07918 2.100151e-04## meatmeal-casein-46.674242 -113.90620720.55772 3.324584e-01## soybean-casein-77.154762 -140.517054 -13.79247 8.365309e-03## sunflower-casein5.333333-60.42082571.08749 9.998902e-01## linseed-horsebean58.550000-10.413543 127.51354 1.413329e-01## meatmeal-horsebean116.70909146.335105 187.08308 1.062092e-04## soybean-horsebean86.22857119.541684 152.91546 4.216654e-03## sunflower-horsebean168.71666799.753124 237.68021 1.219887e-08## meatmeal-linseed58.159091-9.072873 125.39106 1.276965e-01## soybean-linseed27.678571-35.68372191.04086 7.932853e-01## sunflower-linseed110.16666744.412509 175.92082 8.843233e-05## soybean-meatmeal-30.480519-95.37510934.41407 7.391356e-01## sunflower-meatmeal52.007576-15.224388 119.23954 2.206962e-01## sunflower-soybean82.48809519.125803 145.85039 3.884521e-03When performing model diagnostics we see that our linearity assumption is valid, the distri-bution of our errors appears to be normal, and homoscedasticity is present. Our anova tablegives us a p-value way below the .05 threshold. When using our TukeyHSD function we find

Course Hero member to access this document

Course Hero member to access this document

End of preview. Want to read all 7 pages?