surrogateTest: Surrogate data testing

View source: R/surrogate.data.R

surrogateTestR Documentation

Surrogate data testing

Description

Surrogate data testing

Usage

surrogateTest(
  time.series,
  significance = 0.05,
  one.sided = FALSE,
  alternative = c("smaller", "larger"),
  K = 1,
  FUN,
  verbose = TRUE,
  do.plot = TRUE,
  xlab = "Values of the statistic",
  ylab = "",
  main = "Surrogate data testing",
  ...
)

Arguments

time.series

The original time.series from which the surrogate data is generated.

significance

Significance of the test

one.sided

Logical value. If TRUE, the routine runs a one-side test. If FALSE, a two-side test is applied (default).

alternative

Specifies the concrete type of one-side test that should be performed: If the the user wants to test if the statistic from the original data is smaller (alternative="smaller") or larger (alternative="larger") than the expected value under the null hypothesis.

K

Integer controlling the number of surrogates to be generated (see details).

FUN

The function that computes the discriminating statistic that shall be used for testing.

verbose

Logical value. If TRUE, a brief summary of the test is shown.

do.plot

Logical value. If TRUE, a graphical representation of the statistic value for both surrogates and original data is shown.

xlab

a title for the x axis.

ylab

a title for the y axis.

main

an overall title for the plot.

...

Additional arguments for the FUN function.

Details

This function tests the null hypothesis (H0) stating that the series is a gaussian linear process. The test is performed by generating several surrogate data according to H0 and comparing the values of a discriminating statistic between both original data and the surrogate data. If the value of the statistic is significantly different for the original series than for the surrogate set, the null hypothesis is rejected and nonlinearity assumed.

To test with a significance level of \alpha if the statistic from the original data is smaller than the expected value under the null hypothesis (a one-side test), K/\alpha - 1 surrogates are generated. The null hypothesis is then rejected if the statistic from the data has one of the K smallest values. For a two-sided test, 2K/\alpha - 1 surrogates are generated. The null hypothesis is rejected if the statistic from the data gives one of the K smallest or largest values.

The surrogate data is generated by using a phase randomization procedure.

Value

A list containing the values of the statistic for the surrogates (surrogates.statistics field) and the value for the original time series (data.statistic)

Author(s)

Constantino A. Garcia

References

SCHREIBER, Thomas; SCHMITZ, Andreas. Surrogate time series. Physica D: Nonlinear Phenomena, 2000, vol. 142, no 3, p. 346-382.

Examples

## Not run: 
 lx = lorenz(do.plot=F)$x 
 sdt = surrogateTest(time.series = lx,significance = 0.05,
                     K=5, one.sided = FALSE, FUN=timeAsymmetry) 

## End(Not run)

nonlinearTseries documentation built on Sept. 23, 2024, 5:10 p.m.