View source: R/SansSouci-class.R
fit.SansSouci | R Documentation |
Fit SansSouci object
## S3 method for class 'SansSouci'
fit(
object,
alpha,
B = 1000,
rowTestFUN = NULL,
alternative = c("two.sided", "less", "greater"),
family = c("Simes", "Linear", "Beta", "Oracle"),
max_steps_down = 10L,
K = nHyp(object),
force = FALSE,
verbose = FALSE,
...
)
object |
An object of class |
alpha |
A numeric value in |
B |
An integer value, the number of permutations to be performed. Defaults to 1000 |
rowTestFUN |
A (vectorized) test function. Defaults to rowWelchTests. |
alternative |
A character string specifying the alternative hypothesis. Must be one of "two.sided" (default), "greater" or "less". |
family |
A character value, the name of a threshold family. Should be one of "Linear", "Beta" and "Simes", or "Oracle". "Linear" and "Simes" families are identical.
|
max_steps_down |
A numeric value, the maximum number of steps down to perform. Defaults to 10 (but the algorithm generally converges in 1 or 2 steps). |
K |
An integer value in |
force |
A boolean value: should the permutation p-values and pivotal statistics be re-calculated ? Defaults to |
verbose |
A boolean value: should extra info be printed? Defaults to |
... |
Not used |
A 'fitted' object of class 'SansSouci'. It is a list of three elements
input: see SansSouci
param: the input parameters, given as a list
output: the outputs of the calibration, see calibrate
# 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)
# confidence curve
plot(res)
# confidence curve for a subset
S <- which(pValues(res) < 0.1 & foldChanges(res) > 0.3)
plot(res, S = S)
# plot two confidence curves
res_beta <- fit(res, B = 100, alpha = 0.1, family = "Beta", K = 20)
resList <- list("Linear" = res, "Beta" = res_beta)
bounds <- lapply(resList, predict, all = TRUE)
plotConfCurve(bounds, xmax = 200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.