Description Usage Arguments Details Value
View source: R/hypothesis_test.R
hypothesis_test
performs Mann-Witney U test, using
wilcox.test
for each OTU in the data frame d
. Each level
of group
, excluding the base_group
level, is tested against the
base_group
level at an alpha level of 0.05 for evidence against the
null hypothesis that distributions of the the normalized counts for
base_group
and the tested group do not differ by a location shift. The
alternative is two-sided.
1 2 | hypothesis_test(d, group, otuname_col = "bug", value_col = "value",
base_group = "Control", alpha = 0.05)
|
d |
Data frame of data. |
group |
Name of data frame column containing the group information. |
otuname_col |
Name of data frame column containing OTU names. |
value_col |
Name of column containing normalized proportions for each of the otunames. |
base_group |
Name of the level in |
alpha |
alpha level to conduct the Mann-Witney U test. |
The data frame d is assumed to be in long format.
the same input data frame d, but with a new column called "changed".
This column is a factor with three levels: "no change" if the hypothesis test
was not significant, and either "decreased" or "increased" if the test was
significant. The sign of the change is calculated by the difference in means
for data from the tested group and data from the base_group
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.