Modeling the correlation structure of data that have multiple levels of association