Hello

I would like to follow up two discussions regarding levels of nested random
effects to include from the postings at <
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2007q3/000305.html> and <
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2013q3/020550.html>. I
have a binomial lmer that, following up from these two posts, one should be
able to write in either of the following two ways:

m1a <- lmer(Y ~ A*B + (1|M/N/O) + (1|P) + (1|Q), family=binomial) # version
a

MinN <- M:N; MinNinO <- M:N:O
m1b <- lmer(Y ~ A*B + (1|M) + (1|MinN) + (1|MinNinO) + (1|P) + (1|Q),
family=binomial) # version b

I now want to determine which of the random effects I can delete. Now for P
and Q, anova tests reveal that (1|P) and (1|Q) cannot be deleted:

m2a <- lmer(Y ~ A*B + (1|M) + (1|MinN) + (1|MinNinO) + (1|Q),
family=binomial) # testing to delete (1|P))
anova(m1b, m2a) # is significant so I stick with m1b

m2b <- lmer(Y ~ A*B + (1|M) + (1|MinN) + (1|MinNinO) + (1|P),
family=binomial) # testing to delete (1|Q))
anova(m1b, m2) # is significant so I stick with m1b

The random effects results of m1b are:
Groups Name Variance Std.Dev.
P (Intercept) 0.92279 0.96062
Q (Intercept) 0.89998 0.94867
MinNinO (Intercept) 0.33808 0.58145
MinN (Intercept) 0.18905 0.43480
M (Intercept) 0.08050 0.00648

But how do I test for deleting which level of nesting, if any, can be
deleted from (1|M/N/O) or (1|M) + (1|MinN) + (1|MinNinO). Specifically, I
was assuming it makes sense to start testing these from the most
fine-grained level so I sort of followed Faraway (2006: 189) and did this:

m3 <- lmer(Y ~ A*B + (1|M) + (1|MinN) + (1|P) + (1|Q), family=binomial) #
testing to delete (1|MinNinO)
anova(m1b, m3) # is significant so I stick with m1b

Does this mean that I am done with testing because when the most
fine-grained level of resolution makes a significant contribution, testing
whether the more coarse-grained levels are necessary or not makes no sense?
Peter Dalgaard's posting suggests that I can still go on testing whether,
in addition to the most fine-grained level of resolution, there is also
more coarse-grained structure. But how would I do that? Given that I have
already defined the interactions as he suggested in the post referenced
above and that (1|MinNinO) is in the model, I was thinking that I can just
omit (1|MinN) and do this:

m4 <- lmer(Y ~ A*B + (1|M) + (1|MinNinO) + (1|P) + (1|Q), family=binomial)
# testing to delete the nesting level of N, i.e. (1|MinN)
anova(m1b, m4) # is ns so I go with m4

Then the same for (1|M):

m5 <- lmer(Y ~ A*B + (1|MinNinO) + (1|P) + (1|Q), family=binomial) #
testing to delete the nesting level of M, i.e. (1|M)
anova(m4, m5) # is ns so I go with m5

Is this correct? I could not find much on systematic testing different
levels of nesting but apart from Faraway (2006) and Crawley (2013 referred
to in the previous posting cited above, I could not find any stepwise
instruction. Any pointers would be much appreciated!
Thanks,
RZ

	[[alternative HTML version deleted]]

