make_surrogate_data {rEDM} | R Documentation

## Generate surrogate data for permutation/randomization tests

### Description

`make_surrogate_data` generates surrogate data under several different null models.

### Usage

    make_surrogate_data(ts, method = c("random_shuffle", "ebisuzaki",
      "seasonal"), num_surr = 100, T_period = 1)

### Arguments

`ts` | the original time series
`method` | which algorithm to use to generate surrogate data
`num_surr` | the number of null surrogates to generate
`T_period` | the period of seasonality for seasonal surrogates (ignored for other methods)

### Details

Method "random_shuffle" creates surrogates by randomly permuting the values of the original time series.

Method "Ebisuzaki" creates surrogates by randomizing the phases of a Fourier transform, preserving the power spectra of the null surrogates.

Method "seasonal" creates surrogates by computing a mean seasonal trend of the specified period and shuffling the residuals.

See `test_nonlinearity` for context.

### Value

A matrix where each column is a separate surrogate with the same length as `ts`.

### Examples

    data("two_species_model")
    ts <- two_species_model$x[1:200]
    make_surrogate_data(ts, method = "ebisuzaki")

[Package rEDM version 0.7.2 Index]