cov.test.c: A permutation test for assessing the informativeness of a...

Description Usage Arguments Value References Examples

Description

The function implements a powerful statistical test for assessing the association between the p-value and a categorical covariate, exploiting the signal sparsity. This is achieved by testing the association between two categorical variables after dichotomizing the p-values at the lower end. An omnibus-type test is designed to combine evidence through various dichotomization. Permutation is used to assess the statistical significance. We recommend using the covariate if the p-value is highly significant (p < 0.005).

Usage

1
2
3
4
5
6
7
8
cov.test.c(
  pvals,
  covariate,
  cutoffs = quantile(pvals, c(0.001, 0.005, 0.01, 0.05, 0.1, 0.2)),
  perm.no = 999,
  n.max = 1e+05,
  silence = TRUE
)

Arguments

pvals

a numeric vector of p-values.

covariate

a factor of the categorical covariate.

cutoffs

a numeric vector of the cutoff points for dichotomizing the p-values.

perm.no

the number of permutation to assess the significance. Deafult is 999.

n.max

an integer number specifying the maximum number of data points to be included. If the number of data points is larger than n.max, subsampling will be performed.

silence

a logical value indicating whether to print out the process of the computation.

Value

A list with the elements

stat.o

the observed test statistic.

stat.p

a vector of the test statistic from permutation.

p.value

the omnibu p-value for testing the association.

p.cut.optim

the optimal cutoff to dichotomize the p-value.

References

Huang JY, ..., Zhang X, Chen J (2020) Leveraging biological and statistical covariates improves the detection power in epigenome-wide association testing.21(88).

Examples

1
2
3
4
5
data <- simulate.data(feature.no = 1000, covariate.strength = 'Moderate', covariate.model = 'pi0',
	sig.density = 'Low', sig.strength = 'L3', cor.struct = 'None')
X <- factor(data$pi0.var >= median(data$pi0.var))
obj <- suppressWarnings(cov.test.c(data$pvals, X, perm.no = 2)) 
obj$p.value

jchen1981/CAMT documentation built on Jan. 2, 2021, 1:44 p.m.