FactorinR - Factor in R Turkey data These data are from an...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Factor in R Turkey data: These data are from an experiment to compare sources of an essential amino acid called methionine in turkey diets. Sixty pens of turkeys received a similar diet, supplemented with methionine from one of three sources at one of five doses. In the data below, A is the amount; Gain is the average weight gain in the pen; S is the source number, m is the number of pens needed to get the average, and SD is the standard deviation of the m pens. > library(alr3) > data(turkey) > turkey A Gain S m SD 1 0.00 623.0 1 10 19.459359 2 0.04 680.2 1 5 7.190271 3 0.10 721.4 1 5 21.454603 4 0.16 750.4 1 5 17.487138 5 0.28 789.4 1 5 14.673105 6 0.04 672.2 2 5 26.508489 7 0.10 709.2 2 5 14.669697 8 0.16 731.2 2 5 12.173742 9 0.28 778.2 2 5 25.704085 10 0.04 668.4 3 5 24.490815 11 0.10 715.6 3 5 9.044335 12 0.16 732.0 3 5 17.705931 13 0.28 794.0 3 5 19.287302 These data are summarized into groups, and so (1) we will need to use weights and fitting and (2) we will have a test for lack of fit based on pure error. For this first part of the analysis we will ignore the ten pens with no supplement added, the first row of the file, but will include it later > plot(Gain ~ factor(S), turkey) 1 2 3 650 700 750 800 factor(S) Gain
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
> m0 <- lm(Gain ~ factor(S), turkey, weights = m) > summary(m0) Call: lm(formula = Gain ~ factor(S), data = turkey, weights = m) Residuals: Min 1Q Median 3Q Max -236.85 -39.58 10.06 117.39 204.60 Coefficients: Estimate Std. Error t value Pr(>|t|)
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern