I aim to investigate how the relative abundance of species across communities is associated with functional traits of each species. For each location ($>250$), I have compositional data that represents the relative abundances of various species, with the sum amounting to $100 \%$ for each location. I also have the values of three functional traits for each combination of location and species.
The challenge is in addressing the analysis given the compositional nature of the relative abundance data (where proportions are not independent). If I understood well, the methods I've encountered so far treat compositional data in aggregate (for example, modeling the entire composition of the community with some explanatory variables; e.g. book Analyzing Compositional Data with R), without allowing for modeling the relative abundance of each individual species in relation to its traits.
If my data were not compositional, my model might look something like this if using a mixed model in R with glmmTMB
:
Prop.Abundance ~ Trait1 + Trait2 + Trait3 + (1|Species), family= beta
I had considered modeling the relative richness with the three traits as fixed effects, while treating species as a random effect to account for repeated measures. However, I am hesitant to include location as a random effect since it might regularize the values across species for the same community, which I believe does not make biological sense.
The dataset would consist of six variables: Location, Species, Relative Abundance, Trait1, Trait2, and Trait3. The number of observations would equal the sum of the number of species across locations. Note that not all species are always present (resulting in unbalanced data).
Could anyone provide guidance on how to approach this type of analysis, preferably using R?