Disruption of trait-environment relationships in African megafauna occurred in the middle Pleistocene

Mammalian megafauna have been critical to the functioning of Earth’s biosphere for millions of years. However, since the Plio-Pleistocene, their biodiversity has declined concurrently with dramatic environmental change and hominin evolution. While these biodiversity declines are well-documented, their implications for the ecological function of megafaunal communities remain uncertain. Here, we adapt ecometric methods to evaluate whether the functional link between communities of herbivorous, eastern African megafauna and their environments (i.e., functional trait-environment relationships) was disrupted as biodiversity losses occurred over the past 7.4 Ma. Herbivore taxonomic and functional diversity began to decline during the Pliocene as open grassland habitats emerged, persisted, and expanded. In the mid-Pleistocene, grassland expansion intensified, and climates became more variable and arid. It was then that phylogenetic diversity declined, and the trait-environment relationships of herbivore communities shifted significantly. Our results divulge the varying implications of different losses in megafaunal biodiversity. Only the losses that occurred since the mid-Pleistocene were coincident with a disturbance to community ecological function. Prior diversity losses, conversely, occurred as the megafaunal species and trait pool narrowed towards those adapted to grassland environments.

The exact sample size (n) for each experimental group/condition, given as as a discrete number and unit of of measurement A statement on on whether measurements were taken from distinct samples or or whether the same sample was measured repeatedly The statistical test(s) used AND whether they are one-or or two-sided Only common tests should be described solely by name; describe more complex techniques in the Methods section.
A description of of all covariates tested A description of of any assumptions or or corrections, such as as tests of of normality and adjustment for multiple comparisons A full description of of the statistical parameters including central tendency (e.g. means) or or other basic estimates (e.g. regression coefficient) AND variation (e.g. standard deviation) or or associated estimates of of uncertainty (e.g. confidence intervals) For null hypothesis testing, the test statistic (e.g. F, t, r) with confidence intervals, effect sizes, degrees of of freedom and P value noted Give P values as exact values whenever suitable.
For Bayesian analysis, information on on the choice of of priors and Markov chain Monte Carlo settings For hierarchical and complex designs, identification of of the appropriate level for tests and full reporting of of outcomes Estimates of of effect sizes (e.g. Cohen's d, Pearson's r), ), indicating how they were calculated Our web collection on statistics for biologists contains articles on many of the points above.

Software and code
Policy information about availability of of computer code Data collection

Data analysis
For manuscripts utilizing custom algorithms or or software that are central to to the research but not yet described in in published literature, software must be be made available to to editors and reviewers. We We strongly encourage code deposition in in a community repository (e.g. GitHub). See the Nature Portfolio guidelines for submitting code & software for further information.

Data
Policy information about availability of of data All manuscripts must include a data availability statement. This statement should provide the following information, where applicable: -Accession codes, unique identifiers, or or web links for publicly available datasets -A description of of any restrictions on on data availability -For clinical datasets or or third party data, please ensure that the statement adheres to to our policy The R code written to to collect and process data, and the files on on which that code depends, are available on on GitHub at at https://github.com/ lauerd/MegafaunaEcometrics.
The R code written to to conduct all analyses, and the files on on which that code depends, are available on on GitHub at at https://github.com/lauerd/ MegafaunaEcometrics.
The data generated in in this study are provided in in the Supplementary Information  Note that full information on the approval of the study protocol must also be provided in the manuscript.

Field-specific reporting
Please select the one below that is the best fit for your research. If you are not sure, read the appropriate sections before making your selection. Our study investigated if and when any disruptions occurred in the functional trait-environment relationships of herbivorous, eastern African megafauna over the past 7.4 Ma (a period of dramatic environmental change and hominin evolution). We determined if such disruptions were coincident with any losses in megafaunal biodiversity. Thus, we performed time-series analyses to determine how megafaunal biodiversity and trait-environment relationships changed over time (see sample sizes for these analyses below).
We analyzed a previously published compilation of the occurrences of mammalian herbivore species ( No sample size calculation was performed, as the sample size in our dataset was determined by the number of species in the Faith et al., 2018 dataset (see above). The 203 fossil and 48 modern species that we analyzed form a strong representation of the herbivorous megafauna that have occurred in Africa over the late Cenozoic.
Data representing the herbivore species' occurrences, functional traits, phylogenies, and site-level environmental conditions were compiled by the corresponding author from a variety of primary literature articles and publicly available data sources.
The data in the Faith et al., 2018 dataset (see above) span the past 7.4 Ma. While the sites at which herbivore species occur/occurred are unevenly distributed over time, we applied a series of methods to account for temporal sampling bias. Herbivore occurrences were recorded previously (in Faith et al., 2018 and the references therein) across various archaeological sites.
We excluded herbivore species that were associated with vague taxonomic identifications or that were too small in body mass to be considered megafauna (<44 kg). We also excluded species that occurred only at sites without known age ranges and/or without available quantitative estimates of their fraction of woody cover (the environmental condition of interest).
All R code needed to reproduce the findings of this study are publicly available in GitHub (https://github.com/lauerd/ MegafaunaEcometrics). Additionally, we performed a series of sensitivity analyses throughout our study to ensure the robustness and reproducibility of our results.
Herbivore species were divided into groups based on the time periods at which they occurred. This was necessary to perform timeseries analyses of biodiversity patterns and trait-environment relationships over the past 7.4 Ma.
Blinding was not relevant to our study. We collected and analyzed data from publicly available data sources, and we used an analytical/computational (as opposed to experimental) study approach that does not require any form of blinding to ensure the validity of our results.