Learn R Programming

highmean (version 3.0)

epval_Sri2008: Empirical Permutation-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 (1996) based on permutation.

Usage

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.

Value

A list including the following elements:

Details

See the details in apval_Sri2008.

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.

See Also

apval_Sri2008

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)
# increase n.iter to reduce Monte Carlo error.
#epval_Sri2008(sam1, sam2, n.iter = 10)

Run the code above in your browser using DataLab