
Iz
) and ovarian reabsorption (Iy
), were taken.
A single control group was measured with no such treatment, i.e., at time 0; there are
n=10 per group.
The design is thus nearly a three-way factorial, with factors
caste
(Queen, Worker), treat
(CAP, MAL) and time
,
except that there are only 11 combinations of Treatment and Time;
we call these trtime
below.data(Bees)
cbind(Iz,Iy) ~ caste*treat*time
ignore the control condition at time==0
, where treat==NA
.
To handle the additional control group at time==0
, while separating the
effects of Treatment and Time, 10 contrasts can be defined for the trtime
factor in the model cbind(Iz,Iy) ~ caste*trtime
See demo(bees.contrasts)
for details.
In the heplot
examples below, the default size="evidence"
displays are
too crowded to interpret, because some effects are so highly significant. The alternative
effect-size scaling, size="effect"
, makes the relations clearer.data(Bees)
# 3-way factorial, ignoring 0 group
bees.mod <- lm(cbind(Iz,Iy) ~ caste*treat*time, data=Bees)
Anova(bees.mod)
op<-palette(c(palette()[1:4],"brown","magenta", "olivedrab","darkgray"))
heplot(bees.mod, xlab="Iz: Ovarian development", ylab="Iz: Ovarian reabsorption",
main="Bees: ~caste*treat*time")
heplot(bees.mod, xlab="Iz: Ovarian development", ylab="Iz: Ovarian reabsorption",
main="Bees: ~caste*treat*time", size="effect")
# two-way design, using trtime
bees.mod1 <- lm(cbind(Iz,Iy) ~ caste*trtime, data=Bees)
Anova(bees.mod1)
heplot(bees.mod1, xlab="Iz: Ovarian development", ylab="Iz: Ovarian reabsorption",
main="Bees: ~caste*trtime")
heplot(bees.mod1, xlab="Iz: Ovarian development", ylab="Iz: Ovarian reabsorption",
main="Bees: ~caste*trtime",size="effect")
palette(op)
# effect plots for separate responses
if(require(effects)) {
bees.lm1 <-lm(Iy ~ treat*caste*time, data=Bees)
bees.lm2 <-lm(Iz ~ treat*caste*time, data=Bees)
bees.eff1 <- allEffects(bees.lm1)
plot(bees.eff1,multiline=TRUE,ask=FALSE)
bees.eff2 <- allEffects(bees.lm2)
plot(bees.eff2,multiline=TRUE,ask=FALSE)
}
Run the code above in your browser using DataLab