Chapter 1 Linear Regression Review

1.1 Exercise 1

For this exercise, we will consider the LizardBite data set in the abd library (Middleton & Pruim, 2015). This data set was collected by Lappin & Husak (2005) and featured in a problem in Whitlock & Schluter (2015)’s popular introductory statistics book. Lappin & Husak (2005) was interested in whether the bite force (bite) of male lizards in the species Crotaphyutus collaris was predictive of their territory size (territory).

  1. Fit a linear model using R that could be used to predict territory size from a lizard’s bite force.

  2. Evaluate the assumptions of the model using graphical methods. Be sure to comment on what you are looking for in each plot (e.g., the assumption you are looking to evaluate and what would constitute an assumption violation).

  3. Interpret the intercept and slope parameters in the context of the problem.

  4. Provide a confidence interval for the slope parameter and interpret the confidence interval.

  5. Use the summary function to further explore the regression model. You will see two test statistics and two p-values. Write down the null and alternative hypotheses for these hypothesis tests. Show how you can calculate the test statistics from other output given by the summary function. Show how you can calculate the p-value using the pt function in R.

  6. Explain what the standard error associated with the slope parameter tells us. Your explanation should include reference to a sampling distribution, and you should define what this term means.

  7. Create a confidence interval for the mean territory size associated with a bite force of 5 and a prediction interval for a lizard that has a bite force of 5. Explain the difference between the two intervals. When would you prefer the latter type of interval?

This exercise can be repeated with any number of different data sets. Students could also be allowed to choose their own data set or from a list of data sets. The abd library (Middleton & Pruim, 2015) contains several other data sets, including ZooMortality and Rattlesnakes that could be used for this exercise.

References

Lappin, A. K., & Husak, J. F. (2005). Weapon performance, not size, determines mating success and potential reproductive output in the collared lizard (crotaphytus collaris). The American Naturalist, 166(3), 426–436.
Middleton, K. M., & Pruim, R. (2015). Abd: The analysis of biological data. Retrieved from https://CRAN.R-project.org/package=abd
Whitlock, M., & Schluter, D. (2015). The analysis of biological data. Roberts Publishers.