DSidak {DiscreteFWER} | R Documentation |
Discrete Šidák Procedure for Independent Tests
Description
DSidak()
is a wrapper function of discrete_FWER()
for computing the
discrete Šidák procedure for independent discrete tests. It simply passes its
arguments to discrete_FWER()
with fixed independence = TRUE
and
single_step = TRUE
.
Usage
DSidak(test_results, ...)
## Default S3 method:
DSidak(
test_results,
pCDFlist,
alpha = 0.05,
critical_values = FALSE,
select_threshold = 1,
pCDFlist_indices = NULL,
...
)
## S3 method for class 'DiscreteTestResults'
DSidak(
test_results,
alpha = 0.05,
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. |
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.
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
See Also
discrete_FWER()
, DHochberg()
, DBonferroni()
, DHolm()
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-Šidák without critical values; using extracted p-values and supports
DSidak_fast <- DSidak(raw_pvalues, pCDFlist)
summary(DSidak_fast)
# d-Šidák with critical values; using test results object
DSidak_crit <- DSidak(test_results, critical_values = TRUE)
summary(DSidak_crit)