aSPC_dcor_get_Tstat: An Adaptive Sum of Powered Correlation Test (aSPC) with dcor

Description Usage Arguments Value References Examples

Description

An Adaptive Sum of Powered Correlation Test (aSPC) with dcor

Usage

1
aSPC_dcor_get_Tstat(df1, df2, pow = pow, B = B, show_b = FALSE)

Arguments

df1,

first matrix

df2,

second matrix

pow,

power integer candidates, default c(1:8, Inf)

B,

number of permutations to calculate a P-value

Value

A B by length(pow) T statistcs matrix based on B permutations

References

Xu Z., Pan W. An adaptive and powerful test for two groups of variables with high dimension

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(mvtnorm)
sigma = diag(0.6, 10) + 0.4
n = 200 # sample size
p = 5; q = 5;

Z = rmvnorm(n=n, mean=rep(0,10), sigma=sigma)
X = rmvnorm(n=n, mean=rep(0,p), sigma=diag(1, p))
Y = rmvnorm(n=n, mean=rep(0,q), sigma=diag(1, q))
X = as.data.frame(cbind(Z[,1:5], X))
Y = as.data.frame(cbind(Z[,6:10], Y))
dim(X)
dim(Y)
set.seed(123) # to ensure we can replicate the permutation P-value
T_nulls = aSPC_dcor_get_Tstat(X, Y, pow = c(1:8, Inf), B = 100, show_b = T)

jasonzyx/aSPC documentation built on May 18, 2019, 5:55 p.m.