README.md

ascent: A multi-layer framework for characterizing functional community restructuring through positional, dispersive and boundary components

DOI

The ascent package implements the ASC-CFD (Assemblage Shift Characterization — Community Functional Dynamics) framework.

Two communities can differ by the same amount of functional turnover while changing in very different ways: one moves to another region of trait space, another redistributes abundance internally, a third gains or loses extreme phenotypes. ascent characterizes these processes through three layers measured in a functional space (a PCoA of Gower distances between species traits), tests each layer against two null models, and identifies the species that drove the change.

What does each layer measure?

| Layer | Metric | Question | |---|---|---| | Position | ΔC (rΔC %, normalised) | Where is the community moving in trait space? | | Dispersion | ΔFDis | Is abundance concentrating near the centre or spreading towards the edges? | | Volume | ΔFRic | Are the functional boundaries expanding or contracting? |

ΔC is the shift of the abundance-weighted centroid. FDis is abundance-weighted dispersion around it. FRic is the volume of the convex hull of the species present: it depends only on the extreme species and is not abundance-weighted, so read it as a descriptor of the functional boundary.

Two null models

| A | B | Reading | |---|---|---| | no | — | no evidence of change beyond sampling | | yes | yes (upper tail) | change beyond sampling, directed by traits | | yes | no | change beyond sampling without detectable trait structure |

For many communities (asc_pairwise()), asc_null() runs one global test per layer instead of one p-value per pair, with the same reading.

Installation

install.packages("ascent")                       # CRAN
# devtools::install_github("V3ndetta96/ascent")  # development version

Workflow

The example uses birds_sim, a simulated data set included in the package: 24 bird species, two sites surveyed five times before and five times after an event. At Logged the community changes; at Control nothing changes.

library(ascent)

# 1. Check the functional space: number of axes (rule: mSD) and quality
assess_functional_space(birds_sim$traits)

# 2. Describe the design: one contrast per site, Before vs After, with the
#    five surveys of each state as replicates
res <- asc_paired(birds_sim$traits, birds_sim$counts,
                  sites = birds_sim$samples$site,
                  time = birds_sim$samples$time, ref_time = "Before")

# 3. Test each layer against A and B (999 permutations for research)
res <- asc_null(res, n_perm = 999, seed = 1)
summary(res)     # reading of each test, permutation used, trait that moved most

# 4. Which species moved the centroid?
tr <- asc_transitions(res)
summary(tr)
plot(res, contrast = "Logged", type = "both", n_sp = 5)

Decisions that depend on your design:

| Your design | What to do | |---|---| | One sample per state | A reassigns individuals (multinomial sampling error only); use replicates whenever possible | | Replicates of both states taken in matched units (same months, plots, survey rounds) | give that unit as blocks in asc_paired() | | Independent replicates (spaced, not matched) | nothing: whole samples are permuted freely | | Consecutive samples of each state (e.g. consecutive months) | they are pseudoreplicates: no permutation removes this dependence, A is liberal; space the samples or treat p-values as indicative | | Many communities (a gradient, a series) | asc_pairwise() and the global test of asc_null() |

summary() reports both one-tailed p-values, the two-tailed value for dispersion and volume, and the p-value adjusted across the three layers (Benjamini-Hochberg by default); the Reading column uses the adjusted value.

Functions

| Function | Purpose | |---|---| | assess_functional_space() | Number of axes and quality of the functional space | | asc_paired() | Reference vs comparison state at each site (temporal or paired contrasts) | | asc_pairwise() | All pairs of many communities | | asc_null() | Null models A and B per contrast; one global test for asc_pairwise() | | asc_transitions() | Species leverage; partition among shared, gained and lost species | | asc_entities() | Functional entities (groups of similar species), exploratory | | asc_baseline() | Metrics of each community without contrasts |

For a complete guide with the reading of every output: vignette("ascent_tutorial").

Methodological notes

Leverage: an additive decomposition

$$\sum_{i=1}^{S} \text{Leverage}_i = \|\Delta C\|, \qquad \text{Leverage}_i = \Delta p_i \, (\mathbf{f}_i - \mathbf{r}) \cdot \hat{v}$$

where $\Delta p_i$ is the change in relative abundance of species $i$, $\mathbf{f}_i$ its coordinates, $\hat{v}$ the unit vector of the shift and $\mathbf{r}$ a reference point (by default the midpoint between the two centroids). Positive leverage drives the shift; negative leverage resists it. The column Orthogonal gives the part of each species' contribution perpendicular to the shift, so that a small leverage is not read as a small change.

Citation

While the manuscript is in preparation, please cite the package:

Muñoz-Li, R. R. & F. Alvarez-Denis (2026). ascent: Multi-Layer Characterization of Functional Community Restructuring. R package. https://doi.org/10.5281/zenodo.20388185

The entry for the installed version is given by citation("ascent").



Try the ascent package in your browser

Any scripts or data that you put into this service are public.

ascent documentation built on Nov. 30, 2026, 1:07 a.m.