Data for Exercise 9.22
Eggs
A data frame/tibble with 12 observations on two variables
amount of feed supplement
number of eggs per day for 100 chickens
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
plot(eggs ~ feed, data = Eggs)
model <- lm(eggs ~ feed, data = Eggs)
abline(model, col = "red")
summary(model)
#>
#> Call:
#> lm(formula = eggs ~ feed, data = Eggs)
#>
#> Residuals:
#> Min 1Q Median 3Q Max
#> -7.7667 -4.8417 -0.4167 2.7083 9.1333
#>
#> Coefficients:
#> Estimate Std. Error t value Pr(>|t|)
#> (Intercept) 77.2667 5.8540 13.20 1.19e-07 ***
#> feed 0.5800 0.3186 1.82 0.0987 .
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Residual standard error: 6.171 on 10 degrees of freedom
#> Multiple R-squared: 0.2489, Adjusted R-squared: 0.1737
#> F-statistic: 3.313 on 1 and 10 DF, p-value: 0.09875
#>
rm(model)