truh {truh}R Documentation

TRUH test statistic

Description

TRUH test statistic for nonparametric two sample testing under heterogeneity.

Usage

truh(V, U, B, fc = 1, ncores = 2, seed = 1)

Arguments

V

m×dm\times d matrix where mm represents the sample size and dd is the dimension of each sample.

U

a n×dn\times d matrix where nn represents the sample size and dd is the dimension of each sample with mnm\ll n.

B

number of bootstrap samples.

fc

fold change constant. The default value is 1. See equation (2.8) of the referenced paper for more details.

ncores

the number of computing cores available. The default value is 2.

seed

random seed for replicability. The default value is 1.

Value

  1. teststat - TRUH test statistic.

  2. k.hat - number of clusters detected in the uninfected sample.

  3. pval - The maximum p-value across the detected clusters.

  4. pval_all - p-value for each cluster.

  5. dist.null_all - the approximate bootstrapped based null distribution.

References

Banerjee, Trambak, Bhaswar B. Bhattacharya, and Gourab Mukherjee. "A nearest-neighbor based nonparametric test for viral remodeling in heterogeneous single-cell proteomic data." The Annals of Applied Statistics 14, no. 4 (2020): 1777-1805.

See Also

nearest

Examples

library(truh)
n = 500
m = 10
d = 3
set.seed(1)
V = matrix(rnorm(m*d),nrow=m,ncol=d)
set.seed(2)
U = matrix(rnorm(n*d),nrow=n,ncol=d)
out = truh(V,U,100)


[Package truh version 1.0.0 Index]