options(contrasts=c("contr.sum","contr.poly") )
options(width = 70,digits=3)
load(url("http://pnb.mcmaster.ca/bennett/psy710/datasets/goats.rda") )
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.
gain
and wt
.Plot the marginal means of treatment
, and then use
ANOVA to evaluate the effect of
treatment
.
Use ANCOVA to evaluate the effect of
treatment
after controlling for the linear association
between weight gain and initial wt
.
Plot the data and best-fitting lines computed by the ANCOVA.
Evaluate the homogeneity of slopes assumption.
Using the model with the interaction term, what are the values of the slopes of the best-fitting lines for the two treatment groups?
Calculate strength of association and effect size for
treatment
.