aSPC_dcor: 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(df1, df2, pow = pow, B = B)

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

the P-values of SPC and aSPC tests

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
15
16
17
18
19
20
21
22
23
24
25
26
27
library(mvtnorm)
sigma = diag(0.9, 10) + 0.1
n = 200 # sample size
Z = rmvnorm(n=n, mean=rep(0,10), sigma=sigma)
X = rmvnorm(n=n, mean=rep(0,25), sigma=diag(1, 25))
Y = rmvnorm(n=n, mean=rep(0,25), sigma=diag(1, 25))
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
B = 10
a = proc.time()
aSPC_dcor(X, Y, pow = c(1:8, Inf), B = 50)
proc.time() - a

a = proc.time()
aSPC(X, Y, pow = c(1:8, Inf), B = 50, method = "dcor_fast")
proc.time() - a

a = proc.time()
aSPC(X, Y, pow = c(1:8, Inf), B = 50, method = "dcor")
proc.time() - a

a = proc.time()
aSPC_dcor2(X, Y, pow = c(1:8, Inf), B = 2)
proc.time() - a

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