Cperiodogram: Contingency periodogram

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Cperiodogram.R

Description

Function to compute a contingency periodogram for a univariate series of qualitative data

Usage

1
2
Cperiodogram(x, T1 = 2, T2 = NULL, nperm = NULL, alpha = 0.05,
  graph = TRUE)

Arguments

x

a qualitative variable (factor)

T1

first period included in the calculations (default: T1 = 2)

T2

last period included in the calculations (default: T2 = n/2)

nperm

Number of permutations for the chi-square test. For chi-square tests using the chi- square distribution, use the default nperm=NULL

alpha

significance level for computation of the confidence limits

graph

a logical indicating if a graph is requested, by default TRUE.

Details

The contingency periodogram of Legendre et al. (1981) identifies periodic components in qualitative data vectors. The vector may contain classes of a qualitative variable or the classes obtained by hierarchical clustering or partitioning of a multivariate data table. The method is also described in Legendre & Legendre (2012). The optional graph produced by the function shows the following information:

Value

A table with the statistics for the selected periods:

Confidence interval limits:

Author(s)

Pierre Legendre pierre.legendre@umontreal.ca

References

Legendre, L., M. Fr<c3><a9>chette & P. Legendre. 1981. The contingency periodogram: a method of identifying rhythms in series on nonmetric ecological data. Journal of Ecology 69: 965-979.

Legendre, P. and Legendre, L. 2012. Numerical Ecology. 3rd English ed. Elsevier, Amsterdam

Examples

1
2
3
4
5
6
# Data from the numerical example of Subsection 12.4.2 of Legendre and Legendre (2012).
test.vec <- c(1,1,2,3,3,2,1,2,3,2,1,1,2,3,3,1)
# Periodogram with tests using the chi-square distribution
res <- Cperiodogram(test.vec)
# Periodogram with permutation tests
res <- Cperiodogram(test.vec, nperm=2000, graph=FALSE)

Example output

Registered S3 methods overwritten by 'adegraphics':
  method         from
  biplot.dudi    ade4
  kplot.foucart  ade4
  kplot.mcoa     ade4
  kplot.mfa      ade4
  kplot.pta      ade4
  kplot.sepan    ade4
  kplot.statis   ade4
  scatter.coa    ade4
  scatter.dudi   ade4
  scatter.nipals ade4
  scatter.pco    ade4
  score.acm      ade4
  score.mix      ade4
  score.pca      ade4
  screeplot.dudi ade4
Registered S3 method overwritten by 'spdep':
  method   from
  plot.mst ape 
Registered S3 methods overwritten by 'adespatial':
  method             from       
  plot.multispati    adegraphics
  print.multispati   ade4       
  summary.multispati ade4       
Warning messages:
1: In chisq.test(tab, simulate.p.value = simulate, B = nperm) :
  Chi-squared approximation may be incorrect
2: In chisq.test(tab, simulate.p.value = simulate, B = nperm) :
  Chi-squared approximation may be incorrect
3: In chisq.test(tab, simulate.p.value = simulate, B = nperm) :
  Chi-squared approximation may be incorrect
4: In chisq.test(tab, simulate.p.value = simulate, B = nperm) :
  Chi-squared approximation may be incorrect
5: In chisq.test(tab, simulate.p.value = simulate, B = nperm) :
  Chi-squared approximation may be incorrect
6: In chisq.test(tab, simulate.p.value = simulate, B = nperm) :
  Chi-squared approximation may be incorrect
7: In chisq.test(tab, simulate.p.value = simulate, B = nperm) :
  Chi-squared approximation may be incorrect

adespatial documentation built on May 2, 2019, 4:43 p.m.