Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/Hutcheson_t_test.R
This function performs Hutcheson's t-test for significance of the difference between the diversity indices of two communities.
1 2 3 4 5 6 7 | Hutcheson_t_test(
x,
y,
shannon.base = exp(1),
alternative = "two.sided",
difference = 0
)
|
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. |
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.
A list of class "htest" containing the following components:
statistic: Value of the Hutcheson t-statistic.
parameter: The degrees of freedom of the t-statistic parameter.
p.value: The test's p-value.
estimate: The Shannon diversity indices of x and y.
null.value: The hypothesized value of the difference between the Shannon diversty indexes.
method: Name of the test.
alternative: The alternative hypothesis.
data.name: Name of the data used in the test.
Missing values will be replaced with zero values.
David Ramirez Delgado linfocitoth1@gmail.com.
Hugo Salinas hugosal@comunidad.unam.mx.
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 t.test
in stats package for
t-test.
1 2 3 4 5 6 7 8 9 10 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.