discrete_FWER {DiscreteFWER} | R Documentation |
Discrete Family-wise Error Rate (FWER) Adaptation Procedures
Description
Apply a discrete FWER adaptation procedure, with or without computing the critical values, to a set of p-values and their discrete support.
Usage
discrete_FWER(test_results, ...)
## Default S3 method:
discrete_FWER(
test_results,
pCDFlist,
alpha = 0.05,
independence = FALSE,
single_step = FALSE,
critical_values = FALSE,
select_threshold = 1,
pCDFlist_indices = NULL,
...
)
## S3 method for class 'DiscreteTestResults'
discrete_FWER(
test_results,
alpha = 0.05,
independence = FALSE,
single_step = FALSE,
critical_values = FALSE,
select_threshold = 1,
...
)
Arguments
test_results |
either a numeric vector with |
... |
further arguments to be passed to or from other methods. They are ignored here. |
pCDFlist |
list of the supports of the CDFs of the |
alpha |
single real number strictly between 0 and 1 indicating the target FWER level. |
independence |
single boolean specifying whether the |
single_step |
single boolean specifying whether to perform a single-step ( |
critical_values |
single boolean specifying whether critical constants are to be computed. |
select_threshold |
single real number strictly between 0 and 1 indicating the largest raw |
pCDFlist_indices |
list of numeric vectors containing the test indices that indicate to which raw |
Details
Computing critical constants (critical_values = TRUE
) requires considerably
more execution time, especially if the number of unique supports is large.
We recommend that users should only have them calculated when they need them,
e.g. for illustrating the rejection set in a plot or other theoretical
reasons. Setting (critical_values = FALSE
) is sufficient for obtaining
rejection decisions and adjusted p
-values.
Depending on the choices of independence
and single_step
, one of the
following procedures, is applied:
single-step | stepwise | |
independent | Šidák | Hochberg (step-up) |
not independent | Bonferroni | Holm (step-down) |
Each procedure is available by its own shortcut function:
single-step | stepwise | |
independent | DSidak() | DHochberg() |
not independent | DBonferroni() | DHolm() |
Value
A DiscreteFWER
S3 class object whose elements are:
Rejected |
rejected raw |
Indices |
indices of rejected hypotheses. |
Num_rejected |
number of rejections. |
Adjusted |
adjusted |
Critical_constants |
critical values (only exists if computations where performed with |
Data |
list with input data. |
Data$Method |
character string describing the performed algorithm, e.g. 'Discrete Bonferroni procedure'. |
Data$Raw_pvalues |
observed |
Data$pCDFlist |
list of the |
Data$FWER_level |
FWER level |
Data$Independence |
boolean indicating whether the |
Data$Single_step |
boolean indicating whether a single-step or step-down procedure was performed. |
Data$Data_name |
the respective variable names of the input data. |
Select |
list with data related to |
Select$Threshold |
|
Select$Effective_Thresholds |
results of each |
Select$Pvalues |
selected |
Select$Indices |
indices of |
Select$Scaled |
scaled selected |
Select$Number |
number of selected |
References
Döhler, S. (2010). Validation of credit default probabilities using multiple-testing procedures. Journal of Risk Model Validation, 4(4), 59-92. doi:10.21314/JRMV.2010.062
Zhu, Y., & Guo, W. (2019). Family-Wise Error Rate Controlling Procedures for Discrete Data. Statistics in Biopharmaceutical Research, 12(1), 117-128. doi:10.1080/19466315.2019.1654912
See Also
DiscreteFWER
, DBonferroni()
, DHolm()
,
DSidak()
, DHochberg()
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
# Computation of 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()
# d-Holm without critical values; using test results object
DFWER_dep_sd_fast <- discrete_FWER(test_results)
summary(DFWER_dep_sd_fast)
# d-Holm with critical values; using extracted p-values and supports
DFWER_dep_sd_crit <- discrete_FWER(raw_pvalues, pCDFlist,
critical_values = TRUE)
summary(DFWER_dep_sd_crit)
# d-Bonferroni without critical values; using test results object
DFWER_dep_fast <- discrete_FWER(test_results, single_step = TRUE)
summary(DFWER_dep_fast)
# d-Bonferroni with critical values; using extracted p-values and supports
DFWER_dep_crit <- discrete_FWER(raw_pvalues, pCDFlist, single_step = TRUE,
critical_values = TRUE)
summary(DFWER_dep_crit)
# d-Hochberg without critical values; using test results object
DFWER_ind_su_fast <- discrete_FWER(test_results, independence = TRUE)
summary(DFWER_ind_su_fast)
# d-Hochberg with critical values; using extracted p-values and supports
DFWER_ind_su_crit <- discrete_FWER(raw_pvalues, pCDFlist,
independence = TRUE,
critical_values = TRUE)
summary(DFWER_ind_su_crit)
# d-Šidák without critical values; using extracted p-values and supports
DFWER_ind_fast <- discrete_FWER(raw_pvalues, pCDFlist,
independence = TRUE,
single_step = TRUE)
summary(DFWER_ind_fast)
# d-Šidák with critical values; using test results object
DFWER_ind_crit <- discrete_FWER(test_results, independence = TRUE,
single_step = TRUE,
critical_values = TRUE)
summary(DFWER_ind_crit)