A method for testing association patterns of social animals