Using multi-membership models to account for contribution of species in community level properties

(I am using brms below but my question is conceptual)

I was unaware of multi-membership models until I read this a couple of days ago and then the relevant brms documentation.

As an ecologist, I wonder if multi-membership terms could be used to account for compositional similarities between different communities, assigning “membership” of a community to each of the species that comprise it. Individual species can have an idiosyncratic influence on community-level properties and I think mm terms may be used to account for this.

Here is an example (common biodiversity ecosystem functioning experimental design) where I think this would make sense:
Ray et al., 2023 were interested, among other things, in the relationship between tree species richness and structural complexity (of the stand). They examined this in experimental plots that contained 140 trees each, from one, two or four out of 10 potential deciduous tree species. They…

…used linear mixed-effect models to assess the impact of tree species richness (numeric variable), mycorrhizal associations (categorical, three levels: AM, EM, and AM + EM), and their interacting effect on stand structural complexity (SSCI, continuous variable). Tree species composition of the plots was used as a random effect to avoid confounding effects between tree species richness and compositional differences in tree species among communities.

I wonder if a reasonable alternative to their approach would be to fit a model of the form:

SSCI ~ log2_richness*Mycorrhizal_type + (1|mm(sp1,sp2,sp3,sp4))

sp1-sp4 are here dummy coding for the 1-4 out of 10 species that can comprise each tree community:

   plot sp1   sp2   sp3   sp4  
  <dbl> <chr> <chr> <chr> <chr>
1     1 7     10    7     10   
2     2 5     5     5     5    
3     3 6     9     6     9    
4     4 8     8     8     8    
5     5 3     8     3     8    
6     6 1     2     6     9    
7     7 3     4     8     10   

Individual species will have an idiosyncratic influence on the response, so I think this would account for the non-independence of plots/communities, given that they share species.

I have a follow-up technical question about the use of mmc but I will probably ask that in a separate topic. Right now, I mainly want to know if you think this would be a reasonable use case for multi-membership modeling.

Here is a gist with this example.

I wonder if multi-membership terms could be used to account for compositional similarities between different communities, assigning “membership” of a community to each of the species that comprise it. Individual species can have an idiosyncratic influence on community-level properties and I think mm terms may be used to account for this.

Yes, I think you can do this, but I think you’re assuming that there is no overyielding/non-additivity in the community. The model will decompose the effects of each species additively. I don’t think brms has support for more complicated interactions between multimembership terms (e.g., here).

My half-baked work-around idea is to measure the non-additivity with the tree species composition of the plots as an additional random intercept (... + (1 | composition)). Some care would need to be taken to ensure that plots with, say, species 7 10 7 10 is coded the same way as 10 7 10 7. If I’m thinking about it correctly, the multimembership term would allow for partial pooling of information across plots to measure the additive contribution that each species makes to the ecosystem function response. I think this may only work for experimental designs where each community composition is well-replicated.

Alternatively, random slopes for the multimembership group might be a way to explore mechanisms underlying the differences in species contributions. Here, a lot of care and domain knowledge would be important to ensure the causal map would allow for the inference.

Hello @wpetry, thank you for your reply!

I’ve been chewing on it since yesterday but I remain confused :/
Could you help me understand why allowing the intercept to vary by composition would account for non-additivity? I guess this goes back to my original confusion; the authors in the paper I cited are indeed doing that (see quote), without the multi-membership thing. Guessing on what that was intended to accomplish, I thought that using a multi-membership term instead would make sense. But your suggestion to do both indicates that I may have things mixed up.

In my experience, non-additivity in this setting would be quantified by the ratio of the response in the multispecies community over the average response of the monocultures of the constituent species. And this would be a question (and analysis) distinct from examining the overall effect of richness on the response.

I think the model for the original paper is:
SSCI ~ log2_richness*Mycorrhizal_type + (1|Species.composition_code)

Your proposed model is:

The two models will partition the total variance similarly, but with a key difference. In the original model, (1|composition) captures plot differences from what we’d expect based on the richness and mycorrhizal type of the plot. In the BEF framing, this will be the sum of the selection and complementarity effects. But the model doesn’t know about these. To it, composition is just a categorical label that applies to a group of plots rather than implying a deeper structure (i.e., calling a mixture sp1_sp3_sp4 is no different than calling it mixtureB or any other label). The standard practice would be to partition the BEF components in a follow-up analysis.

