Description Usage Arguments Details Value Note References See Also Examples

Calculates p-value of the test for testing equality of two-sample high-dimensional mean vectors proposed by Cai et al (2014) based on permutation or parametric bootstrap resampling.

1 2 | ```
epval_Cai2014(sam1, sam2, eq.cov = TRUE, n.iter = 1000, cov1.est, cov2.est,
bandwidth1, bandwidth2, cv.fold = 5, norm = "F", seeds)
``` |

`sam1` |
an n1 by p matrix from sample population 1. Each row represents a |

`sam2` |
an n2 by p matrix from sample population 2. Each row represents a |

`eq.cov` |
a logical value. The default is |

`n.iter` |
a numeric integer indicating the number of permutation/resampling iterations. The default is 1,000. |

`cov1.est` |
This and the following arguments are only effective when |

`cov2.est` |
a consistent estimate of the covariance matrix of sample population 2 when |

`bandwidth1` |
a vector of nonnegative integers indicating the candidate bandwidths to be used in the banding approach (Bickel and Levina, 2008) for estimating the covariance of sample population 1 when |

`bandwidth2` |
similar with the argument |

`cv.fold` |
an integer greater than or equal to 2 indicating the fold of cross-validation. The default is 5. See page 211 in Bickel and Levina (2008). |

`norm` |
a character string indicating the type of matrix norm for the calculation of risk function in cross-validation. This argument will be passed to the |

`seeds` |
a vector of seeds for each permutation or parametric bootstrap resampling iteration; this is optional. |

See the details in `apval_Cai2014`

.

A list including the following elements:

`sam.info` |
the basic information about the two groups of samples, including the samples sizes and dimension. |

`opt.bw1` |
the optimal bandwidth determined by the cross-validation when |

`opt.bw2` |
the optimal bandwidth determined by the cross-validation when |

`cov.assumption` |
the equality assumption on the covariances of the two sample populations; this was specified by the argument |

`method` |
this output reminds users that the p-values are obtained using permutation or parametric bootstrap resampling. |

`pval` |
the p-value of the test proposed by Cai et al (2014). |

This function does not transform the data with their precision matrix (see Cai et al, 2014). To calculate the p-value of the test statisic with transformation, users can input transformed samples to `sam1`

and `sam2`

.

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

Cai TT, Liu W, and Xia Y (2014). "Two-sample test of high dimensional means under dependence." *Journal of the Royal Statistical Society: Series B (Statistical Methodology)*, **76**(2), 349–372.

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
#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_Cai2014(sam1, sam2, n.iter = 10)
# the two sample populations have different covariances
#true.cov1 <- 0.2^(abs(outer(1:p, 1:p, "-")))
#true.cov2 <- 0.6^(abs(outer(1:p, 1:p, "-")))
#sam1 <- mvrnorm(n = n1, mu = mu1, Sigma = true.cov1)
#sam2 <- mvrnorm(n = n2, mu = mu2, Sigma = true.cov2)
# increase n.iter to reduce Monte Carlo error
#epval_Cai2014(sam1, sam2, eq.cov = FALSE, n.iter = 10,
# bandwidth1 = 10, bandwidth2 = 10)
``` |

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.