R: Description: Quick Detection Analysis for Generic Early...
qda_ews
R Documentation
Description: Quick Detection Analysis for Generic Early Warning Signals
Description
qda_ews is used to estimate autocorrelation,
variance within rolling windows along a timeseries, test
the significance of their trends, and reconstruct the
potential landscape of the timeseries
a numeric vector of the observed
univariate timeseries values or a numeric matrix where
the first column represents the time index and the second
the observed timeseries values. Use vectors/matrices with
headings.
param
values corresponding to observations in
timeseries
winsize
is the size of the rolling window
expressed as percentage of the timeseries length (must be
numeric between 0 and 100). Default is 50%.
detrending
the timeseries can be
detrended/filtered prior to analysis. There are four
options: gaussian filtering, linear
detrending and first-differencing. Default is
no detrending.
bandwidth
is the bandwidth used for the Gaussian
kernel when gaussian filtering is applied. It is
expressed as percentage of the timeseries length (must be
numeric between 0 and 100). Alternatively it can be given
by the bandwidth selector bw.nrd0
(Default).
boots
the number of surrogate data to generate
from fitting an ARMA(p,q) model. Default is 100.
s_level
significance level. Default is 0.05.
cutoff
the cutoff value to visualize the potential
landscape
detection.threshold
detection threshold for
potential minima
grid.size
grid size (for potential analysis)
logtransform
logical. If TRUE data are
logtransformed prior to analysis as log(X+1). Default is
FALSE.
interpolate
logical. If TRUE linear interpolation
is applied to produce a timeseries of equal length as the
original. Default is FALSE (assumes there are no gaps in
the timeseries).
qda_ews produces three plots. The first plot
contains the original data, the detrending/filtering
applied and the residuals (if selected), autocorrelation
and variance. For each statistic trends are estimated by
the nonparametric Kendall tau correlation. The second
plot, returns a histogram of the distributions of the
Kendall trend statistic for autocorrelation and variance
estimated on the surrogated data. Vertical lines
represent the level of significance, whereas the black
dots the actual trend found in the time series. The third
plot is the reconstructed potential landscape in 2D. In
addition, the function returns a list containing the
output from the respective functions generic_RShiny
(indicators); surrogates_RShiny (trends);
movpotential_ews (potential analysis)
Dakos, V., et al (2012).'Methods for Detecting Early
Warnings of Critical Transitions in Time Series Illustrated
Using Simulated Ecological Data.' PLoS ONE 7(7):
e41010. doi:10.1371/journal.pone.0041010