A funcion to estimate the contingency periodogram to test for periodicity in categorical time series.

1 2 | ```
contingency.periodogram(x, maxper = 6)
``` |

`x` |
A vector representing the categorical time series. |

`maxper` |
the maximum lag (period) considered. |

This is the contingency periodogram of Pierre Legedre and Pierre Dutielle to test for periodicity in categorical time series. I have coded the function so as to provide both the Fisher exact test and the asymptotic chi-square test.

An object of class "contingency.periodogram" is returned consisting of a matrix with a row for each period considered. The columns are:

`exact.p` |
the fischer exact test at each lag. |

`chi-val` |
the asymptotic chi-square value. |

`df` |
the chi-square degrees-of-freedom. |

`asympt.p` |
the chi-squared asymptotic p-value. |

Ottar N. Bjornstad onb1@psu.edu

Legendre et al. (1981) The contingency periodogram: A method for identifying rhytms in series of nonmetric ecological data. Journal of Ecology, 69, 965-979.

1 2 3 4 |

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

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

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