Learn R Programming

FixSeqMTP (version 0.1.2)

FSmdFWER.indept.p.adjust: Adjusted P-values for Fixed Sequence mdFWER Controlling Procedure under Independence Along with Directional Decisions Regarding Parameters of Interest

Description

Given a set of pre-ordered test statistics and the corresponding p-values, returns adjusted p-values using the directional fixed sequence multiple testing procedures under independence (See Procedure 2 and Theorem 2 in Grandhi et al. (2016)). The function also provides an option to make decisions and determine the sign given a pre-specified significant level $\alpha$ and the test statistics.

Usage

FSmdFWER.indept.p.adjust(p, test.stat, alpha=0.05, make.decision = TRUE)

Arguments

p
numeric vector of p-values (possibly with NAs). Any other R is coerced by as.numeric. Same as in p.adjust.
test.stat
numeric vector of test statistics, which are used to determine the direction of decisions, with the same length of p.
alpha
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05.
make.decision
logical; if TRUE (default), then the output include the decision rules compared adjusted p-values with significant level $alpha$, and directions of the decision based on the sign of test statistics.

Value

A numeric vector of the adjusted p-values (of the same length as p) if make.decision = FALSEALSE, or a data frame including original p-values, adjusted p-values, test statistics and directional decision rules if make.decision = TRUE.

References

Grandhi, A., Guo, W., & Romano, J. P. (2016). Control of Directional Errors in Fixed Sequence Multiple Testing. arXiv preprint arXiv:1602.02345.

See Also

FSmdFWER.indept.p.adjust for fixed sequence mdFWER controlling procedures under independence.

Examples

Run this code
## Clinical trial example in Grandhi et al. (2015)
Pval <- c(0.0008, 0.0135, 0.0197, 0.7237, 0.0003, 0.2779, 0.0054, 0.8473)
Zstat <- c(3.4434, 2.5085, 2.3642, -0.3543, 3.7651, 1.0900, 2.8340, 0.1930)
FSmdFWER.indept.p.adjust(p = Pval, test.stat = Zstat, make.decision = TRUE)

Run the code above in your browser using DataLab