predict.SansSouci: Post hoc confidence bounds on the true/false positives

View source: R/SansSouci-class.R

predict.SansSouciR Documentation

Post hoc confidence bounds on the true/false positives

Description

Post hoc confidence bounds on the true/false positives

Usage

## S3 method for class 'SansSouci'
predict(
  object,
  S = seq_len(nHyp(object)),
  what = c("TP", "FDP"),
  all = FALSE,
  ...
)

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 S be returned? If FALSE (the default), only the bound for S is returned

...

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)

# 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)

pneuvial/sanssouci documentation built on Feb. 12, 2024, 4:18 a.m.