# Correlation based on binary events

#### Vatsa

##### New Member
I have a system with 5 components. Every 10 seconds the signal travels to all of them and I know how many of them responded. I need to know there there is a correlation in response. So, my time series data looks something like:

Code:
A    B    C    D    E
-----------------------
1    0    1    1    1
1    1    1    1    1
1    0    0    0    1
1    0    1    0    1
............
there are about 10,000 rows
Can I use a simple correlation function to see if there is correlation between occurrences of the above 5. Or is there a better way for this?

Thanks guys

#### terzi

##### TS Contributor
Hi Vatsa,

I can't tell for sure if it is the appropriate way to go since you give too little information but maybe you could take a look at the concept of Tetrachoric Correlation, it could be of use.

#### noetsi

##### No cake for spunky
SAS will generate a polychoric/tetrachoric correlation matrix but you need a macro to do it. SPSS uses R to do this, which is amusing. I can send the SAS macro link if that helps.

Note that the polychoric (and I think the tetrachoric) correlations makes the assumption that behind the observed binary/ordinal responses there is an interval latent variable. If you feel that is unrealistic then this might not be the way to go.

This is a useful discussion

http://john-uebersax.com/stat/tetra.htm