Learn R Programming

highmean (version 2.0)

apval_Sri2008: Asymptotics-Based p-value of the Test Proposed by Srivastava and Du (2008)

Description

Calculates p-value of the test for testing equality of two-sample high-dimensional mean vectors proposed by Srivastava and Du (2008) based on the asymptotic distribution of the test statistic.

Usage

apval_Sri2008(sam1, sam2)

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.

Value

  • A list including the following elements:
  • sam.infothe basic information about the two groups of samples, including the samples sizes and dimension.
  • cov.assumptionthis output reminds users that the two sample populations have a common covariance matrix.
  • methodthis output reminds users that the p-values are obtained using the asymptotic distributions of test statistics.
  • pvalthe p-value of the test proposed by Srivastava and Du (2008).

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 two groups share a common covariance matrix. The primary object is to test $H_{0}: \mu_1 = \mu_2$ versus $H_{A}: \mu_1 \neq \mu_2$. Let $\bar{X}_{k}$ be the sample mean for group $k = 1, 2$. Also, let $S = n^{-1} \sum_{k = 1}^{2} \sum_{i = 1}^{n_{k}} (X_{ki} - \bar{X}_k) (X_{ki} - \bar{X}_k)^T$ be the pooled sample covariance matrix from the two groups. Srivastava and Du (2008) proposed the following test statistic: $$T_{SD} = \frac{(n_1^{-1} + n_2^{-1})^{-1} (\bar{X}_1 - \bar{X}_2)^T D_S^{-1} (\bar{X}_1 - \bar{X}_2) - (n - 2)^{-1} n p}{\sqrt{2 (tr R^2 - p^2 n^{-1}) c_{p, n}}},$$ where $D_S = diag (s_{11}, s_{22}, ..., s_{pp})$, $s_{ii}$'s are the diagonal elements of $S$, $R = D_S^{-1/2} S D_S^{-1/2}$ is the sample correlation matrix and $c_{p, n} = 1 + tr R^2 p^{-3/2}$. This test statistic follows normal distribution under the null hypothesis.

References

Srivastava MS and Du M (2008). "A test for the mean vector with fewer observations than the dimension." Journal of Multivariate Analysis, 99(3), 386--402.

Examples

Run this code
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)
apval_Sri2008(sam1, sam2)

Run the code above in your browser using DataLab