Description Usage Arguments Details Value References See Also Examples

View source: R/discretePB_fun.R

Apply the [DPB] procedure, with or without computing the critical values, to a set of p-values and their discrete support. A non-adaptive version is available as well. Additionally, the user can choose between exact computation of the Poisson-Binomial distribution or a refined normal approximation.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
discrete.PB(
raw.pvalues,
pCDFlist,
alpha = 0.05,
zeta = 0.5,
adaptive = TRUE,
critical.values = FALSE,
exact = TRUE
)
DPB(
raw.pvalues,
pCDFlist,
alpha = 0.05,
zeta = 0.5,
critical.values = FALSE,
exact = TRUE
)
NDPB(
raw.pvalues,
pCDFlist,
alpha = 0.05,
zeta = 0.5,
critical.values = FALSE,
exact = TRUE
)
``` |

`raw.pvalues` |
vector of the raw observed p-values, as provided by the end user and before matching with their nearest neighbor in the CDFs supports. |

`pCDFlist` |
a list of the supports of the CDFs of the p-values. Each support is represented by a vector that must be in increasing order. |

`alpha` |
the target FDP, a number strictly between 0 and 1. For |

`zeta` |
the target probability of not exceeding the desired FDP, a number strictly between 0 and 1. If |

`adaptive` |
a boolean specifying whether to conduct an adaptive procedure or not. |

`critical.values` |
a boolean. If |

`exact` |
a boolean specifying whether to compute the Poisson-Binomial distribution exactly or by a normal approximation. |

`DPB`

and `NDPB`

are wrapper functions for `discrete.PB`

.
The first one simply passes all its parameters to `discrete.PB`

with
`adaptive = TRUE`

and `NDPB`

does the same with
`adaptive = FALSE`

.

A `FDX`

S3 class object whose elements are:

`Rejected` |
Rejected raw p-values. |

`Indices` |
Indices of rejected hypotheses. |

`Num.rejected` |
Number of rejections. |

`Adjusted` |
Adjusted p-values (only for step-down direction). |

`Critical.values` |
Critical values (if requested). |

`Method` |
A character string describing the used algorithm, e.g. 'Discrete Lehmann-Romano procedure (step-up)'. |

`FDP.threshold` |
FDP threshold |

`Exceedance.probability` |
Probability |

`Data$raw.pvalues` |
The values of |

`Data$pCDFlist` |
The values of |

`Data$data.name` |
The respective variable names of |

S. Döhler and E. Roquain (2019). Controlling False Discovery Exceedance for Heterogeneous Tests. arXiv:1912.04607v1.

`kernel`

, `FDX-package`

, `continuous.LR`

,
`continuous.GR`

, `discrete.LR`

,
`discrete.GR`

, `weighted.LR`

,
`weighted.GR`

, `weighted.PB`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ```
X1 <- c(4, 2, 2, 14, 6, 9, 4, 0, 1)
X2 <- c(0, 0, 1, 3, 2, 1, 2, 2, 2)
N1 <- rep(148, 9)
N2 <- rep(132, 9)
Y1 <- N1 - X1
Y2 <- N2 - X2
df <- data.frame(X1, Y1, X2, Y2)
df
# Construction of the p-values and their supports (fisher.pvalues.support
# is from 'DiscreteFDR' package!)
df.formatted <- fisher.pvalues.support(counts = df, input = "noassoc")
raw.pvalues <- df.formatted$raw
pCDFlist <- df.formatted$support
DPB.fast <- DPB(raw.pvalues, pCDFlist)
summary(DPB.fast)
DPB.crit <- DPB(raw.pvalues, pCDFlist, critical.values = TRUE)
summary(DPB.crit)
NDPB.fast <- NDPB(raw.pvalues, pCDFlist)
summary(NDPB.fast)
NDPB.crit <- NDPB(raw.pvalues, pCDFlist, critical.values = TRUE)
summary(NDPB.crit)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.