rejection.path | R Documentation |
FDX
objects)Displays the number of rejections of the raw p-values in a FDX
object in dependence of the exceedance probability zeta
.
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,
...
)
x |
object of class " |
xlim |
x axis 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 |
Invisibly returns a stepfun
object that computes the number of
rejections in dependence on the exceedance probability zeta
.
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 with Fisher's exact test
library(DiscreteTests) # for Fisher's exact test
test.results <- fisher_test_pv(df)
raw.pvalues <- test.results$get_pvalues()
pCDFlist <- test.results$get_pvalue_supports()
# DLR without critical values; using extracted p-values and supports
DLR <- DLR(raw.pvalues, pCDFlist)
# plot number of rejections dependent on the exceedance probability zeta
rejection.path(DLR, xlim = c(0, 1), ref.show = TRUE, ref.col = "green", ref.lty = 4)
# None-adaptive DLR without critical values; using test results object
NDLR <- NDLR(test.results)
# add plot for non-adaptive procedure (in red)
rejection.path(NDLR, col = "red", add = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.