In medicine and clinical psychology, diagnoses tend to be categorical (someone is depressed or not, someone has an anxiety disorder or not). Cooccurrence of both of these symptoms is called comorbidity. Diagnostic categories vary in their degree of comorbidity with other diagnostic categories. From the point of view of correlation, comorbidity is just a name applied to one cell in a four fold table. It is thus possible to analyze comorbidity rates by considering the probability of the separate diagnoses and the probability of the joint diagnosis. This gives the two by two table needed for a phi, Yule, or tetrachoric correlation.
comorbidity(d1, d2, com, labels = NULL)
The two by two table implied by the input
Phi coefficient of the two by two table
Yule coefficient of the two by two table
Tetrachoric coefficient of the two by two table
Proportion of diagnostic category 1
Proportion of diganostic category 2
Proportion of comorbidity (diagnostic category 1 and 2)
Names of categories 1 and 2
William Revelle
phi
, phi2tetra
,Yule
, Yule.inv
Yule2phi
, tetrachoric
and polychoric
, as well as AUC
for graphical displays
comorbidity(.2,.15,.1,c("Anxiety","Depression"))
Run the code above in your browser using DataLab