View source: R/calcSynchMetrics.R
calcSynchMetrics | R Documentation |
This function calculates rolling window estimates of several metrics related
to Thibaut and Connoly's (2013 Ecology Letters) analysis of aggregate
variability, including the synchrony index (phi), mean temporal coefficient
of variation among components (with weighting options), and mean pairwise
correlation coefficients. It is dependent on the synchrony
package.
Contains multiple conditionals because computation can slows as the number
of time series, time series length, or the number of trials increase.
calcSynchMetrics(
synchList,
windowSize = 10,
synch = TRUE,
compCV = TRUE,
corr = FALSE,
weight = TRUE
)
synchList |
The output list |
windowSize |
A numeric representing the size of the moving window. |
synch |
A logical (defaults to TRUE) specifying whether the synchrony metric phi should be calculated. |
compCV |
A logical (defaults to TRUE) specifying whether mean component CV should be calculated. |
corr |
A logical (defaults to FALSE) specifying whether mean pairwise correlation coefficients should be calculated (approximately equivalent to phi). |
weight |
A logical specifying whether compCV should be weighted by mean abundance of recruits. |
Returns a list containing three metrics (synchrony, component CV, and mean pairwise correlation coefficient) for four simulation output time series (recruits by brood year, log(R/S), SR model residuals, and spawner abundance). Each list element is a matrix with dimensions nYears x nTrials.
#relatively large number of trials so will take some time to run
calcSynchMetrics(synchList, windowSize = 10, synch = TRUE,
compCV = TRUE, corr = FALSE, weight = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.