cpval_aSPU: Permutation-And-Asymptotics-Based p-values of the SPU and...

Description Usage Arguments Details Value Note References See Also Examples

Description

Calculates p-values of the sum-of-powers (SPU) and adaptive SPU (aSPU) tests based on the combination of permutation method and asymptotic distributions of the test statistics (Xu et al, 2016).

Usage

1
cpval_aSPU(sam1, sam2, pow = c(1:6, Inf), n.iter = 1000, seeds)

Arguments

sam1

an n1 by p matrix from sample population 1. Each row represents a p-dimensional sample.

sam2

an n2 by p matrix from sample population 2. Each row represents a p-dimensional sample.

pow

a numeric vector indicating the candidate powers γ in the SPU tests. It should contain Inf and both odd and even integers. The default is c(1:6, Inf).

n.iter

a numeric integer indicating the number of permutation iterations for calculating the means, variances, covariances of SPU test statistics' asymptotic distributions. The default is 1,000.

seeds

a vector of seeds for each permutation iteration; this is optional.

Details

Suppose that the two groups of p-dimensional independent and identically distributed samples \{X_{1i}\}_{i=1}^{n_1} and \{X_{2j}\}_{j=1}^{n_2} are observed; we consider high-dimensional data with p \gg n := n_1 + n_2 - 2. Assume that the covariances of the two sample populations are Σ_1 = (σ_{1, ij}) and Σ_2 = (σ_{2, ij}). The primary object is to test H_{0}: μ_1 = μ_2 versus H_{A}: μ_1 \neq μ_2. Let \bar{X}_{k} be the sample mean for group k = 1, 2. For a vector v, we denote v^{(i)} as its ith element.

For any 1 ≤ γ < ∞, the sum-of-powers (SPU) test statistic is defined as:

L(γ) = ∑_{i = 1}^{p} (\bar{X}_1^{(i)} - \bar{X}_2^{(i)})^γ.

For γ = ∞,

L (∞) = \max_{i = 1, …, p} (\bar{X}_1^{(i)} - \bar{X}_2^{(i)})^2/(σ_{1,ii}/n_1 + σ_{2,ii}/n_2).

The adaptive SPU (aSPU) test combines the SPU tests and improve the test power:

T_{aSPU} = \min_{γ \in Γ} P_{SPU(γ)},

where P_{SPU(γ)} is the p-value of SPU(γ) test, and Γ is a candidate set of γ's. Note that T_{aSPU} is no longer a genuine p-value.

The asymptotic properties of the SPU and aSPU tests are studied in Xu et al (2016). When using the theoretical means, variances, and covarainces of L (γ) to calculate the p-values of SPU and aSPU tests (1 ≤ γ < ∞), the high-dimensional covariance matrix of the samples needs to be consistently estimated; such estimation is usually time-consuming.

Alternatively, assuming that the two sample groups have same covariance, the permutation method can be applied to efficiently estimate the means, variances, and covarainces of L (γ)'s asymptotic distributions, which then yield the p-values of SPU and aSPU tests based on the combination of permutation method and asymptotic distributions.

Value

A list including the following elements:

sam.info

the basic information about the two groups of samples, including the samples sizes and dimension.

pow

the powers γ used for the SPU tests.

spu.stat

the observed SPU test statistics.

spu.e

the asymptotic means of SPU test statistics with finite γ under the null hypothesis.

spu.var

the asymptotic variances of SPU test statistics with finite γ under the null hypothesis.

spu.corr.odd

the asymptotic correlations between SPU test statistics with odd γ.

spu.corr.even

the asymptotic correlations between SPU test statistics with even γ.

cov.assumption

the equality assumption on the covariances of the two sample populations; this reminders users that cpval_aSPU() assumes that the two sample groups have same covariance.

method

this output reminds users that the p-values are obtained using the asymptotic distributions of test statistics.

pval

the p-values of the SPU tests and the aSPU test.

Note

The permutation technique assumes that the distributions of the two sample populations are the same under the null hypothesis.

References

Bickel PJ and Levina E (2008). "Regularized estimation of large covariance matrices." The Annals of Statistics, 36(1), 199–227.

Pan W, Kim J, Zhang Y, Shen X, and Wei P (2014). "A powerful and adaptive association test for rare variants." Genetics, 197(4), 1081–1095.

Pourahmadi M (2013). High-Dimensional Covariance Estimation. John Wiley & Sons, Hoboken, NJ.

Xu G, Lin L, Wei P, and Pan W (2016). "An adaptive two-sample test for high-dimensional means." Biometrika, 103(3), 609–624.

See Also

apval_aSPU, epval_aSPU

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(MASS)
set.seed(1234)
n1 <- n2 <- 50
p <- 200
mu1 <- rep(0, p)
mu2 <- mu1
mu2[1:10] <- 0.2
true.cov <- 0.4^(abs(outer(1:p, 1:p, "-"))) # AR1 covariance
sam1 <- mvrnorm(n = n1, mu = mu1, Sigma = true.cov)
sam2 <- mvrnorm(n = n2, mu = mu2, Sigma = true.cov)
cpval_aSPU(sam1, sam2, n.iter = 100)

Example output

Loading required package: mvtnorm
$sam.info
 n1  n2   p 
 50  50 200 

$pow
[1]   1   2   3   4   5   6 Inf

$spu.stat
        1         2         3         4         5         6       Inf 
4.6822264 7.8050779 0.4105027 0.9004957 0.1007508 0.1609131 0.3382633 

$spu.e
          1           2           3           4           5           6 
-0.23923112  7.99985462 -0.09213889  0.95736267 -0.02843553  0.18780008 

$spu.var
           1            2            3            4            5            6 
16.266681073  0.917319659  0.344448920  0.056393198  0.024055848  0.007403876 

$spu.corr.odd
          1         3         5
1 1.0000000 0.8795804 0.6886379
3 0.8795804 1.0000000 0.9211705
5 0.6886379 0.9211705 1.0000000

$spu.corr.even
          2         4         6
2 1.0000000 0.8736426 0.6432675
4 0.8736426 1.0000000 0.9226829
6 0.6432675 0.9226829 1.0000000

$cov.assumption
[1] "the two groups have same covariance"

$method
[1] "combination of permutation method and asymptotic distributions"

$pval
    SPU_1     SPU_2     SPU_3     SPU_4     SPU_5     SPU_6   SPU_Inf      aSPU 
0.2223750 0.5805752 0.3917555 0.5946286 0.4048868 0.6226595 0.5106119 0.7300268 

highmean documentation built on May 2, 2019, 3:45 p.m.