SansSouciSim: Create an object of class 'SansSouci' from simulations

View source: R/SansSouci-class.R

SansSouciSimR Documentation

Create an object of class 'SansSouci' from simulations

Description

Create a 'SansSouci' object from simulation in the Gaussian equi-correlated model

Usage

SansSouciSim(...)

Arguments

...

Parameters to be passed to gaussianSamples

See Also

gaussianSamples

Examples

obj <- SansSouciSim(
  m = 543, rho = 0.4, n = 210,
  pi0 = 0.8, SNR = 3, prob = 0.5
)
alpha <- 0.1

# Adaptive Simes (lambda-calibration)
set.seed(542)
res <- fit(obj, B = 100, alpha = alpha, family = "Simes")
plot(res)
volcanoPlot(res, q = 0.05, r = 0.2)

# upper bound on number of signals if the entire data set
# (and corresponding lower bound on FDP)
predict(res)

# confidence curve
plot(res)

# comparison to other confidence curves
# Parametric Simes (no calibration -- assume positive dependence (PRDS))
res0 <- fit(obj, B = 0, alpha = alpha, family = "Simes")
res0

# Oracle
oracle <- fit(obj, alpha = alpha, family = "Oracle")
oracle

confs <- list(
  Simes = predict(res0, all = TRUE),
  "Simes+calibration" = predict(res, all = TRUE),
  "Oracle" = predict(oracle, all = TRUE)
)
plotConfCurve(confs)

## Not run: 
# Use wilcoxon tests instead of Welch tests
res <- fit(obj, B = 100, alpha = 0.1, rowTestFUN = rowWilcoxonTests)
volcanoPlot(res, q = 0.05, r = 0.2)

## End(Not run)


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