GHT: Generalized Hoteling's test

Description Usage Arguments Value Examples

Description

The fuction tests whether the mean of X is differnt from u, a hypothesized population average. GHT replaces the sample covariance matrix in classical Hoteling's test with a shrinkage based (positve definite) covariance matrix. Significance is evaluated via permuation. The method is designed for paired microbiome studies, in which X is the paired differences after log-ratio transformation. However, the method is equally applicable to other high dimensional settings.

Usage

1
GHT(X, u = 0, nsim = 1000, target = "equal", centered = F)

Arguments

X

n x p matrix of numerical variables

u

a vector of numerical variables indicating the true value of the mean

nsim

number of permutations.

target

target matrix for covariance estimate. "equal": diagonal matrix with equal diagonal element;"unequal", diagonal matrix with unequal diagonal element;"identity": identity matrix

Value

p value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(1)
n=10; p=100
dat = matrix(rnorm(n*p),n,p)
test1 = GHT(dat)
# A test similar to paired microbiome data
set.seed(1)
dat1 = matrix(rbinom(n*p, size = 1000,  0.005),n,p)
dat2 = matrix(rbinom(n*p, size = 1000,  0.005),n,p)
X1 = getCLR(dat1); X2 = getCLR(dat2)
X = X1 - X2
test2 = GHT(X)

zhaoni153/GHT documentation built on May 14, 2019, 10:37 p.m.