generic_ews
is used to estimate statistical moments
within rolling windows along a timeserie
generic_ews(timeseries, winsize = 50, detrending = c("no", "gaussian", "loess", "linear", "first-diff"), bandwidth = NULL, span = NULL, degree = NULL, logtransform = FALSE, interpolate = FALSE, AR_n = FALSE, powerspectrum = FALSE)
bw.nrd0
(Default).gaussian
filtering, loess
fitting,
linear
detrending and first-differencing
.
Default is no
detrending.generic_ews
returns a matrix that contains:autoregressive coefficient ar(1)
of a
first order AR model fitted on the data within the rolling
window.standard deviation
of the data
estimated within each rolling window.skewness
of the data estimated within
each rolling window.kurtosis
of the data estimated
within each rolling window.coefficient of variation
of the data
estimated within each rolling window.1-ar(1)
cofficient within each rolling window.density ratio
of the power
spectrum of the data estimated as the ratio of low
frequencies over high frequencies within each rolling
window.autocorrelation at first lag
of the
data estimated within each rolling window.generic_ews
returns three plots. The
first plot contains the original data, the
detrending/filtering applied and the residuals (if
selected), and all the moment statistics. For each
statistic trends are estimated by the nonparametric Kendall
tau correlation. The second plot, if asked, quantifies
resilience indicators fitting AR(n) selected by the Akaike
Information Criterion. The third plot, if asked, is the
power spectrum estimated by spec.ar
for all
frequencies within each rolling window.
Dakos, V., et al (2008). 'Slowing down as an early warning signal for abrupt climate change.' Proceedings of the National Academy of Sciences 105(38): 14308-14312
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
generic_ews
; ddjnonparam_ews
;
bdstest_ews
; sensitivity_ews
;
surrogates_ews
; ch_ews
;
movpotential_ews
;
livpotential_ews
;
data(foldbif)
out=generic_ews(foldbif,winsize=50,detrending='gaussian',
bandwidth=5,logtransform=FALSE,interpolate=FALSE)
Run the code above in your browser using DataLab