Fitting a One-Way Model

This exercise takes you through the end of Cleveland's chapter 2. We'll focus this time on the InsectSprays data set, which is also available whenever you launch R.

Readings

You can find all these readings through the "readings" link at the main course webpage. The course examples page contains examples of all the types of analysis in this project.

Before you start the exercise below, type "?InsectSprays" at the R prompt, and read about the data set. It provides two variables, "count" and "spray". The "count" variable gives the counts of insects in a series of agricultural plots. These plots have each been treated with some type of insecticide spray. The type of spray is indicated by the values of the variable "spray".

Exercise

  1. Use quantile plots to study how insect counts are affected by the effect of type of spray.

  2. Compare the types of spray using box plots

  3. Calculate the mean insect count for each type of spray, and display these means using a dot chart.

  4. Use box plots to look at the residuals from step 3.

  5. Use quantile-quantile plots to compare the residuals within each category to the pooled residuals. Use this plot to decide whether the residuals can be pooled. If they cannot be pooled, then how do the residual distributions differ? (For example, they might differ in variance, in the length of their tails, or in some other way.)

  6. Is the variation in insect counts explained well by the model or poorly? Use a residual-spread plot to find out.

  7. Classical statistical methods, such as analysis of variance, assume that all residual distributions have equal variance. Would such methods be appropriate with these data? Why or why not?

  8. What have you learned from all this about insect sprays. Which sprays are effective, and which are not? Which graphical methods were most useful to you in reaching this conclusion?