Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: intraclass correlation for Categorical data


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


John-
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.

Steve
[email protected]

*************************
webuse union, clear
gen index=_n
xtlogit union, i(id)
xtrho
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
John
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index