1 Initialize R

options(contrasts=c("contr.sum","contr.poly") )
options(width = 70,digits=3) 
load(url("http://pnb.mcmaster.ca/bennett/psy710/datasets/goats.rda") )

2 Goats Data

The following text was taken from material that was posted on www.statlab.uni-heidelberg.de/data/ancova/goats.story.html.

Experiments were carried out on six commercial goat farms to determine whether the standard worm drenching program was adequate. Forty goats were used in each experiment. Twenty of these, chosen at random, were drenched according to the standard program, while the remaining twenty were drenched more frequently. The goats were individually tagged and weighed at the start and end of the year-long study. For the first farm in the study the resulting live weight gains, along with the initial live weights, are given for the first farm in the study. In each experiment the main interest was in the comparison of the live weight gains between the two treatments.

  1. Use linear regression to evaluate the linear relation between gain and wt.
  1. Plot the linear regression line and weight gain in a single figure.
  1. Plot the marginal means of treatment, and then use ANOVA to evaluate the effect of treatment.

  2. Use ANCOVA to evaluate the effect of treatment after controlling for the linear association between weight gain and initial wt.

  1. List the coefficients of the ANCOVA model. What do the coefficients mean?
  1. Plot the data and best-fitting lines computed by the ANCOVA.

  2. Evaluate the homogeneity of slopes assumption.

  3. Using the model with the interaction term, what are the values of the slopes of the best-fitting lines for the two treatment groups?

  4. Calculate strength of association and effect size for treatment.

  1. Calculate the means and the adjusted means of weight gain for each treatment group. What is the (conceptual) difference between these two sets of means? Is there a substantial numerical difference between the two sets of means? Why or why not?
  1. Evaluate the difference between adjusted-means in the two treatment groups. How do the results of this analysis compare to a \(t\) test on the non-adjusted group means?