Differences in trait–environment relationships: Implications for community weighted means tests

One of J.P. Grime's greatest achievements was demonstrating the importance of the relationship between the environment and plant functional traits for understanding community assembly processes and the effects of biodiversity on ecosystem functioning. A popular approach assessing trait–environment relationships is the community weighted means (CWMs) method, which evaluates changes in communities' average trait values along gradients, with Grime being among its first practitioners. Today the CWM method is well‐established but some scholars have criticized it for inflated Type I errors. That is, in some scenarios of compositional turnover along a gradient, CWM tests can provide significant results even for randomly generated traits. Null models have been proposed to correct for such effects by randomizing trait values across species (CWM‐sp). We review different approaches relating traits to the environment within the framework of the accepted dichotomy between species‐level (observations are species) versus community‐level (observations are community parameters) analyses. Between these families of analyses and their combinations, a great variety of methods exist that test different trait–environment relationships, each with different null hypotheses and ecological questions. In classic CWM tests, the null hypothesis focuses on characteristics of trait distributions at the community level along gradients. The Type I error rate should not be a priori considered inflated when this test is used to identify changes in community trait structure affecting the functioning of communities. Trait changes observed with CWM tests may be accurate, but the interpretation that a specific trait drives turnover may be fallacious. Approaches like CWM‐sp may be more appropriate for testing other ecological hypotheses, such as whether trait–environment relationships are widespread across species. In effect, this moves the ecological focus towards species‐level analyses, that is on the adaptive value of traits and their relation to species niches. Synthesis. There is no single trait–environment relationship. Species‐level and community‐level analyses, including variants within them, test different relationships with different null hypotheses, such that the potential for inflated error rates can be misleading. Using a spectrum of methods provides a comprehensive picture of the diversity of trait–environment relationships.


| INTRODUC TI ON
J.P. Grime made foundational contributions to multiple research areas in ecology, particularly inspiring legions of researchers in studying the relationship between environment and functional traits (Grime, 1974(Grime, , 2006)).Such a relationship underlies our understanding and predictions of species responses to environmental changes and community assembly, as well the consequences of these changes for ecosystem functionality.Since the explosion of trait-based studies, a variety of tests have been proposed to assess how traits relate to environmental gradients (de Bello et al., 2021).As a result, different types of relationships between traits and environment can be established, with corresponding methodological choices (Ackerly et al., 2002;Kleyer et al., 2012) and null hypotheses (Zelený, 2018).
In this study, we review the differences among the main families of approaches and their ecological implications.
A very popular and easy-to-apply approach is the one based on (i) calculating an average trait value for each of multiple communities (e.g.plots) along an environmental gradient, often weighted by species' relative proportions (and thus often referred to as 'community weighted mean', CWM), and (ii) relating CWM to the environmental conditions of the communities considered.J.P. Grime was actually one of the first, if not the first, to quantitatively relate traits to environment using CWMs (Grime, 1974), doing so by computing a weighted average of species' C-S-R scores (reflecting trait differences between species; Hodgson et al., 1999) across different habitat types.Earlier, Ostenfeld (1908) computed relative abundances of Raunkiaer life forms across different climatic regions, which actually corresponds to computing CWMs with categorical traits.
Several of these authors have demonstrated that, under some scenarios, the relationship between CWM and environmental variables can be significant, frequently, even for randomly generated trait values, qualifying this phenomenon as inflated Type I errors.As such, a significant relationship between CWM and environment can be, in some cases, observed for a trait, irrespective of its ecological relevance in causing species turnover (Figure 1).This would occur, mostly, under two scenarios, as summarized in Figure 1.First, when a few dominant species change their abundance along the considered gradient, their trait values will strongly determine the variation of CWMs (regardless whether the trait is causing such a change).
In general, the lower is the number of dominant species changing along the gradient, with all other species equally represented across the gradient, the higher chances is that any considered trait of these dominant species will cause a dependence of CWM on the gradient.This is particularly the case when the trait value of the species changing along the gradient is different from the trait for the remaining species.A second scenario occurs when there is some dependence of species composition on an environmental gradient and, at the same time, a very low compositional dissimilarity among the plots with similar environmental conditions.We call here this a scenario of 'structured communities' and it applies also to presence-absence data (i.e.where all species in a community have the same weight in computing CWM; Dray & Legendre, 2008;Hawkins et al., 2017).The 'repetition' of the same species composition can cause trait changes to be significant even with random trait values.The situation can be illustrated by a very simple example: in the case of having two plant species replacing each other along a gradient, with randomly assigned height but resulting in one species being smaller and taller, then the community mean (weighted or unweighted) for height (or any other randomly generated trait) will be significantly related to this environmental gradient.This then applies for groups of species (with random but different trait values) replacing each other along a gradient.If our sample is a random selection from the statistical universe, the environmental variable will correctly predict the community mean of this (randomly generated) trait.Notice that this prediction is not a mistake per se (as the trait is indeed varying), but the interpretation that the trait is the cause of the replacement is fallacious.The situation is considerably less important when a turnover along the considered gradient is observed in communities which share little or no species (i.e. when there is relatively high betadiversity among communities with similar values of the considered environmental gradient; Zelený, 2018).
Should we then trust a significant relationship between CWMs and the environment, or any trait-environment relationship, if it can be reached by random generated values?This is clearly a legitimate doubt, although the ecological question being asked should be clarified first.If we are interested in the adaptive value of traits along a given gradient, that is whether traits cause species turnover along such a gradient, we clearly cannot trust the classic CWM results.

