Interpreting model coefficients
With the full pairwise model was selected as best, we can now
interpret the parameters!
summary(FULLModel)$coefficients
## Estimate Std. Error t value Pr(>|t|)
## Sp1_ID 5.082510 0.3038232 16.728512 1.152043e-24
## Sp2_ID 3.205813 0.3038232 10.551574 1.798994e-15
## `Sp1:Sp2` 10.960824 1.2659300 8.658318 2.874219e-12
## Treatmenthigh 6.074773 0.2236078 27.167086 3.876526e-36
The ID effects (\(\hat{\beta_1} =
5.08\) and \(\hat{\beta_2} =
3.21\)) are the predicted monoculture performances of species
\(Sp_1\) and \(Sp_2\), with \(Sp_1\) being the best monoculture as 5.08
> 3.21. In mixture, the combination of weighted identity effects
estimates and the interaction estimate scaled by the product of the
proportions determine the predicted ecosystem function. Here, the
species interaction parameter is significant and positive (\(\hat{\delta}_{12} =10.96\), p \(<0.001\)) implying that the species have
a synergistic relationship.
The parameter estimate, \(\hat{\alpha}_1\) represents the low level
of the treatment and is set to 0, while \(\hat{\alpha}_2\) represents the high level
of the treatment. The treatment effect (\(\hat{\alpha}_2 = 6.07\)) being significant
(p < 0.001) implies a difference between the low and high levels of
the treatment.
Prediction and inference
To determine which combinations of species proportions give the best
predicted ecosystem function, we can predict from the model for a range
of communities. For example, predicting the performance of the
monoculture of species \(Sp_1\) under
the ‘low’ treatment gives:
\[\large \hat{y} = 5.08*1 + 3.21*0 +
10.96*1*0 = 5.08\]
While predicting for a \(50:50\)
mixture under the ‘low’ treatment gives:
\[\large \hat{y} = 5.08*0.5 + 3.21*0.5 +
10.96*0.5*0.5 = 6.885\]
We can use the predict() function to
automatically generate these predictions in R and also use the contrasts_DI() function to formally test between
different communities.
# Store communites of interest in data frame
my_communities <- as.data.frame(matrix(c(1, 0,
0.5, 0.5),
nrow = 2, byrow = T))
my_communities$Treatment <- c("low", "low")
colnames(my_communities) <- c("Sp1", "Sp2", "Treatment")
# Make prediction
# (Don't need to add interaction terms, the predict function will calculate those)
predict(FULLModel, newdata = my_communities)
## [1] 5.082510 6.884367
# Communities for comparison
mono_1 <- c(1, 0, 0, 0) # Species 1 monoculture at treatment 1
two_mix <- c(0.5, 0.5, 0.25, 0) # 50:50 mix of two species at treatment 1
# Contrast between the two species
contr <- contrasts_DI(FULLModel, contrast = two_mix - mono_1,
alternative = "greater")
## Generated contrast matrix:
## Sp1_ID Sp2_ID `Sp1:Sp2` Treatmenthigh
## Test 1 -0.5 0.5 0.25 0
summary(contr)
##
## Simultaneous Tests for General Linear Hypotheses
##
## Fit: glm(formula = new_fmla, family = family, data = new_data)
##
## Linear Hypotheses:
## Estimate Std. Error z value Pr(>z)
## Test 1 <= 0 1.8019 0.3625 4.971 3.34e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## (Adjusted p values reported -- single-step method)
These results show that the 50:50 mixture of \(Sp_1\) and \(Sp_2\) performs significantly better (at
the \(\alpha = 0.05\) level) than the
\(Sp_1\) monoculture.
Visualising results
We can visualise the predictions for various communities in the
experiment and split the ecosystem function into the contribution of
species identities and their interactions.

A major advantage of DI models is that besides predicting for
communities within the experiment, we can predict across the entire
gradient of species proportions within the simplex. This can help to
identify the best performing community for a particular response.

Here we can see the response for all possible two species communities
split into the contribution of the identity effects of the two species
and their interaction. This is useful to see the variation in the
response as the proportion of 1 species increases or decreases. We can
also identify the ‘best’ performing community (the highest point of the
curve, highlighted in the figure: a 60:40 mix of species 1 and 2).
To see further details for how best to show off your model
results in a plot/graph, see
Visualising
DI Models.