Learn R Programming

rgTest (version 0.1)

Robust Graph-Based Two-Sample Test

Description

Useful tools for determining whether two samples are from the same distribution. Utilizes a robust method to address the problematic structure of the similarity graph constructed from high-dimensional data. The method is provided in Yichuan Bai and Lynna Chu (2023) .

Copy Link

Version

Install

install.packages('rgTest')

Monthly Downloads

176

Version

0.1

License

MIT + file LICENSE

Maintainer

Yichuan Bai

Last Published

August 14th, 2023

Functions in rgTest (0.1)

theo_mu_sig

get analytic expressions of expectations, variances and covariances
rg.test

Robust graph-based two sample test
asy_gen

get the approximate test statistic and p-value based on asymptotic theory using robust generalized edge-count test
weiMax

Weighted function
example0

Example
asy_max

get the approximate test statistic and p-value based on asymptotic theory using robust max-type edge-count test
asy_wei

get the approximate test statistic and p-value based on asymptotic theory using robust weighted edge-count test
weighted_R1R2

get weighted within-sample edge-counts and between-sample edge-counts
getdis

Get distance matrix
permu_max

get the test statistic and p-value based on permutation using robust max-type edge-count test
permu_wei

get the test statistic and p-value based on permutation using robust weighted edge-count test
kmst

construct k-mst
weiGeo

Weighted function
weiArith

Weighted function
permu_gen

get the test statistic and p-value based on permutation using robust generalized edge-count test
permu_edge

get lists of permuted weighted within-sample edge-counts and between-sample edge-counts