Description Usage Arguments Details Value Author(s) References Examples

View source: R/turning.point.test.R

Performs the nonparametric Turning Point test of randomness.

1 | ```
turning.point.test(x, alternative)
``` |

`x` |
a numeric vector containing the data |

`alternative` |
a character string specifying the alternative hypothesis. Must be one of " |

Repeated consecutive observations are removed from data.

The possible values "`two.sided`

", "`left.sided`

" and "`right.sided`

" define the alternative hypothesis.
By using the alternative "`two.sided`

" the null hypothesis of randomness is tested against either a positive or negative serial correlation between neighbouring observations.

A list with class "htest" containing the components:

`statistic` |
the (normalized) value of the statistic test. |

`parameter` |
the size of the data, after the remotion of consecutive duplicate values. |

`p.value` |
the p-value for the test. |

`alternative` |
a character string describing the alternative hypothesis. |

`method` |
a character string indicating the test performed. |

`data.name` |
a character string giving the name of the data. |

`tp` |
the value of the TP statistic (not shown on screen). |

Ayana Mateus and Frederico Caeiro

Brockwell, P.J. and Davis, R.A. (2002). *Introduction to Time Series and Forecasting*, 2nd edition, Springer (p. 36).

Mateus, A. and Caeiro, F. (2013). Comparing several tests of randomness based on the difference of observations. In T. Simos, G. Psihoyios and Ch. Tsitouras (eds.), *AIP Conf. Proc.* **1558**, 809–812.

Moore, G.H. and Wallis, W.A. (1943). Time Series Significance Tests Based on Signs of Differences. *Journal of the
American Statistical Association*, **38**, 153–154.

1 2 3 4 5 | ```
##
## Example 1
##
data(sweetpotato)
turning.point.test(sweetpotato$yield)
``` |

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.