Learn R Programming

iSTAY (version 1.0.0)

iSTAY_Single: Calculate stability for a single time series.

Description

iSTAY_Single computes the stability of order q for a single time series.

Usage

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

Value

a dataframe with columns:

Dataset: the input dataset

Order_q: order of stability

Stability: stability measures of order q

Arguments

data

A vector of time series data, or a data.frame with sampling units as rows and time points as columns.

order.q

a numerical vector specifying the orders of stability. 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
# Compute the stability of individual plots
data("Data_Jena_20_metacommunities")
individual_plots <- do.call(rbind, Data_Jena_20_metacommunities)
output_individual_plots <- iSTAY_Single(data = individual_plots, 
                                        order.q=c(1,2), Alltime = TRUE)
output_individual_plots

# Compute the stability of individual populations
data("Data_Jena_76_metapopulations")
individual_populations <- do.call(rbind, Data_Jena_76_metapopulations)
output_individual_populations <- iSTAY_Single(data = individual_populations, 
                                              order.q = c(1,2), Alltime = TRUE)
output_individual_populations

Run the code above in your browser using DataLab