Learn R Programming

iSTAY (version 1.0.0)

iSTAY_Hier: Calculate stability and synchrony at each hierarchical level

Description

iSTAY_Hier computes gamma, alpha, and beta stability, as well as synchrony, at each hierarchical level for time series of biomass or other variables.

Usage

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

Value

a data frame with the following columns:

Hier_level: hierarchical level (e.g. Level 1: population, Level 2: community, Level 3: block, and level 4: overall data)

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 the hierarchical data, with sampling units as rows and time points as columns.

structure

The hierarchical structure of the input data.

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

data("Data_Jena_462_populations")
data("Data_Jena_hierarchical_structure")
output_hier <- iSTAY_Hier(data = Data_Jena_462_populations, 
         structure = Data_Jena_hierarchical_structure,
         order.q=c(1,2), Alltime=TRUE)
output_hier


Run the code above in your browser using DataLab