Sparse matrices for cooccurrence counts and association measures (poisson and pearson residuals)