Learn R Programming

ALDEx2 (version 1.4.0)

aldex.ttest: calculate Welch's t-test and Wilcoxon test statistics

Description

calculates expected values of the Welch's t-test and Wilcoxon rank test on the data returned by clr_function.r

Usage

aldex.ttest(clr, conditions, paired.test = FALSE, hist.plot=FALSE)

Arguments

clr
clr is the data output of the aldex.clr function
conditions
a description of the data structure to be used for testing
paired.test
whether the Welch's test should be paired or not
hist.plot
whether to plot a histogram of P values for an individual Dirichlet Monte-Carlo instance. Plot is output to the standard R plotting device.

Value

Outputs a dataframe with the following information:
we.ep
a vector containing the expected P value of the Welch's t-test for each feature
we.eBH
a vector containing the expected value of the Benjamini Hochberg corrected P value for each feature
wi.ep
a vector containing the expected P value of the Wilcoxon test for each feature
wi.eBH
a vector containing the expected value of the Benjamini Hochberg corrected P value for each feature

Details

An explicit example for two conditions is shown in the `Examples' below.

References

Please use the citation given by citation(package="ALDEx").

See Also

aldex.clr, aldex.glm, aldex.effect, selex

Examples

Run this code
    # x is the output of the \code{x <- aldex.clr(data, mc.samples)} function
    # conditions is a description of the data
    # for the selex dataset, conditions <- c(rep("N", 7), rep("S", 7))
    data(selex)
    x <- aldex.clr(selex, mc.samples=2)
    conditions <- c(rep("N", 7), rep("S", 7))
    ttest.test <- aldex.ttest(x, conditions)

Run the code above in your browser using DataLab