Computes a simple matching similarity coefficient

binarySim(dat.frame)

Arguments

dat.frame

A data frame containing only the 0/1 columns.

Value

Returns a binary similarity matrix.

References

Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.

Examples

data(PbHeron)

binarySim(PbHeron$LiverCen)
#>    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#> 2  1                                                                   
#> 3  0 0                                                                 
#> 4  1 1 0                                                               
#> 5  0 0 1 0                                                             
#> 6  1 1 0 1 0                                                           
#> 7  1 1 0 1 0 1                                                         
#> 8  1 1 0 1 0 1 1                                                       
#> 9  1 1 0 1 0 1 1 1                                                     
#> 10 1 1 0 1 0 1 1 1 1                                                   
#> 11 1 1 0 1 0 1 1 1 1  1                                                
#> 12 1 1 0 1 0 1 1 1 1  1  1                                             
#> 13 0 0 1 0 1 0 0 0 0  0  0  0                                          
#> 14 0 0 1 0 1 0 0 0 0  0  0  0  1                                       
#> 15 1 1 0 1 0 1 1 1 1  1  1  1  0  0                                    
#> 16 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1                                 
#> 17 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1                              
#> 18 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1                           
#> 19 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1                        
#> 20 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1  1                     
#> 21 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1  1  1                  
#> 22 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1  1  1  1               
#> 23 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1  1  1  1  1            
#> 24 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1  1  1  1  1  1         
#> 25 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1  1  1  1  1  1  1      
#> 26 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1  1  1  1  1  1  1  1   
#> 27 1 1 0 1 0 1 1 1 1  1  1  1  0  0  1  1  1  1  1  1  1  1  1  1  1  1