epval_Bai1996: Empirical Permutation-Based p-value of the Test Proposed by...

Description Usage Arguments Details Value Note References See Also Examples

Description

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

Usage

1
epval_Bai1996(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_Bai1996.

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 Bai and Saranadasa (1996).

Note

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

References

Bai ZD and Saranadasa H (1996). "Effect of high dimension: by an example of a two sample problem." Statistica Sinica, 6(2), 311–329.

See Also

apval_Bai1996

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_Bai1996(sam1, sam2, n.iter = 10)

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