Hutcheson_t_test {ecolTest}R Documentation

Hutcheson's t-test for two diversity indices.

Description

This function performs Hutcheson's t-test for significance of the difference between the diversity indices of two communities.

Usage

Hutcheson_t_test(
  x,
  y,
  shannon.base = exp(1),
  alternative = "two.sided",
  difference = 0
)

Arguments

x, y

Numeric vectors of abundance of species for community sample x and community sample y.

shannon.base

A numeric value indicating the logarithm base for the Shannon indices. Defaults to exp(1).

alternative

A character indicating the alternative hypothesis. Can be "two.sided"(default), "less", "greater", or "auto".

difference

A numeric value indicating the hypothesized difference between the diversity indexes. Defaults to 0.

Details

This function performs Hutcheson's t-test for comparing two sample's Shannon diversity indices. This test is based on Shannon diversity indices computed using a logarithm base specified by the user. One-sided and two-sided tests are available.

Value

A list of class "htest" containing the following components:

Note

Missing values will be replaced with zero values.

Author(s)

David Ramirez Delgado linfocitoth1@gmail.com.

Hugo Salinas hugosal@comunidad.unam.mx.

References

Zar, Jerrold H. 2010. Biostatistical Analysis. 5th ed. Pearson. pp. 174-176.

Hutcheson, Kermit. 1970. A Test for Comparing Diversities Based on the Shannon Formula. Journal of Theoretical Biology 29: 151-54.

See Also

See t.test in stats package for t-test.

Examples

data("polychaeta_abundance")
# two-sided test
Hutcheson_t_test(x=polychaeta_abundance$Sample.1,
                 y=polychaeta_abundance$Sample.2,
                 shannon.base = 10)
# one-sided test
Hutcheson_t_test(x=polychaeta_abundance$Sample.1,
                 y=polychaeta_abundance$Sample.2,
                 shannon.base = 10,
                 alternative = "greater")

[Package ecolTest version 0.0.1 Index]