Post hoc confidence bounds on the true/false positives
Source:R/SansSouci-class.R
      predict.SansSouci.RdPost hoc confidence bounds on the true/false positives
Arguments
- object
 An object of class 'SansSouci'
- S
 A subset of indices
- what
 A character vector, the names of the post hoc bounds to be computed, among:
FP: Upper bound on the number of false positives in the 'x' most significant items
TP: Lower bound on the number of true positives in the 'x' most significant items
FDP: Upper bound on the proportion of false positives in the 'x' most significant items
TP: Lower bound on the proportion of true positives in the 'x' most significant items
Defaults to
c("TP", "FDP")- all
 A logical value: should the bounds for all ordered subsets of
Sbe returned? IfFALSE(the default), only the bound forSis returned- contrast_name
 A character value, the selected contrast. Should be chosen in
x$input$contrast_name.- ...
 Not used
Value
If all is FALSE (the default), only the value of the bound is returned. Otherwise, a data.frame is return, with |S| rows and 4 columns:
x: Number of most significant items selected
label: Label for the procedure, typically of the form 'family(param)'
bound: Value of the post hoc bound
stat: Type of post hoc bound, as specified by argument
bound.
Examples
# Generate Gaussian data and perform multiple tests
obj <- SansSouciSim(m = 502, rho = 0.5, n = 100, pi0 = 0.8, SNR = 3, prob = 0.5)
res <- fit(obj, B = 100, alpha = 0.1)
# post hoc bound on the set of all hypotheses
predict(res)
#>         TP        FDP 
#> 76.0000000  0.8486056 
# idem for all possible subsets (sorted by p-value)
bounds <- predict(res, all = TRUE)
head(bounds)
#>   x label stat bound
#> 1 1 Simes   TP     1
#> 2 2 Simes   TP     2
#> 3 3 Simes   TP     3
#> 4 4 Simes   TP     4
#> 5 5 Simes   TP     5
#> 6 6 Simes   TP     6
# post hoc bound on a subset
S <- which(pValues(res) < 0.01)
predict(res, S)
#>         TP        FDP 
#> 76.0000000  0.1827957