# FSFDR.indept.p.adjust: Adjusted P-values for Fixed Sequence FDR Controlling... In FixSeqMTP: Fixed Sequence Multiple Testing Procedures

## Description

Given a set of pre-ordered p-values and accuracy for the result, returns adjusted p-values using the generalized fixed sequence multiple testing procedures under independence for true nulls (See Theorem 3.2 and 4.2 in Lynch et al. (2016)). The function also provides an option to make decisions given a pre-specified significant level α.

## Usage

 `1` ```FSFDR.indept.p.adjust(p, alpha=0.05, k=1, tol = 1e-6, 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`. `alpha` significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. `k` pre-specified number of acceptances allowed in the testing procedure (cannot exceed the length of `p`) `tol` desired accuracy. The default value is `1e-6 `. `make.decision` logical; if `TRUE` (default), then the output include the decision rules compared adjusted p-values with significant level alpha

## Details

The generalized fixed sequence FDR controlling procedure stops on the k-th acceptances and automatically accepts the rest of hypotheses, where k is a pre-specified positive integer. When k=1, the generalized procedure becomes conventional one (Theorem 3.2 in Lynch et al. (2016)), which stops testing once one acceptance appears. This method strongly controls FDR if the true null p-values are mutually independent and are independent of the false null p-values. When k=1, the conventional procedure strongly controls FDR if the p-values are negatively associated on the true null p-values.

## Value

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

Yalin Zhu

## References

Lynch, G., Guo, W., Sarkar, S. K., & Finner, H. (2016). The Control of the False Discovery Rate in Fixed Sequence Multiple Testing. arXiv preprint arXiv:1611.03146.

`FSFWER.arbidept.p.adjust` for fixed sequence FWER controlling procedures.
 ```1 2 3 4 5 6 7 8 9``` ```## generate a pre-ordered pvalue vector for 50 hypotheses, where 80% are true nulls set.seed(1234); m <- 50; pi0 <- 0.8; m0 <- m*pi0; m1 <- m-m0 mu <- c(4*0.9^(1:m1), rep(0,m0)) Zstat <- rnorm(n = m, mean = mu) Pval <- 1-pnorm(Zstat) ## conventional fixed sequence procedure FSFDR.indept.p.adjust(p = Pval, alpha = 0.05) ## generalized fixed sequence procedure allowing stop at 5th acceptance FSFDR.indept.p.adjust(p = Pval, alpha = 0.05, k=5) ```