help quickicc -------------------------------------------------------------------------------

Title

quickicc -- Intraclass correlation and standard error calculation after XTMIXED

Syntax quickicc

Description

quickicc calcuates the intraclass correlation (ICC) after fitting a two-level xtmixed model where the intercept is the only random effect. In addition to calculating the ICC, this program also calculates the standard error of the maximum likelihood large sample ICC (see reference).

Examples

First, fit an xtmixed model

. use iccexample.dta, clear

. xtmixed machach || l2id:

Then, type quickicc

. quickicc

You can also find ICCs after models with several fixed effects

. xtmixed machach f b h || l2id:

. quickicc

Saved results

quickicc saves the following in r():

Scalars r(l1vc) the level 1 variance component r(l2vc) the level 2 variance component r(tv) the total variance r(N) the number of observations from the xtmixed command r(m) the number of groups from the xtmixed command r(icc) the intraclass correlation r(se) the standard error of the intraclass correlation

Macros r(model) the previous xtmixed command

References

Donner, A. & J. J. Koval. 1980. The Large Sample Variance of an Intraclass Correlation. Biometrika. 67:3. 719-722.