Learn R Programming

GraphRankTest (version 0.1)

GraphRankTest: GraphRankTest: Rank-based Two-Sample Tests via Graph/Similarity-Induced Ranks

Description

The GraphRankTest package implements the RISE framework for two-sample testing using rank/graph matrices constructed from either raw data \(X, Y\) or a pre-computed similarity matrix \(S\).

Arguments

Main function

  • RISE(): construct a nonnegative symmetric rank/graph matrix \(R\) (k-NN, k-MST, or minimum-distance pairing variants), and compute a Hotelling-type quadratic statistic with asymptotic and optional permutation p-values.

Method overview

From a similarity matrix \(S\), the procedure builds \(R\) using one of:

  • RgNN / RoNN: k-nearest-neighbor graph (graph-induced ranks vs. overall ranks)

  • RgMST / RoMST: k-minimum spanning trees (graph-induced ranks vs. overall ranks)

  • RoMDP: k-minimum-distance non-bipartite matchings (overall ranks)

Let \(U_x=\sum_{i,j\in X}R_{ij}\), \(U_y=\sum_{i,j\in Y}R_{ij}\). Under the permutation null, the centered vector \((U_x,U_y)\) has a tractable covariance, yielding a chi-square(2) limiting test.

Getting started

library(GraphRankTest)
?RISE
help(package = "GraphRankTest")

Author

Maintainer: Doudou Zhou ddzhou@nus.edu.sg (ORCID)

Authors:

References

Zhou, D. and Chen, H. (2023). A new ranking scheme for modern data and its application to two-sample hypothesis testing. In COLT 2023, PMLR, 3615–3668.

See Also

RISE