This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Binary Correlation In R

How would it be possible to correlate ( preferably Pearson correlation) of two binary matrices (with values 0 and 1) using R ??

r correlation

Btw, I assume you have a biological application in mind? If so you should describe it so we also can see if your approach is sane. If not, in principal I would have to close the question, but I am just assuming you have.

1 answer

Yes, it works.

In fact, a Pearson correlation coefficient estimated for two binary variables will return the phi coefficient.

http://en.wikipedia.org/wiki/Phi_coefficient

Log in to answer this question.