TwoSampleTest.HD: An R Package for the Two-Sample Problem with High-Dimensional Data

Marta Cousido‐Rocha, Jacobo de Uña‐Álvarez · The R Journal · 2023

The two-sample problem refers to the comparison of two probability distributions via two independent samples. With high-dimensional data, such comparison is performed along a large number $p$ of possibly correlated variables or outcomes. In genomics, for instance, the variables may represent gene expression levels for $p$ locations, recorded for two (usually small) groups of individuals. In this paper we introduce [TwoSampleTest.HD](https://CRAN.R-project.org/package=TwoSampleTest.HD), a new `R` package to test for the equal distribution of the $p$ outcomes. Specifically, TwoSampleTest.HD implements the tests recently proposed by [@Marta2] for the low sample size, large dimensional setting. These tests take the possible dependence among the $p$ variables into account, and work for sample sizes as small as two. The tests are based on the distance between the empirical characteristic functions of the two samples, when averaged along the $p$ locations. Different options to estimate the variance of the test statistic under dependence are allowed. The package TwoSampleTest.HD provides the user with individual permutation $p$-values too, so feature discovery is possible when the null hypothesis of equal distribution is rejected. We illustrate the usage of the package through the analysis of simulated and real data, where results provided by alternative approaches are considered for comparison purposes. In particular, benefits of the implemented tests relative to ordinary multiple comparison procedures are highlighted. Practical recommendations are given.

Read the paper · More papers on PaperTik