Hi,
I have run a Tukey Kramer on my mixed effects models (using lmer). However,
I have non-normal data that can't really be transformed because it includes
negative numbers. So, I have opted to use a parametric bootstrap to deal
with the violation of the assumptions.
Here is my code for the mixed effects models and the parametric bootstraps,
which runs fine.
T.chicka.full<-lmer(Chicka ~ Stimuli + Playback + (1|House) + (1|Season),
na.action="na.exclude", data=chick, REML = "F")
T.chicka.null<-lmer(Chicka ~ Playback + (1|House) + (1|Season),
na.action"na.exclude", data=chick, REML = "F")
T.chicka.full
anova(T.chicka.null, T.chicka.full)
#BOOTSTRAPPING#
chicka.boot<-numeric(1000)
for(i in 1:1000){
chicka.est <- unlist(simulate(T.chicka.null))
null.chicka<-lmer(chicka.est ~ 1 + (1|House[!is.na(chick$Chicka)]) + (1|
Season[!is.na(chick$Chicka)]), na.action="na.exclude", REML=F)
alt.chicka<- lmer(chicka.est ~ Stimuli[!is.na(chick$Chicka)] + (1|House[!
is.na(chick$Chicka)]) + (1|Season[!is.na(chick$Chicka)]),
na.action"na.exclude", REML=F)
chicka.boot[i] <- 2*(logLik(alt.chicka) - logLik(null.chicka))
}
(sum(chicka.boot > 26.656) + 1)/1000 #p-value = 0.001
hist(chicka.boot)
However, I am trying to run a parametric bootstrap on my Tukey Kramer code,
but cannot figure out how to combine them. Below is my code for the Tukey
Kramer.
#TUKEYS#
comp.T.chicka <- glht(T.chicka.full, linfct = mcp(Stimuli="Tukey"))
print(summary(comp.T.chicka))
chick$stimuliplayback <- interaction(chick$Stimuli, chick$Playback)
model.T.chicka <- lmer(Chicka ~ stimuliplayback + (1|House) + (1|Season),
na.action="na.exclude", data=chick)
comp.stimuli.playback <- glht(model.T.chicka,
linfct=mcp(stimuliplayback"Tukey"))
summary(comp.stimuli.playback)
If anyone knows how to incorporate the Tukey Kramer code into the
parametric bootstrap code I would appreciate any help I can get.
Alternatively, if anyone has suggestions for another way to bootstrap Tukey
Kramer I would also be so appreciative.
Thank you!
A
--
Alexis Billings
PhD Candidate, Bioacoustics Lab
Organismal Biology and Ecology
Division of Biological Sciences
University of Montana
[[alternative HTML version deleted]]