Dear list,

This isnt so much an R question, as a theoretical question, but this is
probably the best place to find an answer.
Im attempting to calculate my effective sample size. Following Zuur et al
2009, for models with a single random effect, this seems to be relatively
simple:

Intraclass correlation, ICC:

ICC = d^2 / (d^2+sigma^2)

in R:
ranmod <- summary(mod)@REmat
d <- as.numeric(ranmod[1,4])
sigma <- as.numeric(ranmod[2,4])
ICC <- d^2/(d^2 + sigma^2)

Using the random effects matrix from the summary.mer object we take the
St.Dev value for the value of d and the residual St.Dev for sigma.

ICC is then used to calculate a "design effect" :

DE = 1 + (n-1) * ICC

in R:
DE <- 1 + (length(ranef(mod)[,1])-1)*IC

where n is the number of levels for the random effect. This is then used to
calculate the effect sample size, N_effective:

N_effective = (N * n) / DE

in R:
N_effective <- N*length(ranef(mod)[,1]) / DE
(I havent come up with a good way to find N...)

where N is the number of samples per level of the random effect.


I was wondering whether anyone had any idea how to calculate this for a
model with 2 random effects. I havent been able to find any suggestions
beyond this single random effect. I assume multiple random effects affect
d, N and n.

Perhaps more relevant, is it even worth worrying about effective sample
size for use as a denominator DF when calculating P-Values?


Thanks in advance,

Alan Haynes




--------------------------------------------------
Email: aghaynes@gmail.com
Mobile: +41794385586
Skype: aghaynes

	[[alternative HTML version deleted]]

