Description Usage Arguments Details Value Author(s) References See Also Examples

`surrogates_ews`

is used to estimate distributions of
trends in statistical moments from different surrogate
timeseries generated after fitting an ARMA(p,q) model on
the data. The trends are estimated by the nonparametric
Kendall tau correlation coefficient and can be compared to
the trends estimated in the original timeseries to produce
probabilities of false positives.

1 2 3 4 5 |

`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. |

`indicator` |
is the statistic (leading indicator)
selected for which the surrogate timeseries are produced.
Currently, the indicators supported are: |

`winsize` |
is the size of the rolling window expressed as percentage of the timeseries length (must be numeric between 0 and 100). Default valuise 50%. |

`detrending` |
the timeseries can be
detrended/filtered prior to analysis. There are three
options: |

`bandwidth` |
is the bandwidth used for the Gaussian
kernel when gaussian filtering is selected. 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 |

`span` |
parameter that controls the degree of smoothing (numeric between 0 and 100, Default 25). see more on loessstats |

`degree` |
the degree of polynomial to be used for when loess fitting is applied, normally 1 or 2 (Default). see more on loessstats |

`boots` |
the number of surrogate data. Default is 100. |

`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). |

see ref below

Arguments:

`surrogates_ews`

returns a matrix that contains:

`Kendall tau estimate original` |
the trends of the original timeseries. |

`Kendall tau p-value original` |
the p-values of the trends of the original timeseries. |

`Kendall tau estimate surrogates` |
the trends of the surrogate timeseries. |

`Kendall tau p-value surrogates` |
the associated p-values of the trends of the surrogate timeseries. |

`significance p` |
the p-value for the original Kendall tau rank correlation estimate compared to the surrogates. |

In addition, `surrogates_ews`

returns a plot with the
distribution of the surrogate Kendall tau estimates and the
Kendall tau estimate of the original series. Vertical lines
indicate the 5% and 95% significance levels.

Vasilis Dakos vasilis.dakos@gmail.com

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`

1 2 3 |

```
Loading required package: ggplot2
Loading required package: moments
Loading required package: tgp
Loading required package: tseries
earlywarnings Copyright (C) 2011-2013 Vasilis Dakos and Leo Lahti
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under the FreeBSD open source license. For more information, see http://www.early-warning-signals.org
[1] AR MA AIC
[1] 1 0 -75.2709545811882
[1] AR MA AIC
[1] 1 1 -73.2950924586883
[1] AR MA AIC
[1] 1 2 -71.3035282652388
[1] AR MA AIC
[1] 1 3 -69.4125783035557
[1] AR MA AIC
[1] 1 4 -67.4686048901959
[1] AR MA AIC
[1] 2 0 -73.29574212193
[1] AR MA AIC
[1] 2 1 -83.9845268059292
[1] AR MA AIC
[1] 2 2 -83.1891179057992
[1] AR MA AIC
[1] 2 3 -88.7971731443583
[1] AR MA AIC
[1] 2 4 -68.6158251688914
[1] AR MA AIC
[1] 3 0 -71.3066937248503
[1] AR MA AIC
[1] 3 1 -70.7230116448304
[1] AR MA AIC
[1] 3 2 -69.8249722385024
[1] AR MA AIC
[1] 3 3 -66.9553175243016
[1] AR MA AIC
[1] 3 4 -65.0558450350164
[1] AR MA AIC
[1] 4 0 -69.4055793810456
[1] AR MA AIC
[1] 4 1 -69.0807297962971
[1] AR MA AIC
[1] 4 2 -68.5374088733644
[1] AR MA AIC
[1] 4 3 -82.5412497525874
[1] AR MA AIC
[1] 4 4 -81.5801939876682
[1] "significance p = 0.185 estimated from 200 surrogate ARMA timeseries"
Warning message:
In data.frame(Ktauestindorig, Ktaupindorig, Ktauestind, Ktaupind, :
row names were found from a short variable and have been discarded
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.