Synthesis.
There is no single trait-environment relationship.Species-level and community-level analyses, including variants within them, test different relationships with different null hypotheses, such that the potential for inflated error rates can be misleading.Using a spectrum of methods provides a comprehensive picture of the diversity of trait-environment relationships.
adaptation, community assembly, environmental gradient, functional traits, null models, phylogeny, plant development and life-history traits, response and effect traits Several solutions using specific null models with CMW, or even better using other more specific methods, are possible (Peres-Neto et al., 2017;Pillar et al., 2009;ter Braak, 2019;Zelený, 2018; Table 1).
However, as we try to summarize in this review, this is not the only trait-environment relationship which researchers could be interested in and no such a thing exists as a single trait-environment relationship: different approaches test different ecological hypotheses, not necessarily the adaptive value of traits.
A clear example of this diversity is embedded into the assessment of the, so-called, 'response-effect' trait framework (Lavorel & Garnier, 2002).Several authors have focussed on how trait 'respond to' (i.e.vary along) environmental gradients (Violle et al., 2007).If this trait change causes also a shift in ecosystem functioning, than 'response' and 'effect' traits are associated, and given variations in environmental conditions should cause changes in ecosystem functions via traits.On the contrary other authors tend to define 'response traits' more narrowly, as those traits that cause a replacement of species along a gradient (i.e.traits that reflect adaptations of species to different environments; de Bello et al., 2005).Focusing on the connection between response and effect traits generally implies a broader definition of response traits, covering any trait changes observed along a gradient, irrespective of the effect of given species.Such broader definition of 'response traits' can, for example, be found in the pivotal paper by Violle et al. (2007) is that 'any trait the attribute of which varies in response to changes in environmental conditions' often interpreted in the context of changes in community trait structure (see fig. 1 in Violle et al., 2007) and ecosystem functioning.Such a broad definition includes both the adaptive value of traits across species but also any trait change that could affect the functioning of communities.
Recently, several authors (e.g.Peres-Neto et al., 2017;Zelený, 2018), recognized the idea that, in fact, different null hypotheses can be tested when relating traits (and CWM) to environmental gradients.Implying inflated Type I error rates for given methods could be misleading if the tests are used to answer appropriate null hypothesis (it becomes an error if the method is used to answer ecological question for which the methods is not suited).We thus review here different types of approaches to test trait-environmental relationships (Ackerly et al., 2002;Kleyer et al., 2012) particularly within the framework of the accepted dichotomy between species-level (observations are species) vs. community-level (observations are community parameters) analyses (Section 2) and their combinations (Section 3).Such a dichotomy generally corresponds to the concept of 'response traits' considered by either a narrower definition, corresponding to species-level analyses, and broader definition, as community-level analyses, see above.We clarify here both the ecological questions being asked, and the corresponding null hypotheses, when focusing on different trait-environment relationships (Table 1), specifically aiming to help ecologists to choose analytical approaches and interpret their results for their studies (Section 4).Overall, the main distinction is whether we are interested in the relationship between traits and environment for a majority of species (generally corresponding to the species-level analyses and a focus on the adaptive value of traits) or we focus on overall trait structure of the community, which is affected mainly by the dominants F I G U R E 1 Scenarios in which CWM based on random traits could results as significant along an environmental gradient (R material in Supporting Material show similar mathematical examples).Scenario (a) is an extreme example of a CWM change caused by only one species along a gradient (species 3, i.e. sp3), with no other species changing in abundance across plots along the gradient (sp1, sp2, sp4 and sp5).Any trait for which sp3 has will impact CWM.Scenario (b) reflects the case of frequently co-occurring species with overlapping species niches and plots with similar environmental conditions having similar composition (defined as 'structured' in the main text).

(a) (b)
(community-level analyses, central to the relationship between response and effect traits).

