Initialize R with the following commands:
options(digits=4,width=80)
options(contrasts=c("contr.sum","contr.poly") ) # set definition of contrasts
load(url("http://pnb.mcmaster.ca/bennett/psy710/datasets/tetrahymena.rda") )
load(url("http://pnb.mcmaster.ca/bennett/psy710/datasets/leprosy.rda") )
Much of the material in this section was based on Section 10.7 in Introductory Statistics with R by Peter Dalgaard.
An experiment was conducted to examine the factors that influence growth in Tetrahymena cells. What is/are Tetrahymena? From Wikipedia:
Tetrahymena is a genus of free-living ciliates that can also switch from commensalistic to pathogenic modes of survival. They are common in freshwater ponds. Tetrahymena species used as model organisms in biomedical research are T. thermophila and T. pyriformis.
The experiment grew Tetrahumena cells in two groups of cultures that
either did or did not include glucose. The primary research question
whether glucose affected the diameter of cells. At the start of the
study, the investigators measured the cell concentration (count per ml)
for each cell culture. The data are stored in the data frame
tetrahumena
, which contains the two-level factor
glucose
and the numeric variables diameter
,
conc
(cell concentration), and logConc
(
log(cell concentration) ).
Conduct an analysis of variance to evaluate the effect of
glucose
on diameter
.
Conduct an analysis of covariance to evaluate the effect of
glucose
on diameter
after controlling for the
effect cell concentration. Conduct two ANCOVAs: one that uses
conc
as the covariate, and another that uses
logConc
as the covariate.
Regarding the previous question: Which ANCOVA is better? Why?
logConc
as the
covariate) depend on the order of terms in the model? Why or why
not?An experiment examined the effect of drugs on the treatment of
leprosy. A measure of the abundance of leprosy bacilli on the skin was
calculated for each participant. Participants were then randomly
assigned to one of three treatment conditions (\(n=10\) per group) that involved taking an
antibiotic or a placebo daily for several months. At the end of the
experiment, a measure of the abundance of leprosy bacilli was taken
again on each participant. The data are stored in the data frame
leprosy
which contains the numeric variables
baseline
and postTreatment
and the three-level
factor drug
. The levels in drug
represent two
antibiotics (A
and B
) and a control group
(placebo
).
Use the analysis of variance to evaluate the effect of
drug
on postTreatment
. Use Tukey pairwise
tests to compare the three groups.
Use the analysis of covariance to evaluate the effect of
drug
on postTreatment
after controlling for
baseline
. Check the homogeneity of slopes assumption. Then
use Tukey HSD tests to evaluate pairwise differences among the adjusted
means.
drug
was significant in the
ANOVA but not the ANCOVA.