Set R to use the sum-to-zero definition of effects and load the
runData
data frame with the following commands:
options(contrasts=c("contr.sum","contr.poly"))
load(url("http://pnb.mcmaster.ca/bennett/psy710/datasets/runData-2023.rda") )
The data frame rundata
contains data from a 3x3
between-subjects, factorial experiment that measured the time (in
seconds) to complete a 1.5-mile course. All runners were men who were
divided into 3 age groups and three fitness categories. The independent
variables were age
and fitness
and the
dependent variable was runtime
. The data frame also
contains a variable, id
, which is an id number assigned to
each subject.
age
and
fitness
on runtime.
What are the null
hypotheses for the main effects and interaction?Use box plots to illustrate the main effect of age
and the main effect of fitness
.
Evaluate the ANOVA’s constant-variance and normality assumptions.
Evaluate the simple main effect of
fitness
at each level of age
.
Analyze the main effect of age
by performing a
linear contrast that evaluates the difference between mean
runtime
in the b50
and c60
age
groups, and determine if the value of this linear contrast
depends on the level of fitness
.
b50
and c60
age groups in
the low
fitness conditions differs from the
difference between means in the b50
and c60
age groups averaged across the medium
and
high
fitness conditions. Design a set of contrast
weights that you could use to evaluate this hypothesis and then perform
the contrast.age
and fitness
? Why
or why not? Verify your answer by calculating the Type II and III sums
of squares.