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: intraclass correlation for Categorical data

From   Steven Samuels <>
Subject   Re: st: intraclass correlation for Categorical data
Date   Fri, 13 May 2011 13:57:18 -0400

There are many types of correlations for binary data.   -findit xtrho- will lead to an ado file for binary data analyzed by -xtlogit- and to an associated (free) Stata Journal article.  I also give a direct computation which will work for negative correlations as well.


webuse union, clear
gen index=_n
xtlogit union, i(id)
loneway union id

/* Direct Computation   
(Fleiss Levin Paik, Statistical Methods for Rates & Proportions
 Third Ed, 2003, Wiley , p 443) */

keep union index id
tempfile t1
save `t1'
rename union union1
rename index index1
joinby id using `t1'
drop if index==index1
corr union union1
return list


On May 12, 2011, at 4:44 PM, John Litfiba wrote:

Dear Statalist,

I was wondering is there is a way in stata to obtain an intraclass
(within cluster) correlation for categorical variables...
There exist -loneway- but it is only for continuous variables...

Many thanks
*   For searches and help try:

*   For searches and help try:

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