cramp.statistic: CRAMP test statistic

View source: R/cramp_statistic.R

cramp.statisticR Documentation

CRAMP test statistic

Description

This function computes the test statistic based on random projections and the Hotelling's T^2 test statistic.

Usage

cramp.statistic(
  x,
  y = NULL,
  nrep = 1000,
  m = 1,
  parallel = TRUE,
  ncores = NULL
)

Arguments

x

data matrix of first group with rows representing samples and columns representing variables.

y

data matrix of second group with same number of columns as x. If not provided (default value is NULL), then the one-sample tests are performed as specified.

nrep

number of repetitions for each average of pvalues

m

Dimension to randomly project the data (Default value is 1)

parallel

Logical variable - whether to parallelize or not (default is TRUE)

ncores

Number of cores to use (If NULL and parallel is TRUE, use 75% of all cores). If parallel = FALSE, this argument will be ignored.

Value

The average p-value based on nrep bootstrap random projections.

Examples

## Not run: 
     x = rmvnorm(n = 20, mean = numeric(1000), sigma = diag(runif(1000)))
     y = rmvnorm(n = 20, mean = numeric(1000), sigma = diag(runif(1000)))
     cramp.statistic(x, y, m = 5)

## End(Not run)

dnayyala/cramp documentation built on June 27, 2023, 1:34 p.m.