zwl_test {highDmean} | R Documentation |
High-dimensional two-sample test proposed by Zhang and Wang (2020)
Description
This function implements the test of equal mean for two-sample high-dimension data using the ZWL and ZWLm tests proposed by Zhang and Wang (2020).
Usage
zwl_test(X, Y, order = 0)
Arguments
X |
The data matrix (n by p) from the first population. |
Y |
The data matrix (m by p) from the second population. |
order |
The order of center correction. Possible choices are 0, 2.
To use the ZWLm test, set |
Value
- statistic
The value of the test statistic.
- pvalue
The p-value of the test statistic based on the asymptotic normality established by Zhang and Wang (2020)
- Tn
The average of the squared univariate t-statistics.
- var
The estimated variance of Tn
References
Zhang, H. and Wang, H. (2020). Result consistency of high dimensional two-sample tests applied to gene ontology terms with gene sets. Manuscript in review.
Examples
# Generate a simulated two-sample dataset and apply the ZWL test
data <- buildData(n = 45, m =60, p = 300,
muX = rep(0,300), muY = rep(0,300),
dep = 'IND', S = 1, innov = rnorm)
zwl_test(data[[1]]$X, data[[1]]$Y, order = 2)
# Apply the ZWLm test to a GO term to see if the two groups are differentiately expressed.
# The data for the GO term were stored in GO_example.
zwl_test(GO_example$X, GO_example$Y, order = 0)
# Apply the ZWL test to the GO term
zwl_test(GO_example$X, GO_example$Y, order = 2)