CZZZ {Domean} | R Documentation |
High-Dimensional Two-Sample Mean Test
Description
Conducts a high-dimensional two-sample mean test with optional variable filtering. This function performs both non-studentized and studentized tests to determine whether the means of two groups are significantly different.
Usage
CZZZ(X, Y, m = 2500, filter = TRUE, alpha = 0.05)
Arguments
X |
Matrix representing the first group of data (variables in rows, observations in columns). |
Y |
Matrix representing the second group of data (variables in rows, observations in columns). |
m |
Number of bootstrap samples used for the test (default is 2500). |
filter |
Logical parameter indicating whether to filter variables based on mean differences (default is TRUE). |
alpha |
Significance level for the test (default is 0.05). |
Details
This function performs a high-dimensional two-sample mean test, which is useful when the number of variables (p) is much larger than the number of observations (n). The function includes an optional filtering step to reduce the number of variables based on the difference in means between the two groups.
Value
A list containing the results of the non-studentized and studentized tests. Each result includes:
statistics |
The test statistic. |
p.value |
The p-value of the test. |
alternative |
The alternative hypothesis (two-sided). |
method |
The method description. |
Examples
# Example usage:
library(MASS)
set.seed(123)
X <- matrix(rnorm(1000), nrow = 100, ncol = 10) # 100 variables, 10 observations
Y <- matrix(rnorm(1000, mean = 0.5), nrow = 100, ncol = 10) # Different mean
result <- CZZZ(X, Y, m = 1000, filter = TRUE, alpha = 0.05)
print(result)