[R-sig-ME] intraclass correlation (ICC) for random intercept and slope model
John.Morrongiello at csiro.au
John.Morrongiello at csiro.au
Fri Oct 4 07:03:27 CEST 2013
Hi all
I was wondering if someone could show me how to calculate the intra-class correlation coefficient for a model with random intercepts and slopes in lmer? Should I even be calculating these, and instead draw inference from intercept only models? I've had a good look online and come across a few comments like (http://www.bristol.ac.uk/cmm/learning/videos/random-slopes.html):
"For a random slopes model, the intraclass correlation is not equal to the variance partitioning coefficient because the intraclass correlation will depend on the value of x1 for each of the two elements in question. The variance partitioning coefficient just depended on one value of x1 but if two different people each have a different value of x1, both those values are going to go into the formula for the intraclass correlation. The exact expression for the intraclass correlation is quite complicated; we're not going to give it here because the important thing is simply to note that the intraclass correlation will depend on the two values of x1 as well as σ2u1, σ2u0 and σu01".
So I guess the ICC is contingent on a given value of X. I assume this is preferably an X value that all individuals share?
I can see that for a straight random intercept model (please correct if I'm wrong)
M1<-y~x+(1|ID)
ICC(ID) = var(ID)/(var(ID)+var(residual)
## correlation between measurements from two individuals
For a nested random effect model:
M2<-y~x+(1|site/ID)
ICC(ID) = var(ID)/(var(ID)+var(site)+var(residual)
##correlation between two measurements from same individual (how similar individuals are to themselves)
ICC(site) = var(site)/(var(ID)+var(site)+var(residual)
## correlation between two measurements from the same site
ICC(ID:site) = var(ID)+var(site)/(var(ID)+var(site)+var(residual)
## correlation between two measurements from the same individual at the same site
For a crossed random effect model:
M3<-y~x+(1|ID)+(1|year)
ICC(ID) = var(ID)/(var(ID)+var(residual)
ICC(year) = var(year)/(var(year)+var(residual)
What about for the random slope model:
M4<-y~x+(x|ID)
ICC(ID) = ???
e.g. (I'm tipping ICCs are going to be low)
Random effects:
Groups Name Variance Std.Dev. Corr
FishID (Intercept) 0.011445 0.10698
c.(log(Age)) 0.037444 0.19350 0.25
Residual 0.004595 0.06778
Number of obs: 640, groups: FishID, 498
or even crossed random intercept and random slope model:
M5<-y~x+(x|ID)+(x|year)
ICC(ID) = ???
ICC(year) = ???
e.g.
Random effects:
Groups Name Variance Std.Dev. Corr
FishID (Intercept) 0.0103597 0.10178
c.(log(Age)) 0.0393865 0.19846 0.21
fYear (Intercept) 0.0007723 0.02779
c.(log(Age)) 0.0147014 0.12125 -0.36
Residual 0.0044479 0.06669
Number of obs: 640, groups: FishID, 498; fYear, 6
How would I report such ICCs- do I state that they were calculated over a given range of X (in this case Age e.g. at age=2, ICC(ID)=...)?
Regards
John
More information about the R-sig-mixed-models
mailing list