library(commecometrics)
library(ggplot2)
library(sf)
#> Linking to GEOS 3.13.0, GDAL 3.8.5, PROJ 9.5.1; sf_use_s2() is TRUE
The commecometrics
package offers a flexible framework
for modeling trait–environment relationships and applying these models
to fossil data. This vignette demonstrates how the
commecometrics
package can reconstruct past environments
from fossil community traits. Environmental conditions such as
precipitation or vegetation class can be estimated at fossil localities
based on where their trait combinations fall within the modern trait
space. For a full description of the modern trait summarization and
model fitting workflow, please refer to the introductory vignette
(introduction_to_commecometrics
).
We begin by loading:
samplingPoints
: Community locations and environmental
conditionstraits
: Species-level trait datageography
: Species range shapefilesfossils
: Mean and standard deviation of trait values
for seven North American fossil sitesWe calculate community-level trait mean and standard standard deviations by intersecting species ranges with community locations:
We model precipitation as a function of trait mean and standard deviation, in this case, manually setting a 25 x 25 grid:
This plot illustrates the trait–environment relationship across modern communities. Each grid cell (bin) corresponds to a specific range of community mean and standard deviation values. Communities whose trait summaries fall within that range are grouped into the same bin. The color of each bin represents the estimated environmental value (e.g., log-precipitation).
We now apply the trained model to fossil trait data to estimate paleoenvironmental conditions at each site. Fossils are matched to the closest trait bin, and predictions are only returned for analog trait combinations. Sites falling outside the trait space observed in the modern training data are flagged as non-analog. Here, we see Brynjulfson and Friesenhahn Caves are expected to have had the highest precipitation, whereas January Cave is expected to have had the lowest precipitation.
We can also overlay fossil communities in the ecometric space with the modern communities. Black boxes represent fossil site trait distributions; red boxes represent modern communities from the same geographic coordinates.
This vignette demonstrates how commecometrics
can be
used to reconstruct past environmental conditions based on fossil
community trait distributions. Ecometric models trained on modern data
are used to estimate paleoenvironmental variables such as precipitation
or vegetation type at fossil localities. This approach provides a
powerful way to connect traits preserved in the fossil record with
environmental gradients.
For a complete overview of the full workflow used to build
trait–environment models from modern data, please refer to the companion
vignette “introduction-to-commecometrics
”