In your multi-membership model, (1|mm(sp1,sp2,sp3,sp4)) will additively partition plot deviations from the richness x mycorrhizal expectation into contributions from the species that make up the community in that plot. If selection effects are entirely responsible for the deviations, your model will do a good job fitting the data. But if there is any complementarity, it’s going to end up either biasing your estimates of the species’ additive contributions or in the residual variance of the model.

I’m proposing SSCI ~ log2_richness * Mycorrhizal_type + (1|mm(sp1,sp2,sp3,sp4)) + (1|Species.composition_code). The multi-membership intercepts will do the additive partitioning in a way that nicely maps onto selection effects in the BEF framework. The composition intercepts will capture the deviation from the expected value that can’t be explained by the additive contributions of the species that are present in the plot. That’s the non-additive effect of complementarity. Using your example, the model becomes:

m2 = brm(
  bf(
    SSCI ~ log2_richness*Mycorrhizal_type + (1|mm(sp1,sp2,sp3,sp4, 
                                                  # weights are now redundant, 
                                                  # could be used to reflect tree mortality
                                                  weights = cbind(w1, w2, w3, w4))) +
                                            (1 | Species.composition_code)
  ),
  backend = "cmdstanr",
  chains = 4,
  iter = 4000,
  warmup = 2000,
  thin = 1,
  control = list(adapt_delta = 0.95),
  cores = 4,
  data.mm
)

When I fit m2, there’s evidence for variation associated with both the multi-membership and composition terms:

...
Multilevel Hyperparameters:
~mmsp1sp2sp3sp4 (Number of levels: 10) 
              Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sd(Intercept)     1.44      0.44     0.82     2.51 1.00     2770     4198

~Species.composition_code (Number of levels: 60) 
              Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
sd(Intercept)     0.58      0.09     0.40     0.76 1.00     1441     1737
...

There’s potentially ways to model the mechanism by adding random slopes to these terms. For example, if mycorrhizal type causes some species to grow differently, we might expect that will change their additive contribution to the plot-level measure. Random slopes would let you measure this: (1 + Mycorrhizal_type | (mm(sp1,sp2,sp3,sp4) + (1 + Mycorrhizal_type | Species.composition_code).

I don’t know of any papers that have used multi-membership models to analyze BEF experiments. I’m fairly new to BEF, but have been exploring multi-membership models in the context of other community ecology topics. I’d be happy to chat more if you’d like. There might be an opportunity here to compare classic BEF partitioning methods to a more direct modeling of these two components. There might be some advantages in understanding the structure of the uncertainty when using a one-step modeling approach over the classic two-step approach. The literature on instrumental variable models might be a good starting place to think about the merits of a one-step method. There may also be some partial pooling of the selection and complementarity effect estimates that might help avoid overfitting, but I’d need to think more about whether that’s an issue in the two-step approach.

Edit: Add partial pooling idea, fix typo, update model term labels to match dataset

2 Likes

Thank you @wpetry, this was very clear and really insightful.

I have updated the gist to add a model comparison; at least with this example, your proposed model outperforms both the model in the paper and my multi-membership only model.

I guess not in this particular setting, where some tree species only associate with AM and others with EM fungi. But generally I get your point.

Actually, I am fairly confident that multi-membership has not been used this way in a BEF context. And yes, incorporating the selection/complementarity estimation into the same model is very intriguing.

You took my shower idea and turned it into something promising :D

Nice!

Yep, good point. Likely there’s another BEF dataset where the species will grow under multiple conditions (e.g., soil types or a management practice) that are hypothesized to matter for their performance and potential for complementarity.

One caveat (opportunity?) of the one-step partition is that the monocultures can have a non-zero intercept for Species.composition_code. On one hand, this doesn’t make sense that a species can have a complementarity effect on itself. On the other hand, I don’t think it’s biologically unreasonable to have a non-additive effect of crowding. For example, an individual plant growing in a monoculture plot could be more apparent to herbivores than if that individual had been growing alone. In short, maybe it’s too simplistic to always assume that the effect of each individual on an ecosystem function measure in monoculture is strictly additive.

It’d be fun to talk more about these ideas with you if you’re interested. My website with my contact info is linked in my profile.