A major strength of DI models is the ability to predict the response
for any combination of the species proportions, including those not
present in the experimental design. This allows for the prediction and
visualisation of the response surface across the entire simplex space.
However, visualising the response surface for systems with more than
four species is challenging as higher dimensional (over four dimensions)
simplexes cannot be visualised directly. To address these,
DImodelsVis offers two strategies for visualising the
response surface in such cases using ternary plots: (1) Conditional
ternary diagrams, where selected species are conditioned at fixed
proportions and the response surface is visualised as 2d slices of the
higher dimensional simplex and (2) Grouped ternary diagrams, where
species are grouped (or aggregated) into functional groups to reduce
dimensionality, enabling the response surface to be visualised in a
simplified, lower-dimensional space.
Conditional ternary diagrams
Conditional ternary diagrams are 2d slices of higher dimensional
simplexes. To create conditional ternary diagrams for a system with
\(s\) species, \(s-3\) species are conditioned to have fixed
values while the remaining three species are allowed to have any value
whilst respecting the sum-to-one constraint on the species proportions.
This allows the response surface to be visualised within a ternary plot
for those three species. By viewing multiple such slices each showing a
different set of species shown in the ternary and with different fixed
values for the remaining species we can gain an approximate
understanding of how the predicted response behaves across the full,
higher-dimensional compositional space.
The conditional_ternary() function in
DImodelsVis accepts a model object fitted using the
DImodels (or DImodelsMulti) package and
generates conditional ternary diagrams with the response surface
depicted as a contour map. Users must specify names of the three species
to be visualised in the tern_vars parameter. The names and
values for the species to be held constant should be specified in the
conditional parameter as a data-frame and a separate
ternary would be created for each row within this data-frame. In this
example, species p1, p2, and p3 are allowed to vary while p4 is held
constant at values of 0, 0.25 and 0.5. Furthermore, values for any
additional variables in the model (i.e., nitrogen in this case) can be
specified within the add_var parameter. Here, we use it to
create ternaries for the \(nitrogen =
150\) level. Finally, any additional parameters shown below are
optional arguments specified to enhance aesthetics of the final
plot.
# Conditional ternary
conditional_ternary(AVModel, tern_vars = c("p1", "p2", "p3"),
conditional = data.frame("p4" = c(0, 0.25, 0.5)),
add_var = list("nitrogen" = factor("150", levels = c("50", "150"))),
lower_lim = 8, upper_lim = 18, nlevels = 10)

Across all three ternaries, the predicted response is maximised by
having high proportions of p3. In the absence of p4, (i.e., \(p4 = 0\); left ternary), the optimal
mixture contains some proportion of p1 and p2 along with p3. However, as
the proportion of p4 increases (middle and right ternaries), optimal
performance is achieved through mixtures of p3 and p4 alone, with little
to no contribution from p1 or p2. Notably, the contour lines are
symmetric about the p1–p2 axis across all ternaries, suggesting that p1
and p2 contribute similarly to the predicted response and can be
substituted for one another without substantially altering
performance.
Grouped ternary diagrams
Grouped ternary diagrams are created by aggregating multiple species
into functional groups (FG) and visualising the response surface as a
contour map in a ternary diagram where some, or all the axes represent
the total functional group proportion, instead of the individual species
proportion. The total functional group proportion at each point across
the ternary can be split between the species contained within the group,
either equally or in a specific ratio (for example, if an FG contains
two species, the proportion along each point in the ternary could either
be split 1:1 between the two or 4:1 in favour of the first species).
Graphically, this process generates 2d slices of the higher dimensional
simplex. By adjusting the ratios in which the total FG proportion is
divided among the component species, slices across different regions of
the simplex can be generated.
The grouped_ternary() function in
DImodelsVis accepts a model object fitted using the
DImodels (or DImodelsMulti) package and
generates grouped ternary diagrams with the response surface depicted as
a contour map. Users must specify the functional group each species
belongs to as a character vector via the FG parameter. In
this example, the two grasses (p1 and p2) are grouped together and
labelled as the functional group “G”, while the two legumes (p3 and p4)
are shown individually along the ternary axes in the figure. By default,
the total FG proportion would be split equally between the component
species within each FG, i.e., the total grass proportion is split
equally between the two grasses. However, this split can be set manually
by using the values parameter. Furthermore, values for any
additional variables in the model (nitrogen in this case) can be
specified within the add_var parameter and separate sets of
ternaries would be created for each value specified here. Finally, any
additional parameters shown below are optional arguments specified to
enhance aesthetics of the final plot.
# Grouped ternary
grouped_ternary(AVModel, FG = c("G", "G", "p3", "p4"),
add_var = list("nitrogen" = factor("150", levels = c("50", "150"))),
lower_lim = 8, upper_lim = 18, nlevels = 10)

The predicted response is higher within the interior of the ternary
and declines as we move towards either of the vertices (i.e.,
monocultures of p3 and p4 or binary mixture containing only grasses).
The best performing mixture contains about 12% grasses (i.e., 6% each of
p1 and p2), 57% p3 and 31% p4. However, the response is rather
consistent across a broad region of the ternary around this point,
suggesting flexibility in selecting an optimal combination.