# Partitioning variance and the intra-cluster correlation

## Partitioning variation across levels

Partitioning variation across levels - more information

## Where can I find the random parameter matrix in MLwiN? How do I use this to work out the residual ('unexplained') variance at each level?

Variances and covariances are stored in column c1096. (See question Where is the model fitting information stored in MLwiN.) The values from the matrix at each level are stacked in this column, starting with the highest level and ending with the lowest level. For each level, only the lower triangular matrix is stored (since the full matrix is symmetrical), and the values in the matrix are entered row by row. So for example if you have set up a two-level model with a random slope (at level 2) on just one variable, then C1096 will contain in this order: the variance of the random intercepts, the covariance between the random intercepts and the random slopes, the variance of the random slopes, the level 1 variance. The matrices of random parameters can also be seen more clearly in the Equations window. Finally, in MLwiN 2.10 the same information can be found in the Results Table if the model is stored (by selecting ‘Store' at the bottom of the Equations window and entering a name for the model when prompted). In the Results Table the information appears under 'Random Part', in the same order as in C1096, but there are row labels in the table indicating where the divisions between levels come and which variable is associated with each random parameter, which make it easier to understand.When fitting multilevel models, we usually talk about the 'residual variance' rather than the 'unexplained variance' as this is a more appropriate term. Working out the residual variance at each level is simple when dealing with a variance components or random intercepts model: in this case there is only one random parameter at each level and this is the residual variance at that level. For more complicated models (e.g. random slope models) this is not quite so straight forward and it is necessary to use MLwiN's Variance function window (from the Model menu). Details of how to use this are given in Chapter 7 of the User Guide (on pp76-92)

## How do I calculate the amount of variation at each level for nonlinear models?

Partitioning variation in nonlinear models: MLwiN does not calculate the amount of variation at each level in nonlinear multilevel models unlike some other statistical packages. Due to the non-linear estimation procedure, the level 1 variance is no longer on the same scale as the level 2 variance, and so the terms at all levels do not add up to give the total variance for the model fitted. Therefore, the formula in a Normal response model cannot be used here. There are some other ways to obtain such measures. See further details.

## What is the intra cluster correlation?

Sometimes referred to as 'intra class correlation' in survey work, this strictly measures correlation between units within a higher level unit. For simple two-level variance component or random intercept models this is equivalent to the proportion of variance at the higher level, and so equal to the variance partition coefficient (VPC).