epval_Sri2008: Empirical Permutation-Based p-value of the Test Proposed by... In highmean: Two-Sample Tests for High-Dimensional Mean Vectors

Description

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

Usage

 `1` ```epval_Sri2008(sam1, sam2, 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. `n.iter` a numeric integer indicating the number of permutation iterations. The default is 1,000. `seeds` a vector of seeds for each permutation or parametric bootstrap resampling iteration; this is optional.

Details

See the details in `apval_Sri2008`.

Value

A list including the following elements:

 `sam.info` the basic information about the two groups of samples, including the samples sizes and dimension. `cov.assumption` this output reminds users that the two sample populations have a common covariance matrix. `method` this output reminds users that the p-values are obtained using permutation. `pval` the p-value of the test proposed by Srivastava and Du (2008).

Note

The permutation technique assumes that the distributions of the two sample populations are the same 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.

`apval_Sri2008`

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```#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) # increase n.iter to reduce Monte Carlo error. #epval_Sri2008(sam1, sam2, n.iter = 10) ```

Example output

```Loading required package: mvtnorm
```

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