calc_sync: Calculate synchrony indices

Description Usage Arguments Details Value Author(s) References Examples

View source: R/calc_sync.R

Description

Function to calculate all or a subset of synchrony indices, including their three term local quadrat variance (t3) version, and the decomposition of the variance ratio index into Stotal, Strend, and Sdetrended.

Note that the indices get calculated for a single temporal community. To do this for multiple communities at once, we can, e.g., use lapply (see Examples).

Usage

1
2
3
calc_sync(x, decompose = TRUE, indices = c("eta", "eta_t3", "eta_w",
  "eta_t3_w", "phi", "phi_t3", "varrat", "varrat_t3", "log_varrat",
  "log_varrat_t3"))

Arguments

x

temporal community data in a data frame. Species as columns, years as rows.

decompose

If TRUE, the outputted synchrony indices will also contain the total variance ratio (Stotal) and its decomposition into parts attributable to long term trend (Strend) and actual synchrony (Sdetrended). See function decompostr.

indices

A character vector that specifies wich of the synchrony indices should be calculated. By default, all available indices are calculated. If only a subset is desired, the names of the functions to calculate must be provided in the character vector (e.g. c("eta", "phi") to calculate only standard versions of eta and phi).

Details

At the moment, the following indices of synchrony are available (in the order they are displayed in the function output, give that all indices haven been calculated):

eta: The mean correlation of abundances of each species with all other species (see Gross et al. 2014).

eta_w: As eta, but the mean is weighted by the total abundances of species (see Blüthgen et al. 2016).

eat_t3, eta_t3_w: The t3 versions of eta and eta_w, respectively.

phi: Phi after Loreau and de Mazancourt (2008).

phi_t3: t3 modified version of Phi.

varrat: variance ratio after Schluter (1984).

varrat_t3: t3 version of the variance ratio.

log_varrat: Log transformed variance ratio (see Leps et al. 2018).

log_varrat_t3: t3 version of the log variance ratio.

syn_total: The total synchrony, without decomposition (Stotal).

syn_trend: The component of total synchrony that is attributable to trend (Strend).

syn_detrend: The component of total synchrony that is attributable to year-to-year fluctuations (Sdetrend).

Stotal, Strend, and Sdetrend, as well as the t3 (i.e. three term local quadrat variance) versions of the standard indices are described in Leps et al. 2019.

Value

A data frame containing all indices that were specified to be calculated by the indices and decompose arguments.

Author(s)

Lars Götzenberger

References

Blüthgen, N., N. K. Simons, K. Jung, D. Prati, S. C. Renner, S. Boch, M. Fischer, N. Holzel, V. H. Klaus, T. Kleinebecker, M. Tschapka, W. W. Weisser, and M. M. Gossner. 2016. Land use imperils plant and animal community stability through changes in asynchrony rather than diversity. Nat Commun 7:10697.

Gross, K., B. J. Cardinale, J. W. Fox, A. Gonzalez, M. Loreau, H. W. Polley, P. B. Reich, and J. van Ruijven. 2014. Species richness and the temporal stability of biomass production: a new analysis of recent biodiversity experiments. Am Nat 183:1-12.

Leps, J., Götzenberger, L., Valencia E., de Bello, Francesco. 2019. Accounting for long-term directional trends on year-to-year synchrony in species fluctuations. Ecography.

Leps, J., M. Majekova, A. Vitova, J. Dolezal, and F. de Bello. 2018. Stabilizing effects in temporal fluctuations: management, traits, and species richness in high-diversity communities. Ecology 99:360-371.

Loreau, M., and C. de Mazancourt. 2008. Species Synchrony and Its Drivers: Neutral and Nonneutral Community Dynamics in Fluctuating Environments. Am Nat 172:E48-E66.

Schluter, D. 1984. A Variance Test for Detecting Species Associations, with Some Example Applications. Ecology 65:998-998.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# For the purpose of demonstration, with some (overly) simplistic  simulated data
nsp <- 20 # 20 species 
nyears <- 10 # over 10 years
tempcommunity <- replicate(nyears, sample(0:30, nsp)) 
calc_sync(tempcommunity)

# For two communities at once
tempcom_list <- list(tempcommunity, tempcommunity)
sync_indices <- lapply(tempcom_list, calc_sync)
do.call("rbind", sync_indices) # make into a data frame 

larsito/tempo documentation built on July 22, 2019, 2:31 p.m.