# Mixed models: Calculating ICC for model with a random intercept and a random slope

#### pjmiller_57

##### New Member
Hello All,

I have a question about how to calculate an intraclass correlation coefficient in a mixed model that has both a random intercept and a random slope. I have a very nice paper by Judith Singer that describes how to do this for a random intercept model. The paper can be accessed at:

http://www.gse.harvard.edu/~faculty/singer/Papers/Using Proc Mixed.pdf

At the top of page 330, there is a formula for calculating the ICC for a random intercept model. There's also a section on individual growth models, that starts on page 340. The growth models have a random intercept and a random slope. Is there some way to extend the formula on page 330, so I can calculate the ICC for growth models like that described on pages 340 and 341? If so, how is this done?

Thanks,

Paul

#### Jake

Re: Mixed models: Calculating ICC for model with a random intercept and a random slop

Hi Paul. It's a good question. I thumbed through Snijders & Bosker (2012) and couldn't find an answer. So I did a small amount of Googling and the only clue I found (in the minute or so that I spent looking online) was the page here (LINK) which had the following to say:
For a random intercept model, the intraclass correlation was identical to the variance partitioning coefficient, and it was quite simple to calculate. 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.
If you find a better answer be sure to update us in this thread!

#### spunky

##### Doesn't actually exist
Re: Mixed models: Calculating ICC for model with a random intercept and a random slop

From Kreft & De Leeuw's Introducing Multilevel Modeling, p. 63:

"The concept of intra-class correlation is based on a model with a random intercept only. No unique intra-class correlation can be calculated when a random slope is present in the model. The value of the between variance in models with a random slope and a random intercept is a combination of slope and intercept variance (and covariance). We know from the discussin of th basic RC model that the variance of the slope (and, as a consequence, the value of the covariance) is realted to the value of the explanatory variable x. Thus the intra-class correlation between individuals will be different, in models with random slopes, for individuals with different x-values. As a result the intra-class correlation is no longer uniquely defined".
so some people say it can't be done. other people say it can be done but it's complicated. i guess this is one of those moments where you go back to the literature and cite your favourite author in case he or she has come up with something...

#### pjmiller_57

##### New Member
Re: Mixed models: Calculating ICC for model with a random intercept and a random slop

Hi "Spunky" and Jake,

Thanks for your replies. So it looks like this can't be done. Or it is difficult to do correctly and will be seen as controversial by some. So I think I'll leave off trying to do this.

Paul

#### jsims

##### New Member
Re: Mixed models: Calculating ICC for model with a random intercept and a random slop

Hello All,

I have a question about how to calculate an intraclass correlation coefficient in a mixed model that has both a random intercept and a random slope. I have a very nice paper by Judith Singer that describes how to do this for a random intercept model. The paper can be accessed at:

http://www.gse.harvard.edu/~faculty/singer/Papers/Using Proc Mixed.pdf

At the top of page 330, there is a formula for calculating the ICC for a random intercept model. There's also a section on individual growth models, that starts on page 340. The growth models have a random intercept and a random slope. Is there some way to extend the formula on page 330, so I can calculate the ICC for growth models like that described on pages 340 and 341? If so, how is this done?

Thanks,

Paul
Hi there,

I am trying to track down the article you referenced in your prior post, but the link is not working. Would you mind posting the name of the article? I'm interested in this topic.

Many thanks,
Jacqueline

#### Jake

Re: Mixed models: Calculating ICC for model with a random intercept and a random slop

Hi Jacqueline, since initially responding to this thread in 2012, I have since become deeply acquainted with the paper by Goldstein et al. (2002; see link below) which describes how the ICC would be calculated for such models and, at the same time, shows why the ICC is basically a pretty useless statistic for anything more complex than random-intercept models. Briefly, when there are random slopes, the ICC is a function of the predictors (the x-values) and thus can only be computed for particular sets of x-values. You could do something like report the ICC at the average of all the x-values, but this number will be demonstrably inaccurate for the majority of the data. Because of these complications, my policy for the last few years has been to simply advise against computing ICC for such models, and instead recommend that people just report the variance components (preferably in standard deviation form).

http://seis.bris.ac.uk/~frwjb/materials/pvmm.pdf

#### pjmiller_57

##### New Member
Re: Mixed models: Calculating ICC for model with a random intercept and a random slop

Hi Jacqueline,

Here is the reference. You should be able to download this from Judith Singer's website at Harvard.

Singer, J. (1998). Using SAS PROC MIXED to fit multilevel models, hierarchical mod-
els, and individual growth models. Journal of educational and behavioral statistics,
23(4):323–355.

Paul

Hi there,

I am trying to track down the article you referenced in your prior post, but the link is not working. Would you mind posting the name of the article? I'm interested in this topic.

Many thanks,
Jacqueline

#### hlsmith

##### Less is more. Stay pure. Stay poor.
Re: Mixed models: Calculating ICC for model with a random intercept and a random slop

Great. The code etc. seem about right based on my limited experience, but I will note the publication data of 1998. So you may want to check SAS Proc Mixed Documentation to confirm that new options aren't available.

#### noetsi

##### Fortran must die
Re: Mixed models: Calculating ICC for model with a random intercept and a random slop

I found this while trying to determine how to calculate ICC in SAS. I think you can generate ICC with random slopes, but the definition changes from that with just a random intercept. I have to go back to my notes to see what the new definition of ICC when you add predictors is.

I had another question. Some say that you calculate a pure ICC with no predictors other than the intercept (the 'empty model'). This seems to suggest you do it with the random intercept. I am not sure which of those two models is preferable?