rejection.path {FDX} | R Documentation |
Rejection Path Plot (for FDX
objects)
Description
Displays the number of rejections of the raw p-values in a FDX
object in dependence of the exceedance probability zeta
.
Usage
rejection.path(
x,
xlim = NULL,
ylim = NULL,
main = NULL,
xlab = expression(zeta),
ylab = "Number of Rejections",
verticals = FALSE,
pch = 19,
ref.show = FALSE,
ref.col = "gray",
ref.lty = 2,
ref.lwd = 2,
...
)
Arguments
x |
an object of class " |
xlim |
the x limits of the plot. If |
ylim |
the y limits of the plot. If |
main |
main title. If |
xlab , ylab |
labels for x and y axis. |
verticals |
logical; if |
pch |
jump point character. |
ref.show |
logical; if |
ref.col |
color of the reference line. |
ref.lty , ref.lwd |
line type and thickness for the reference line. |
... |
further arguments to |
Value
Invisibly returns a stepfun
object that computes the number of
rejectionsin dependence on the exceedance probability zeta
.
Examples
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
DLR <- DLR(raw.pvalues, pCDFlist)
NDLR <- NDLR(raw.pvalues, pCDFlist)
rejection.path(DLR, xlim = c(0, 1), ref.show = TRUE, ref.col = "green", ref.lty = 4)
rejection.path(NDLR, col = "red", add = TRUE)