So I have this dataset where I have species community data from a variety of sites. I’m trying to explain what are the factors that drive the variation in these data. For each site, I have a geographic location, as well as several environmental variables. What I’ve been trying to do is partition the amount of variation in the community data that is explained by both distance between sites, as well as the environmental data.
All of my analyses thus far have been using the ‘vegan’ package. So far I’ve run an adonis, plugging the environmental factors in show their contribution. I’ve also run a Mantel test to correlate distance between sites with the Bray-Curtis distance in community composition. However, what I want is an analysis that can simultaneously look at both geographic distance with the environmental variables.
What I’d like ideally is something like the ‘varpart’ function in vegan. In that, you can put in two separate models, and it will spit out the variation explained by each model, as well as the shared variation explained by both models. However, unfortunately that does not work with my dataset. While I can put my environmental variables into the varpart function, it does not allow me to put in the distance matrix representing the geographic distances between sites. It only accepts vector data.
Does anyone have any ideas how might get around this, or an alternate analysis?