MeanMax {TOSI}R Documentation

Data splitting-based two-stage maximum mean testing method for the mean vector.

Description

Conduct the simultaneous inference for a set of mean components in the NUll hypothesises H01 that assumes the set of mean components are all zeroes.

Usage

  MeanMax(X, test.set, Nsplit = 5,frac.size=0.5, standardized=FALSE,alpha=0.05, seed=1)

Arguments

X

a n-by-p matrix, the observed data

test.set

a positive vector with values between 1 and p, the set of H01.

Nsplit

a positive integer, the random split times used, default as 5.

frac.size

a positive real between 0 and 1, the proportion of the sample used in stage I.

standardized

a logical value, whether standerdize variables in stage I.

alpha

a positive real, the significant level.

seed

a non-negative integer, the random seed.

Value

return a vector with names 'CriticalValue', 'TestStatistic', 'reject_status', 'p-value' if Nsplit=1, and 'reject_status' and 'adjusted_p-value' if Nsplit>1.

Note

nothing

Author(s)

Liu Wei

See Also

gendata_Mean

Examples

  ### Example
  n <- 100; p <- 100;i <- 1
  s0 <- 5 # First five components are nonzeros
  rho <- 1; tau <- 1;
  dat1 <- gendata_Mean(n, p, s0, seed=i, rho, tau)
  # ex1: H01 is false
  MeanMax(dat1$X, 1:p)
  MeanMax(dat1$X, 1:p, Nsplit=1)
  # ex1: H01 is true
  MeanMax(dat1$X, p)
  MeanMax(dat1$X, p, Nsplit=1)

[Package TOSI version 0.3.0 Index]