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

Info iconThis 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
Background image of page 1

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

View Full DocumentRight 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|) (Intercept) 727.50 30.49 23.863 3.79e-10 *** factor(S)1 -29.60 39.36 -0.752 0.469 factor(S)2 -4.80 43.11
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/12/2010 for the course STAT 425 taught by Professor Ma,p during the Fall '08 term at University of Illinois, Urbana Champaign.

Page1 / 6

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

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online