View source: R/SansSouci-class.R
predict.SansSouci | R Documentation |
Post hoc confidence bounds on the true/false positives
## S3 method for class 'SansSouci'
predict(
object,
S = seq_len(nHyp(object)),
what = c("TP", "FDP"),
all = FALSE,
...
)
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:
Defaults to |
all |
A logical value: should the bounds for all ordered subsets of |
... |
Not used |
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
.
# 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)
# idem for all possible subsets (sorted by p-value)
bounds <- predict(res, all = TRUE)
head(bounds)
# post hoc bound on a subset
S <- which(pValues(res) < 0.01)
predict(res, S)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.