Learn R Programming

iSTAY (version 1.0.0)

iSTAY_Multiple: Calculate stability and synchrony for multiple time series.

Description

iSTAY_Multiple computes gamma, alpha, and beta stability, as well as synchrony, for multiple time-series data.

Usage

iSTAY_Multiple(
  data,
  order.q = c(1, 2),
  Alltime = TRUE,
  start_T = NULL,
  end_T = NULL
)

Value

a data frame with the following columns:

Dataset: the input dataset

Order_q: order of stability or synchrony

Gamma, Alpha, Beta: stability measures of order q

Synchrony: synchrony measure of order q

Arguments

data

A data.frame containing multiple time series data, with sampling units as rows and time points as columns, or a list of data.frames with each data frame representing multiple time series.

order.q

A numerical vector specifying the orders of stability and synchrony. Default is c(1,2).

Alltime

Logical (TRUE or FALSE), indicating whether to use all time points in the data.

start_T

(Applicable only if Alltime = FALSE) a positive integer specifying the starting column (time point) for the analysis interval.

end_T

(Applicable only if Alltime = FALSE) a positive integer specifying the ending column (time point) for the analysis interval.

Examples

Run this code
# Stability of multiple time series
data("Data_Jena_20_metacommunities")
metacommunities <- Data_Jena_20_metacommunities
output_metacommunities <- iSTAY_Multiple(data = metacommunities, order.q = c(1,2), Alltime = TRUE)
output_metacommunities

# Stability of metapopulations
data("Data_Jena_76_metapopulations")
metapopulations <- Data_Jena_76_metapopulations
output_metapopulations <- iSTAY_Multiple(data = metapopulations, order.q = c(1,2), Alltime = TRUE)
output_metapopulations


Run the code above in your browser using DataLab