Description Usage Arguments Value References Examples
An Adaptive Sum of Powered Correlation Test (aSPC) with dcor
1 | aSPC_dcor_get_pvals(df1, df2, pow = pow, T0s = T0s)
|
df1, |
first matrix |
df2, |
second matrix |
pow, |
power integer candidates, default c(1:8, Inf) |
T0s, |
A B by length(pow) T statistcs matrix based on B permutations |
Pvalues of SPC and aSPC tests
Xu Z., Pan W. An adaptive and powerful test for two groups of variables with high dimension
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(mvtnorm)
sigma = diag(0.6, 10) + 0.4
n = 260 # sample size
p = 3000; q = 300;
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)
fit = aSPC_dcor_get_pvals(X, Y, pow = c(1:8, Inf), T0s = T_nulls)
fit
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.