| D IFFERENT TR AIT-ENVIRONMENT REL ATI ON S HIPS: THE S PECIE S -VER SUS COMMUNIT Y-LE VEL DICHOTOMY
The existing literature clearly shows that there is not just a single trait-environment relationship (Kleyer et al., 2012;Šmilauer & Lepš, 2014, Chapter 9.2).Individual organisms are affected by their environment, and we assume that their success depends on how well their traits fit their (biotic and abiotic) environment (Grime, 2006;Shipley, 2010).How successful individual species are in their respective environment determines the composition of the communities.In plant communities, the competition from other species (modified by the abiotic environment) is also often very important determinant of individual species success (Švamberková & Lepš, 2020) and traits of subordinate species often reflect the ability to withstand the competition rather than only the response to abiotic conditions.The trait-environment relationship may then occur at different organizational levels, giving raise to a huge variety of questions, related methods and interpretations.
For example, a trait-environment relationship might be observed as changes in trait values within a species along a gradient, that is intraspecific trait variations caused by populations of the same species having different trait values in different environmental conditions (Clausen et al., 1948).On an environmental gradient, a species can change both its abundance and also its trait values.
On the community level, the trait-environment relationship could be caused by a mix of both intraspecific trait changes and changes in species composition, a replacement of species with different ecological preferences, and with different traits, along a gradient (Lepš et al., 2011;Siefert et al., 2015).For the context of the present review, we will mainly focus on the effect of trait related changes in species composition (and not on the intraspecific trait variability), which is also the centre of interest in Peres-Neto et al. (2017), Zelený (2018) or ter Braak (2019).
In the context of trait-environment relationships linked to species turnover, scholars have identified two distinct families of approaches to assess them, that is 'species-level' versus 'communitylevel' approaches (originally reviewed in Kleyer et al., 2012).
Although some methods are at the crossroad of these two families of approaches and/or elegantly combine them (Kleyer et al., 2012;Peres-Neto et al., 2017;Zelený, 2018), it is useful first to distinguish and understand the methodological and ecological basis of these two distinct families (Figure 2) and discuss the 'in-between' methods later on (called 'combined', Section 3 below and Table 1).Notice also, that these two families broadly correspond to the null hypotheses of Categories A and B suggested by Zelený (2018).Let us first consider these two approaches and their different ecological interpretations.
The species-level approach was very popular at the beginning of the century (de Bello et al., 2005;Díaz et al., 2001Díaz et al., , 2007;;Pakeman, 2004;Vesk & Westoby, 2004).With this approach researchers generally ask the question as to whether species' traits relate to species' preferences along a gradient or to a species' response to environmental change (i.e.following a narrower definition of 'response traits', described above).In other words, by this method, researchers ask whether species successful in some environments  1), yet varying their distribution along the studied gradient dry matter content in plants from dry habitats is higher than leaf dry matter content in wet habitats), or which trait is a good predictor of species response to experimental fertilization (Lepš, 1999).This approach also corresponds to species distribution modelling (is there a relationship between species' traits and their realized niche?) and predictions of future species composition.In the example above, if we expect that a given region will become drier, then we can predict that species with drought-related traits will be more frequent.The null hypothesis is that the species response to a natural gradient, or a gradient experimentally manipulated, is independent of its trait(s).
To apply the species level approach, and related ecological questions, we generally need to determine the distribution of multiple species along some gradient(s), often identified as the environmental condition in which a species grows best (its optimum-e.g.does a given species prefer dry or wet conditions?) or the response of species to experimental manipulation.Then we can relate species optima/responses with species traits, for example via a regression, without scaling up species trait data to the community level.In these analyses, each observation in the test is generally a species, hence the names 'species-level' analyses.Among the species-level analyses it is worth mentioning the so-called multilevel model approaches (ter Braak, 2019 and references therein).In these approaches, the abundance of each species across plots is modelled as a function of its trait(s), the environment and interaction of the two (note that to account for the proportional effect of more abundant species (using their relative abundance; Carmona et al., 2016).Grime's (1998) 'mass ratio hypothesis', for example, suggests that it is the TPD of effect traits that chiefly determines the community functioning at a given point in time.The general null hypothesis is that the withincommunity trait distribution (TPD) does not change along an environmental gradient.For CWM, the test implies generally computing one value for each trait in each of the communities considered.In CWM analyses, the observational units are individual communities, so the number of communities corresponds generally to the number of units (usually sites, plots etc.).For this reason, this type of analyses can be called 'community-level' analyses.
Whereas the distinction between community-and specieslevel analyses discussed here resembles, respectively, the distinction between the Category A and Category B hypotheses of Zelený (2018), the null hypotheses summarized in Table 1 are actually not identical.First, we understand that both species-and community-level analyses actually assume that there is some species turnover along the gradients studied, that is, that the species composition is dependent on the underlying gradients; without such a link, there would be no differences in species optima along Summary of the typical approaches in species-level and community-level analyses.The figure is loosely based on the original figures by Ackerly et al. (2002) and Vile et al. (2006).The ideal input data are when researchers have data of species composition of plots along a gradient and one trait measurement per plot (usually, however, a mean trait per species across all plots is used instead, thus, disregarding intraspecific trait variability along the gradient).See Section 2 for more details on species-level and community-level analyses and Section 3 for combined methods.
the gradient for species-level analyses nor can we expect changes in CWM.This assumption is usually tested, typically using methods of constrained ordination (e.g.RDA, CCA).Classical ordination analyses of species data might be extremely useful for subsequent interpretation (and can be generally used for calculation of 'species responses' or species optima; see below and Supporting Materials 2 and 3).
Second, and most important, the null hypothesis for the community-level analysis discussed here (Table 1) is explicitly based only on the variation of within-community trait distribution along gradients, whereas the corresponding null hypothesis for Category A in Zelený (2018) focuses on dependence of the matrices of traits and species abundance, that is, it assumes that species attributes are linked to species composition (similar to Dray & Legendre, 2008).One of the main messages of the present review, as we will further discuss below, is that we consider ecologically relevant to assess CWM variations along gradients even when the studied traits do not cause the replacement of the species over the studied gradient.
An important difference between species-and community-level analyses is that, generally, they consider different response variables ('Y') and predictors ('X'; Figure 2; see also Šmilauer & Lepš, 2014,  et al., 2005).Sometimes researchers use the species-level method in different ways, for example when first attributing species to functional groups (e.g. via dendrograms, creating groups of species with similar functional traits), and then testing if the average environmental preferences of species are different among functional groups (de Bello et al., 2021;Kleyer et al., 2012).It is sometimes also meaningful to relate traits not only to species optima, but also to the width of their realized niche (i.e. to species' ecological tolerances; Kermavnar et al., 2023), for example, to determine specialist or generalist species (Violle & Jiang, 2009).
We should also realize that each statistical method intends to make a statistical inference on a statistical 'universe' on the basis of a random sample.For community-based methods, we can consider the plots sampled to be a random sample from a certain area, which is our universe (and we should be aware that our statistical interference is valid just for this universe, which at the same time determines the pool of species involved).For the species-based methods, we also randomly sample plots, which determines which species are included but for the final interference, the universe is a set of species for which our species could be considered a random sample.It should be noticed that the definition of such an 'universe' is difficult, and so, we (somehow imprecisely) consider the universe to be the species pool of our study area.

| Issues with species-and community-level analyses
Researchers applying both species-and community-level analyses have realized that the variability explained (typically R 2 ) and significance of the two tests are almost certainly higher in communitylevel analyses compared to species-level ones (Ackerly et al., 2002).
This phenomenon is driven by both ecological issues (some anticipated above and further discussed in Section 4) and a number of technical issues, discussed in this section.In some scenarios, random trait values across species could be significantly related to the environment (Figure 1), leading some researchers to conclude that the tests with CWM have been too optimistic (qualified as Type I errors), they are artefacts with spurious results and are simply not a valid method (Miller et al., 2018;Peres-Neto et al., 2017;ter Braak, Peres-Neto, et al., 2018;Zelený, 2018).It is indeed risky to use CWM to assess a question for which it has not been designed.
Species-level analyses could suffer from similar issues.A case that it is worth mentioning is the scenario of a tight relationship between species trait values and species habitat preferences (i.e.realized niche).In this scenario it might frequently happen that any random environmental variable considered (i.e. even not associated to species habitat preferences) could result in a significant relationship between species traits and species responses along that random environmental variable (see, e.g. Figure 3C,D in Peres-Neto et al., 2017).This pattern can also be qualified as providing Type I errors, in the case we want to be certain that the environmental variable considered is the one causing species replacement.

| Using specific null models as a solution?
Specific methods have been suggested to correct for the potential Type I error rates mentioned above, in the search of the ideal method for understanding the 'real' relationship between traits and environment.Such developments, as we show in this study, generally resulted in a combination of species-and community-level methods ('combined' methods; Table 1), often adopting specific null-models (Table 1).For CWM-based analyses, null models suggested randomize species trait values, as proposed by Zelený (2018) and Zelený and Schaffers (2012), that is, CWM-sp.For species-level methods null models suggested randomize the environmental variable(s) across the communities considered (Zelený, 2018).Finally, the 'max test' (Cormont et al., 2011;Peres-Neto et al., 2017;discussed in Zelený, 2018) undertakes two independent permutation tests, one randomizing trait values in the community level approach and the other randomizing environmental variables for the species level method, and choosing the most conservative p-value as a result.
Some scholars have also proposed moving beyond CWM analyses and using other methods (Peres-Neto et al., 2017) although Zelený (2018) generally demonstrated that solutions converge with the null models proposed in combination with CWM (i.e.CWM-sp).
These methods include extensions of constrained ordinations, with predictors used for both the sites (environment) and for species (traits) as for example the popular fourth-corner method and modifications of it (Dray et al., 2014;Dray & Legendre, 2008;Legendre et al., 1997;Sîrbu et al., 2022;ter Braak, 2012;Zelený, 2018), or the double-constrained CCA (ter Braak, Šmilauer, et al., 2018).The fourth-corner method, for example have been shown to provide the test with strongest power in the case of single linear trait effects on species distribution (Peres-Neto et al., 2017; see also Section 4).
Interestingly, the CWM approach is numerically related to the seemingly different fourth-corner problem (Peres-Neto et al., 2017), with the specific null-models suggested for CWM also valid for this approach, as advanced above (Zelený, 2018).Overall, in between the species-and community-levels analyses a variety of methods can potentially be identified that combine them in a way or another (Brown et al., 2014;Miller et al., 2018;ter Braak, Peres-Neto, et al., 2018).

| The CWM-sp method: Towards species level analyses
Before dealing with the ecological interpretations of the different tests (Section 4) it is worth diving in the approach randomizing traits values that produce the CWM-sp method mentioned above, be- tained with this approach against the one using classic CWM tests and retain only the more conservative value as a reference, which in most cases will be the CWM-sp (ter Braak, Peres-Neto, et al., 2018;Zelený, 2018).
How do we interpret the results in the hypothetical cases described above, when, for example, tests at the community level are significant (using classic CWM test) but tests using CWM-sp are not?
What should we trust?As we discuss in this section, and partially anticipated by Zelený (2018), the reality is that each test is answering different ecological questions with different ecological conclusions.
As hypothesized by Zelený (2018; although not demonstrated), the CWM-sp approach is a combined approach that effectively moves the analyses towards a more species-level-based analysis (in particular their significance tests), as opposed to purely community-level analyses.More specifically the approach uses the tests statistics characterizing the community-level analyses (plots as observations) but a permutations scheme that corresponds to the species-level test.
We actually assess the potential convergence of CWM-sp with species-level analyses, using simple simulations (Figure 3 CWM-sp correspond, particularly small p-values, to that obtained with the typical species-level analyses described earlier on, and similarly, the p-value for the CWM-sp is rather close to the species-level analyses of the real data (Supporting Material 2).The results will likely depend on how species responses take into account species abundances in the whole dataset (Figure 3), an issue which we further discuss below (Section 4).Some authors (de Bello et al., 2013;Pillar et al., 2009) suggested to randomize environmental variables across plots to obtain a robust test of the relationship between CWMs and the environment (the approach equivalent to permutation tests in constrained ordination).If the assumptions of the parametric test are not violated, this approach provides very similar p-values to the classic parametric test (Figure S1.1).We also show in our simulations that, actually, the CWM-sp approach could be a slightly too conservative test (i.e. the number of significant relationships of a random traits with the environment is lower than 5%, in our case frequently around 3% or 4%).This could cause, actually, some issues with Type II errors (i.e.not detecting an existing change of trait values across multi species, even when present).This issue seems to be shared by some combined tests with permutations on both traits and environmental variables but, as shown by Peres-Neto et al. ( 2017) by simulations, if there is a linear relationship between traits and species optima, the fourth-corner methods provide the test with greatest power.
The parallelism between the CWM-sp and species-level analyses, both conceptual (Zelený, 2018) and mathematical (Figure 3), provides an interesting opportunity for interpreting ecological patterns and clarifying them when the test is actually needed.The null hypothesis corresponding to the permutation of species identities corresponds to the null hypothesis that species' ecological preferences are independent of species' traits.If significant, these tests can be generally interpreted as that there is an association between traits and ecological preferences for the majority of species considered.However, the p-values from CWM-sp and species-level analyses will not be always convergent (Figure 3) particularly because the CWM is mainly affected by dominants and trait-dominance structure which is changed by null-model permutations, much more than the estimation of species optima (or any other type of species responses).On species-level analyses we can further decide (based on ecological questions) whether the species optimum is where the species reaches its highest biomass, or the highest proportion of biomass in a community (corresponding to different ways in the calculation of species scores, as reflected in Figure 3).

| INTERPRE TING DIFFERENT TE S TS
In 2018, Miller and colleagues concluded that 'There is no overall best method for identifying trait-environment associations' (Miller et al., 2018).This is likely because there are different traitenvironment relationships, and different ecological questions we might be interested in.In the sections above we have seen how it is possible to establish different types of trait-environment relationships with different methodological and ecological implications.As ecologists we are interested in when to use specific methods, how to interpret the results obtained and to what extent we can trust such interpretations.We discuss these issues here.

| Traits as adaptation: Linking traits to species composition
Researchers are often interested in whether there is some indication that traits have some 'adaptive' effect, that is whether some values of the traits are advantageous under different environmental conditions (Westoby et al., 1995).Do certain trait values increase the chances of species of thriving in certain environments?This generally implies assessing traits linked to species distribution along gradients and showing a relationship between traits and environmental preferences, across several species.Clearly, for this task the ideal tools are species-level, including multi-level approaches which have proven to be robust (ter Braak, 2019).The CWM-sp and other combined methods can be also considered for this task (although in some cases they might be also slightly too conservative, see above), but not the classic CWM test.Several works have compared, mainly with simulations, the power of different tests (Miller et al., 2018;Peres-Neto et al., 2017;ter Braak, Peres-Neto, et al., 2018;Zelený, 2018).
Beside these findings, it is important to stress that these different tests offer different options, different ease of applications, some differences in the interpretations and, altogether, different drawbacks.
An important difference between methods is how multiple traits are taken into account.Very often, researchers have information on more than one trait and actually assume that species adaptive value could depend on a combination of traits.In CWM and CWM-sp analyses general linear models are built for individual traits (or synthetic representations of multiple traits, for example, when using CWM computed on species scores on a PCA axis built from multiple traits).
A similar test can be run simultaneously for multiple CWMs covering different traits using, for example, CWM-RDA analyses (Kleyer et al., 2012;Šmilauer & Lepš, 2014, Chapter 9.3; notice that the hypotheses related to CWM tests in Šmilauer & Lepš, 2014 have been better reformulated here in Table 1).In species-level analyses, multiple traits can be used as predictors, and then some sort of stepwise model reduction could be performed to select the traits that best explain species preferences.It is important to stress that, with classic species-level analyses, we can also take into account the fact that trait effects might not be additive.Very often, they are not, that is species might adapt to given environments by different strategies, sometimes called alternative designs (de Bello et al., 2005;Dias et al., 2020).For example, plant species might adapt to drought by being fast-growing annuals, profiting from pulses of water, or they might be long-living, slow-growing species like sclerophyllous shrubs or succulents (e.g.cacti).This can be taken into account in specieslevel analyses, for example, using regression/classification trees and considering traits interactions, a practical advantage of specieslevel analyses.Generally, considering these alternative designs, via trait interactions, improves predictions (de Bello et al., 2005;Pistón et al., 2019).
In this sense, the classic species-level analyses seem to offer a good platform for ease of interpretations, allowing to assess the combined (and non-additive) effect of multi-traits.The potential drawback, as we commented in Section 3.1, is the identification of the specific environmental drivers causing species to have different distribution in classic species-level analyses (i.e. if traits are associated to species distribution even random environmental variables could provide a significant test at the species-level; this drawback do not apply to multi-level models).This issue can be solved by applying null-models randomizing environmental variables before computing species preferences (and then test how strongly the R 2 with the observed data is greater than the ones obtained with randomizations).
However, we expect this additional test, while useful, might be also providing conservative results and, more importantly, it might not be always necessary.In fact, it is always important to test, a priori, which environmental variable (if any), among several potentially measured, is likely the one affecting changes in species composition using classic constrained multivariate methods such as RDA or CCA.These constrained multivariate tests, used to define species responses', are also generally done using permutations of environmental variables.As such they might provide already a sufficient test to ensure the interpretability of species-level analyses, without the necessity of additional null-models to test, again, whether the environmental variables drive species replacements.
As introduced in Section 3.3, combined methods, and mainly CWM-sp, generally should produce results converging to specieslevel analysis.However, in these tests the links between traits and both species' preferences and dominances are tested simultaneously.The null hypothesis corresponding to the permutation of species identities in, for example the CWM-sp, corresponds to the null hypothesis that species' ecological preferences are independent of species' traits.However, whereas this independence is a part of the null model, the random permutations also implies that the species' abundances (e.g.average or maximum over the plots, corresponding to h in the models of species distribution used by simulations by Peres-Neto et al., 2017, see below) are also independent of species' traits.Thus a species with vegetative height of 10 cm can, in the permuted data, reach the abundance of, for example, spruce (which is particularly strange if we use the biomass as characteristic).Similarly, the permutation of species' identities also means that under the null model, there are absolutely no assembly rules (e.g. two species, one 10 cm and the other a tree, might be co-dominants in a community).(link between traits and species preferences and the link between species and their potential dominance) or both, leaving uncertainty in interpretations.However, there are many ways in which the two links might be combined (e.g.plant height might affect both, species preference on a gradient and its ability to achieve high biomass, often in non-linear manner).Our preliminary simulations suggest that the case where the dependence of potential biomass on a trait decreases power of the test of the link of trait and gradient is considerably more frequent.
As such, the deviation between species-level and the combined methods, including CWM-sp, should depend on the abundance distribution of species and how this is treated in the analyses (as we also show in Figure 3).The importance of this effect can be understood from focusing on the simulations used by Dray and Legendre (2008) for testing of the fourth-corner method (a very similar approach but including more random variation, was also used by Peres-Neto et al., 2017).In particular, their parameter h j , which they call height (actually the height of the peak of the unimodal response curve for the jth species) is pivotal.The parameter defines the abundance (e.g. biomass or any other abundance measure) of species within a site, as In this formula, y ij is the abundance of species j at site i, x i is the environmental characteristics, and μ is the species optimum (which is in the simulations considered to be determined by a species trait value), and σ is the niche width.Note that in such simulation, the species optimum is simple linear function of the trait value.The more the values of h j differ among individual species, the higher are the differences among individual species effects on CWM values (the effect of species with low h j will be negligible) whereas h does not affect the species optimum and thus the species level analyses.Dray and Legendre (2008) used randomly generated values of h between 0.5 and 1 in the simulations (Peres-Neto et al., 2017 using similar model, used values between 0.3 and 1), that is rather small differences among species in comparison to real communities (usually covering several orders of magnitude across coexisting species, particularly if the weight is species biomass).
With low variation in values of h we might expect a great overlap between combined methods and species-level analyses.The greatest difference between methods should be also caused by mutual dependences between h and other parameters.Usually, the environment better determines the changes in few dominant species, with specific traits, while there are multiple strategies and trait combinations that allow subordinate species to survive in given environments (Dias et al., 2020) Also, in communities where the species composition is determined mainly by the competitive dominance, the dominants respond mainly to the environmental stressors, whereas subordinates could respond to both environment and the competitive effect of the dominants (Švamberková & Lepš, 2020).As such, h in many cases will be positively related with competitive abilities of species, and will affect which and how are the traits statistically linked to species environmental preferences.In most simulations, the species optimum is considered linear function of the species trait value (the optimum is used as a surrogate for trait value in Dray & Legendre, 2008), regardless of other characteristics.Formally (after some centring and standardization) we can write μ = k • τ, where k is constant, and τ is the trait value.If this is true (and with small variation in h), we will get just one trait-environment relationship and species and community level analyses will provide very similar information.
However, often (particularly in competition governed communities), the k is not a constant and species optimum is a (often non-linear and complicated) function of h and τ, that is μ = k(h, τ).If the (few) dominants are, for example very responsive, and the subordinates are not (or responding to the competition of dominant, typically with a different trait), then μ = k(h, τ) can be increasing with τ for high values of h, and be independent of τ for low h values, or maybe resulting a complicated function of traits interactions reflecting alternative designs.As illustrated in the Supporting Material 2, the dependence of altitudinal optimum of a species decreases with log of its potential height with R 2 = 0.799 for woody species (which we can consider potential dominant, albeit not all), whereas for herbaceous species with R 2 = 0.146 only.In these cases, both the results of combined methods and species-level analyses might provide rather different picture from CWM tests.The non-linear and complicated nature of μ = k (h, τ) is also (together with changes in species richness) cause of variation of functional diversity along the gradients (see Supporting Material 2).This also shows that one of the most important differences between the species and community level analyses is how the species dominance is accounted for.We should always think carefully what is the abundance measure (weight) for CWM which corresponds best to the aim of our study.Whether we use biomass, cover, their logarithm or presence/absence will considerably affect calculation of CWM, while the estimation of individual species optima would be affected much less.Thus, we do not see strong ecological reasons to use CWM for the presence absence data because CWM has been designed to reflect community functional properties associated with the relative abundance of species.
In species-level methods, the species optima (or other characteristics of the response) are calculated from species abundances but the abundances are compared within species (assuming that the higher abundance, the closer the species is to its optimum).
Consequently, in the analyses of dependence of species optima on traits, all species usually have the same weight.Let us consider a hypothetical species-level analysis in which we show that in dry habitats there are more species with trait values related to drought adaptations.Species-level analyses disregard whether this majority of species is dominant or not.Also, if we assess the species response to environment, the reliability of this estimate is dependent on species frequency (not on species potential to achieve high abundance); in particular, one cannot rely on estimates for species found in a very low number of units.Consequently, species with very low frequencies are sometimes omitted completely, or might be downweighed (Šmilauer & Lepš, 2014), which however always includes a subjective decision on the thresholds.ter Braak (2019) suggests weighting species by Hill numbers (Hill number for a species is analogical to Hill number for plot diversity, just calculated for transposed matrix-species equally represented in many plots will have the highest Hill numbers), to increase weight of species with reliable optima estimates.This would be appropriate for species found in low frequencies (which will have very low Hill numbers) but will give highest weight to ubiquitous species occurring almost everywhere (see examples in Supporting Material 2).
It is finally important to remind that significant results obtained by any analysis cannot be used directly to imply a causal relationship between traits and environment, and even less so the adaptive significance of the 'significant' trait (more on adaptive values of traits below).A trait can be found to be significant in species-level analyses simply because it correlates with the traits that really cause species replacement.Many traits are mutually correlated, and consequently, selection on one trait might cause the correlated trait to be a good predictor of species optima even for a trait with no adaptive value.Some important complementary information to traits, when defining the adaptive value of traits, is the phylogenetic relatedness between species.Almost 30 years ago, a vivid debate was initiated in the Journal of Ecology on whether the relationship of traits with the environment needed phylogenetically informed analyses, sometimes called phylogenetic correction (de Bello et al., 2015;Westoby et al., 1995).The debate originally focused on species-level analyses, but later was expanded to community-level analyses (de Bello et al., 2017), with the overall consensus that, rather than a correction, a combination of tests with and without phylogeny would provide insights at different scales on the differentiation between species.Tests without phylogeny tend to inform us on more ancient differentiations across clades.Evolution within clades, likely reflecting more recent adaptive value, is ideally assessed using phylogenetically informed analyses (or tests within clades and/or pairs of congeneric species from different environments).These tests therefore inform more on the potential role of traits in evolution within clades and are useful in the context of questions relating traits to adaptations.Species-level analyses seem to provide a straightforward platform to include phylogenetic information (see, e.g. de Bello et al., 2005), for example testing the relationship between traits and species preferences, after accounting for the effect of phylogenetic relatedness (e.g. using phylogenetic eigenvectors; Desdevises et al., 2003) Similar approaches could be considered in the double constrained CA (ter Braak, Šmilauer, et al., 2018) or multi-level models (ter Braak, 2019).

| Response and effect traits: Linking traits variations to ecosystem functioning
As mentioned earlier on, researchers might be interested in defining which traits vary along a gradient, irrespective of their potential adaptive values (Violle et al., 2007).Let us imagine a scenario in which the majority of species do not change along the gradient considered, or they do it very randomly, except the dominant species, which do change directionally along the gradient (assuming that dominant species represent a small proportion of species but account for a large proportion of, for example, biomass).This pattern corresponds to the case described by Peres-Neto et al. (2017) in which only one or few species change their abundance along the considered gradient.In this case, any considered trait value of these species will affect the variation of CWM values (Figure 1), if it differs from the mean of other species; using CWM tests would likely give a significant result (even for traits that do not cause the changes in species abundance) but not for species-level analyses, because the majority of species do not respond to the gradient.
Is the classic CWM test giving an error or optimistic results then?
Let us now imagine that we found a significant change of flower colour along a gradient of fertilization, with yellow flowers becoming more frequent in fertilized conditions.This effect could be caused only by one species, for example dandelions becoming more abundant with fertilization (an example already illustrated in Šmilauer & Lepš, 2014, p. 163).Clearly, flower colour is not the cause of the species becoming dominant, but it is responding to the gradient (i.e. the relative abundance of individuals with yellow flowers will clearly increase).This trait change might have important consequences, when we focus on traits potentially having an effect on species interactions, including other trophic levels, and several ecosystem properties (i.e.effect traits sensu Violle et al., 2007).For example, according to the Mass-Ratio Hypothesis (Grime, 1998) the strongest effect of biodiversity on ecosystem functioning is expected in terms of the traits of the dominant organisms.For example, more yellow flowers will probably attract more insects, which might have an effect on the whole food chain.If, instead of CWM for flower colour, we would use remote sensing methods to determine the colour spectra (Kothari & Schweiger, 2022) of a flowering community as response to soil fertility or fertilization, we will get a straightforward dependence of the colour on fertility and, possibly, a researcher would not consider the result to be too optimistic.As another example, abandoned, wet, eutrophized meadows in Central Europe are often dominated by the stinging nettle (Urtica dioica).The prediction that in wet, unmown and nitrogen-rich conditions the CWM for the plants with stinging trichomes is high is valuable in itself, regardless of whether it is formed by a single dominant and not many species (particularly for a person walking in his/her shorts, or for some grazer species).Whereas nobody would be tempted to deduce that stinging trichomes have adaptive values for wet fertile conditions (or yellow flowers for fertilization), we should keep this example in mind when carrying out similar analyses with traits with presumably adaptive value.Accordingly, when Lepš (1999) demonstrated the adaptive significance of plant height for response to fertilization (because release from nutrient limitations increases competition for light), he used the species-based method: the taller is the species, the more positive was its response to fertilization (after demonstrating statistically that fertilization is the important determinant of species change in the experiment).The use of community based method, that is demonstrating differential response of CWM for height in fertilized and unfertilized plots would not be appropriate.Similarly, if multiple CWMs are used as responses in a multivariate method (e.g.RDA analyses, CWM-RDA in Kleyer et al., 2012), we should not deduce that the most responsive traits have an adaptive significance (in this sense, we correct here the formulation from Šmilauer & Lepš, 2014, Chapter 9.3, p. 158, claiming that the null model assumes, '…no change in species composition … caused by the traits of species…'.The phrase 'caused by the traits of species' is misleading and should be removed).
As a consequence, in the search of the connections between response and effect traits, the classic CWM tests are essential.In the examples above, an observed relationship of CWM with a gradient is, in fact, rather realistic, not optimistic nor pessimistic.Talking about Type I error rates, or inflation rates, as connected to classic CWM tests, in absolute terms can be therefore misleading.The fact that yellow flower colour is related to the environment is not an error per se; the interpretation that it causes the turnover is the error.Our statistical universe is an area from which we have taken our random sample, and our conclusions are valid just for this universe.One of its important characteristics is its species pool.Consequently, the increase of the yellow flower proportion with fertilization applies to the plots where the species pool contains a potentially dominant species (i.e.species with high h, as defined for simulation in Section 4.1) with yellow flower which responds positively to fertilization.Note, that if we apply any of the corrections proposed to avoid Type I errors (e.g.CWM-sp) we will not observe a significant relationship between, for example, flower colour and the gradient anymore (although it is effectively there).As a matter of fact, if the null hypothesis tested is the independence of community trait composition on the environmental gradient, we will commit a Type II error.It might look like that, by applying such corrections, we can effectively exclude traits that do not cause the dominant replacement (i.e.exclude traits without adaptive values).The problem is, in fact, that we can also exclude traits that do cause such a replacement if they cause this only across few dominant species.

| CON CLUS IONS
The set of ideas discussed so far broadly suggests that using both species-and community-level analyses can be useful to give a broad spectrum of interpretations.Specifically, separate tests using classic species-and community-level analyses allow testing independent and clear null hypotheses, with straightforward ecological interpretations, and proven ease of use.Although it is usually useful to compare different analyses, the basic decision is what is the ecological question of interest (and the underlying ecological hypothesis we want to test).Classic species-level analyses are very flexible tools to tests traits' adaptive value, allowing step by step procedures which can accommodate different experimental designs, include trait interactions and phylogenetic information, or focus on niche breadth instead of niche optima alone.However, for species based method, we should be aware that, in the case of structured communities, random environmental variables might be significant.This problem might be simply solved by first testing environmental variables when defining species responses, or with more elaborated permutations a-posteriori.A good complement of this analyses is the classic CWM tests, as it provides key information about TPD variations along gradients and the potential link between response and effect traits.
Results of community-level analyses (CWM) are not an indication of traits being adaptive; still, they show that species with certain trait values prevail under certain environmental conditions and are therefore essential tests for the search of traits within the responseeffect framework, so central to the field of functional ecology.
Although combined methods are certainly mathematically elegant, and in some cases they do provide a test with greater power (especially in the case of linear relationship between traits and environment; Peres-Neto et al., 2017), in our view they do not always reflect the idea that, ecologically, we ask different ecological questions and test different hypotheses on species and community levels.Some reviewers might be tempted to demand both tests using CWM and CWM-sp analyses.Although both results could be informative they do respond to different questions.As such we rather suggest that, for ease of interpretation and their flexibility, species-level analyses could be preferred over CWM-sp ones for assessing the adaptive value of traits.
Species-level analyses, and the combined methods do provide the stronger indication that the trait could have an adaptive value (particularly when taking into account phylogeny) than the community level analyses.However, even here, we cannot disregard the possibility that the trait being investigated only correlates with underlying functional trait.So statistically, it might be very difficult to decide which of them, if any, is Maybe neither of the two is actually a 'causal' trait (Hodgson et al., 1999).The analyses thus provide mostly correlational evidence.If we want to infer causality, we have to rely on external evidence rather than to believe that more sophisticated statistics might completely filter out possible confounding effects.From the trait-environment relationships, we can get indications of which traits might have adaptive significance, but these should be further tested by different methods; typically, we should rely on ecophysiological evidence (Májeková et al., 2021).Furthermore, patterns that appear in areas with different species pools are more likely to reflect causality.In other words, for all methods, it is important to stress that concordant results in different regions of the world, with different species pools but similar environmental gradients, should suggest greater causality.For example, very probably, the decrease of woody species with altitude (Supporting Material 2) will be observed in environments with a mean seasonal temperature about 7°C (Körner & Paulsen, 2004).
Under these conditions, we will very likely find a decreased CWM in plant height regardless of the region, and thus, regardless of the species pool.On the contrary, the change in CWM of traits without any adaptive value (as for example in Figure 1) would probably be rather idiosyncratic, depending on the species pool in the investigated area.
In this sense, it is important to stress that consistent results in CWM response in areas with different species pools, for example via metaanalyses, is a good indication of (but not proof of) a causal relationship; they indicate, though, which traits enable species to become dominant rather than to survive albeit with low abundance.Data from a single area, with a given species pool, do not provide sufficient information to estimate which traits are adaptive so that they enable species to become a dominant under certain environmental conditions (very limited number of species from single species pool can become dominant under certain environmental conditions, problem of 'low n').A potential problem with this approach is that different species pools around the globe might not really be independent, phylogenetically at least.For example, Gymnosperms are often the woody species around tree lines.Similarly, if we are interested in adaptations to drought, the three common functional groups in deserts are ephemeroid annuals (frequently Brasicaceae), geophytes (often Asparagales) and succulents (Cactaceae in the New World, often Euphorbiaceae or Mesembryanthemaceae in the Old World).Nonetheless, a significant trait-environment relationship across similar regions can be clearly indicative of ecological processes in species sorting along gradients.
just the interaction reflects what ecologists use to call the assessed trait-environment relationship; ter Braak, 2019).The model includes two random factors-plots and species-which reflect the withinsite and within-species dependences of the response variable.Another set of ecological questions we might want to ask is what trait values are more abundant in given ecological conditions, generally focusing on the connection between 'response traits', defined in a broader sense and effect traits.We might reformulate the question as how trait distribution in a community (sometimes called Trait Probability Distribution, TPD; Carmona et al., 2016) changes along a gradient, irrespective of whether a trait community structure is caused by few or multiple species.In its simplified form, TPD can be characterized by two moments-the central tendency (mean) and spread (variance).In ecological terms, the CWM characterizes the central tendency, that is the prevailing trait value, and functional diversity (FD), characterizing the spread of trait values, and it is often expressed by indices related to variance (de Bello et al., 2016).The question of how trait distribution within a community is determined by given ecological conditions can be generally assessed using both CWM and FD values.Both CWM and FD tend to be weighted by abundance to reflect trait distribution at the community level (TPD)

Figures 9 -
Figures 9-1 and 9-2).In community-level analyses, the response variables are characteristics of within-community trait distribution, typically CWM values, one per trait and each plot considered, and the predictors are environmental gradients (i.e.does CWM change along a gradient?).With species-level analyses generally, although not always(Ackerly et al., 2002), species ecological preference is used as the response variable and single or multiple traits are used as predictors (i.e. can traits predict species preferences?de Bello cause of its relevance and implications.With the CWM-sp approach, the suggestion is to (a) calculate the observed R 2 in a relationship between CWMs and environment (using CWMs computed with one trait for several plots along the gradient), (b) calculate R 2 of the same relationship after randomizing trait values across species (randomized R 2 -do it multiple times); notice that the null model corresponds to shuffling species identities in either the plot composition matrix or the species trait matrix(Götzenberger et al., 2016); and finally (c) compare the observed R 2 with the randomized R 2 values (the proportion of the randomized values being bigger than the observed one provides the new p-value in the relationship between CWM and environment).It is sometimes suggested to compare the p-value ob- ; Supporting Material 1 for details).Notice that in the simulations species scores are computed on environmental variable causing species turnover, so this effectively corresponds to the ideal species-level analyses in which we are sure it is the cause of species replacements.In these simulations, as other existing(Dray & Legendre, 2008;Peres-Neto et al., 2017), we built in a linear dependence of species optima on the value of a trait, which might be an unrealistic simplification (see Section 4.1).In our simulations, the p-values obtained by using F I G U R E 3 Correspondence between species-level analyses with the CWM-sp (an approach using randomizations of trait values across species).The results show the p-values obtained with the CWM-sp and species-level methods, over 100 simulations and computing species optima along a gradient with different multi-variate approaches (RDA based on species covariance, based on species correlations and CCA; correlations are R = 0.97, R = 0.78 and R = 0.74, respectively, with particular convergence in lower p-values).See Supporting Material 1 for the R script.
This situation might lead to a change in the distribution of simulated values, e.g. it might cause much wider range of possible values of CWM than in reality, which in turn might cause more extreme values in the distribution of the test statistics under the null model, which would probably decrease the power of the test.Another potential issue is the case in which the test would provide a significant result.This might be caused by the existence of either of the two links