View source: R/asc_transitions.R
| asc_transitions | R Documentation |
Describes who moved the functional centroid (no p-values; for tests
see asc_null):
Species leverage: contribution of each species to the
centroid displacement (Layer 1). Leverages add up exactly to the
displacement ||\Delta C|| for any reference point.
Partition: share of the displacement due to species shared by both states, gained (only in the comparison) and lost (only in the reference).
Entities (optional, exploratory): share of the
displacement that occurs between functional entities (their total
abundances change) and within entities (which species dominates inside
each entity changes). The two parts add up exactly to the displacement.
See asc_entities for its limits.
asc_transitions(
x,
ref = c("midpoint", "reference", "comparison"),
entities = NULL,
...
)
x |
An object from |
ref |
Character. Reference point for the projections:
|
entities |
Optional. An object from |
... |
Further arguments passed to or from other methods. |
Leverage of species i is \Delta p_i \, (F_i - r) \cdot u, where
u is the unit vector of the displacement and r the reference
point. The total does not depend on r, but how it is shared among
species (and among shared, gained and lost species) does. The default
ref = "midpoint" (half-way between the two centroids) is symmetric:
it gives the same partition whichever state is called the reference, which
matters for pairwise comparisons. The partition also reports its minimum
and maximum across the three reference points; a wide range means the
partition should be interpreted with caution.
Leverage keeps only the part of each species' contribution that lies along
the displacement. A species can change a lot in a direction perpendicular
to the displacement (and be compensated by other species) and still have a
small leverage. Orthogonal reports the size of that perpendicular
part, || \Delta p_i (F_i - r) - Leverage_i \, u ||, so that "small
leverage" is not read as "small change": a species with small leverage
and large Orthogonal changed in abundance, but along another
direction of the trait space.
In version 0.1.1 the reference point was the reference centroid
(ref = "reference"); per-species values differ from 0.1.1 unless
that option is used.
An S3 object of class ascent_transitions (it also carries the
class ascfcd_transitions of ascent 0.5.0, which will be dropped in
0.6.0): a list with one
element per contrast (or pair), each containing species_leverage
(columns Species, Group, Delta_p, Projection,
Leverage, Orthogonal; species absent from both states are
omitted),
partition (columns Group, Fraction,
Min_across_refs, Max_across_refs), entities
(Shift, Between, Within, Within_fraction, or
NULL; descriptive: see asc_entities for its
limits), shift and ref.
res <- asc_paired(birds_sim$traits, birds_sim$counts,
sites = birds_sim$samples$site,
time = birds_sim$samples$time, ref_time = "Before")
tr <- asc_transitions(res)
# Species that moved the centroid at "Logged": positive leverage pushes it in
# the direction of the change, negative leverage resists it
head(tr$Logged$species_leverage)
# Leverages add up exactly to the shift
c(sum = sum(tr$Logged$species_leverage$Leverage), shift = tr$Logged$shift)
# Share of the shift due to species shared, gained or lost
tr$Logged$partition
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.