R/analysis-workflow.R
compute_dynamic_stability.Rd
compute_dynamic_stability()
runs the full dynamic stability
analysis. The analysis has multiple steps:
run simplex projection on each time series to identify the optimal embedding dimension
generate surrogate time series, assumming that the data have just a seasonal pattern
run ccm on each pairwise interaction, including the surrogate data
identify the significant interactions by comparing the CCM for the real time series against the calculations for the surrogate data
run S-map models for each time series, using the appropriate number of lags, and including the important interacting variables
extract out the s-map coefficients from the models and assemble matrices for the system
perform eigen-decomposition on the s-map coefficient matrices
perform singular-value-decomposition on the s-map coefficient matrices
compute volume contraction from the s-map coefficient matrices
compute total variance from the s-map coefficient matrices
build_dynamic_stability_plan()
creates a drake plan for the
dynamic stability analysis.
compute_dynamic_stability(block, results_file = NULL, id_var = NULL, max_E = 16, E_list = seq(max_E), surrogate_method = "annual_spline", num_surr = 200, surr_params = list(), lib_sizes = seq(10, 100, by = 10), random_libs = TRUE, num_samples = 100, replace = TRUE, RNGseed = 42, silent = TRUE, rescale = TRUE, rolling_forecast = FALSE) build_dynamic_stability_plan(id_var = NULL, max_E = 16, E_list = seq(max_E), surrogate_method = "annual_spline", num_surr = 200, surr_params = list(), lib_sizes = seq(10, 100, by = 10), random_libs = TRUE, num_samples = 100, replace = TRUE, RNGseed = 42, silent = TRUE, rescale = TRUE, rolling_forecast = FALSE)
block | a data.frame containing time series for the community. Each
column is a time series of abundances, and a |
---|---|
results_file | the location of the results to be stored on disk. |
id_var | the name of the index variable of |
max_E | largest E to examine using simplex projection; this sets the
default range for |
E_list | the embedding dimension or range of embedding dimensions to search over. |
surrogate_method | which surrogate method to use:
options are "annual_spline" or methods available in
|
num_surr | number of surrogates to compute |
surr_params | a list of named optional arguments to be passed into the surrogate data function |
lib_sizes | the vector of library sizes to try |
random_libs | indicates whether to use randomly sampled libs |
num_samples | is the number of random samples at each lib size (this parameter is ignored if random_libs is FALSE) |
replace | indicates whether to sample vectors with replacement |
RNGseed | will set a seed for the random number generator, enabling reproducible runs of ccm with randomly generated libraries |
silent | prevents warning messages from being printed to the R console |
rescale | A logical, indicating whether to rescale each time series |
rolling_forecast | A logical, indicating whether to make individual rolling forecasts for the second half of the time series. |
a list with named components for the individual output objects XXX