I'm doing a contrast anova on a dataset, and I'm just not sure what to do to get the lsmeans estimates relating to one particular contrast (c1
).
Here is my code:
bats$Site <- as.factor(bats$Site)
str(bats)
bats$logActivity <- log10(bats$AllBatsAct+1)
c1 <- c(0.5,0.5,0,-0.5,-0.5) #AB vs DE
c2 <- c(0.5, -0.5, 0, 0, 0) #A vs B
c3 <- c(0, 0, 0, 0.5, -0.5) #D vs E
c4 <- c(0.2, 0.2, -0.8, 0.2, 0.2) #C vs the rest
contrasts(bats$Position)=cbind(c1,c2,c3,c4)
contrasts(bats$Position)
model2a <- lmer(logActivity ~ Ecotone*Position + (1|Site), data=bats)
anova(model2a)
I've seen in other related questions that the line of code to see the estimates may be like:
summary.lm(aov(???))
But I don't know what the "???" would be. I really only need the means and SE estimates for the c1
contrast: A+B and D+E. Any suggestions?