Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Estimating the (possibly negative) intracluster correlation

From   Scott Baldwin <>
Subject   Re: st: Estimating the (possibly negative) intracluster correlation
Date   Sun, 5 Sep 2010 22:06:34 -0600

Hi Bert,

One option is to use the residuals option with an exchangeable
correlation structure in xtmixed. This allows you to look at the
correlation among observations within a cluster rather than the
variance among the cluster means (as would be the case if you fit a
random intercept model). For example,

webuse ovary, clear
xtmixed follicles sin1 cos1 || mare:, nocons var residuals(exchangeable)
The covariance parameter in this model is the covariance among
observations within a cluster. You have to use use the "mare: ,
nocons" so that xtmixed knows what variable the cluster id variable
is.  If you exclude the var option:

xtmixed follicles sin1 cos1 || mare:, nocons residuals(exchangeable)
the correlation parameter is the intraclass correlation. Because you
have modeled the non-independence among observations within a cluster
as a correlation/covariance (as opposed to a variance), the intraclass
correlation can be negative. Both models are identical in fit to a
random intercept model. The examples above don't have a negative
intraclass correlation but will accommodate negative values. Note also
that whereas an ICC modeled using variances has a range from 0 to 1,
the negative ICC ranges from -1/(m-1) to 1, where m is the cluster
size (so as clusters get really big, ICCs can be negative but they
will be really close to zero).

Hope that helps.


On Sun, Sep 5, 2010 at 6:44 PM, Bert Jung <> wrote:
> Dear Statalisters,
> I am interested in estimating an intracluster correlation, if possible
> conditional on several covariates, that could be negative.  I wondered
> if anyone knows a command or strategy to do this?
> As background: I am estimating a simple OLS -regress- model and find
> that the default (unclustered, not robust) standard errors are
> *higher* than the clustered s.e.  A potential cause is model
> misspecification that can induce negative intracluster correlation, as
> discussed in  I
> hope to diagnose the problem, starting with a closer look at the
> intracluster correlation.  (I will also work on a better
> specification, of course.)
> -loneway- calculates the intraclass correlation as ratio of two
> variances, hence constraining the correlation to be >=0.  I am looking
> for an alternative way that also allows me to control for covariates.
> Thanks in advance for any pointers,
> Bert
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index