Description Usage Arguments Details Value References Examples

View source: R/NonlinearityTest.R

Surrogate data testing

1 2 3 4 5 6 |

`HRVData` |
Structure containing the RR time series. |

`indexNonLinearAnalysis` |
Reference to the data structure that will contain the nonlinear analysis |

`significance` |
Significance of the test. |

`oneSided` |
Logical value. If |

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

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

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

`xlab` |
a title for the x axis. |

`ylab` |
a title for the y axis. |

`main` |
an overall title for the plot. |

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

`...` |
Additional arguments for the |

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.

A *HRVData* structure containing a *SurrogateTest* field storing the
statistics computed for the set (*surrogates.statistics* field) and the RR time series
(*data.statistic field*). The *SurrogateTest* list is stored under the *NonLinearAnalysis* structure.

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
## Not run:
data(HRVProcessedData)
# rename for convenience
HRVData = HRVProcessedData
# Select a small window that looks stationary
HRVData = Window(HRVData,start = 0, end=800)
HRVData = CreateNonLinearAnalysis(HRVData)
HRVData = SetVerbose(HRVData,TRUE)
HRVData = SurrogateTest(HRVData, indexNonLinearAnalysis = 1,
significance = 0.05, oneSided = FALSE,
K = 5, useFunction = timeAsymmetry2)
## End(Not run)
``` |

RHRV documentation built on May 20, 2017, 12:26 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.