# FSmdFWER.arbidept.p.adjust: Adjusted P-values for Fixed Sequence mdFWER Controlling... In FixSeqMTP: Fixed Sequence Multiple Testing Procedures

## 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 arbitrary dependence (See Procedure 1 and Theorem 1 in Grandhi et al. (2016)). The function also provides an option to make decisions and determine the sign given a pre-specified significant level α and the test statistics.

## Usage

 `1` ```FSmdFWER.arbidept.p.adjust(p, test.stat, alpha=0.05, make.decision = TRUE) ```

## Arguments

 `p` numeric vector of p-values (possibly with `NA`s). 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`.

Yalin Zhu

## References

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

`FSmdFWER.indept.p.adjust` for fixed sequence mdFWER controlling procedures under independence.
 ```1 2 3 4``` ```## Clinical trial example in Grandhi et al. (2016) 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.arbidept.p.adjust(p = Pval, test.stat = Zstat, make.decision = TRUE) ```