0
$\begingroup$

I'm analysing the results of a M BACI experiment. When trying to estimate means using emmeans, I'm getting this message:

NOTE: A nesting structure was detected in the fitted model: BurnType %in% (SiteClass*Period)

My model is:

result.all.lmer <- lmer(logBatAct ~ BurnType+SiteClass+Period+SiteClass:Period+BurnType:SiteClass:Period +
                          (1|Site) + (1|Site:Period), data=bats)
anova(result.all.lmer, ddf="Kenward-Roger")

and to estimate the means:

result.lmer.emmo.B <- emmeans::emmeans(result.all.lmer, ~BurnType)
summary(result.lmer.emmo.B)

Have I created the model incorrectly? How can I address this? Should I just try lsmeans instead?

$\endgroup$
1
$\begingroup$

Look at the table generated by

with(bats, table(BurnType, SiteClass, Period))

The message could mean that the levels of BurnType are different with each combination of the other two factors.

If that is not the case, you can avoid invoking the separate analyses of each nesting level by specifying nesting = NULL in the emmeans call.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.