Learn R Programming

MHTdiscrete (version 1.0.1)

MixBonf.p.adjust: The adjusted p-values for Mixed Bonferroni single-step FWER controlling procedure.

Description

The function for calculating the adjusted p-values based on original available p-values and the attaianble p-values for the discrete test statistics.

Usage

MixBonf.p.adjust(pc, pd, pd.set, alpha, make.decision)

Arguments

pc

numeric vector of the available p-values (possibly with NAs) for the continuous test statistics. Any other R is coerced by as.numeric. Same as in p.adjust.

pd

numeric vector of the available p-values (possibly with NAs) for the discrete test statistics. Any other R is coerced by as.numeric. Same as in p.adjust.

pd.set

a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis for discrete data.

alpha

significant level used to compare with adjusted p-values to make decisions, the default value is 0.05.

make.decision

logical; if TRUE, then the output include the decision rules compared adjusted p-values with significant level \(\alpha\)

Value

A numeric vector of the adjusted p-values (of the same length as p) if make.decision = FALSE, or a list including original p-values, adjusted p-values and decision rules if make.decision = TRUE.

References

Zhu, Y., & Guo, W. (2017). Familywise error rate controlling procedures for discrete data arXiv preprint arXiv:1711.08147.

See Also

Tarone.p.adjust, MBonf.p.adjust, p.adjust.

Examples

Run this code
# NOT RUN {
pd <- c(pbinom(1,8,0.5),pbinom(1,5,0.75)); pc <- c(0.04, 0.1)
pd.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75))
MixBonf.p.adjust(pc,pd,pd.set)
## Compare with the traditional Bonferroni adjustment
p.adjust(c(pc,pd),method = "bonferroni")
# }

Run the code above in your browser using DataLab