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, statalist.org 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 <sjsamuels@gmail.com>
To   statalist@hsphsun2.harvard.edu
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
sjsamuels@gmail.com

*************************
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index