In community ecology, building model is often a complex task for a few reasons. First, the multivariate nature of community data is technically challenging to handle, resulting in difficulties in making inferences and predictions. Also, obtaining reliable inferences when constructing species-specific models is a difficult task because most species in a community are rare. Lastly, to better understand the complexity of nature, ecologists are using an increasing diversity of data (e.g. habitat characteristics or species traits); linking these different data types in an ecologically meaningful way require technical developments beyond that of traditional statistics. In this presentation, I will present a flexible and comprehensive statistical framework that can be used to model species association by estimating the positive and negative correlations among species within a specious community and that also accounts for species traits and habitat characteristics (both as fixed and random effects). Through this framework it is also possible to make species- and community-level predictions. This framework relies on a Bayesian hierarchical modelling. I will illustrate the potential of this modelling approach by applying it to fisheries stock data gathered from 1950 to 2010 in the Gulf of Alaska Large Marine Ecosystem, where for each species traits information were gathered with FishBase and SeaLifeBase. As this is a 60 years time series, I will use asymmetric eigenvector maps (an eigenfunction-based method developed to model the effect of directional processes) to account for temporal autocorrelation. With these data, I will show how this statistical framework can be used to approach different ecological questions on marine harvesting in a community ecology context.