View source: R/bootstrapCalibration.R
calibration_bootstap | R Documentation |
Compute by bootstraping a Joint Error Rate controlling threshold family associated to a set of contrast in a linear model.
calibration_bootstap(
Y,
X,
C,
alternative = c("two.sided", "less", "greater"),
B = 1000,
alpha = 0.05,
family = c("Simes", "Linear", "Beta", "Oracle")
)
Y |
A data matrix of size $n$ observations (in row) and $D$ features in columns |
X |
A design matrix of size $n$ observations (in row) and $p$ variables (in columns) |
C |
A contrast matrix of size $L$ tested contrasts (in row) and $p$ columns corresponding to the parameters to be tested |
alternative |
A character string specifying the alternative hypothesis. Must be one of "two.sided" (default), "greater" or "less". |
B |
An integer value, the number of bootstraps |
alpha |
A numeric value in |
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.
|
A list with elements:
A numeric vector of length K, such that the estimated probability that
there exists an index k between 1 and K such that the k-th maximum of the
test statistics of is greater than thr[k]
, is less than alpha
A vector of B
pivotal statitics
A numeric value, the result of the calibration
Davenport, S., Thirion, B., & Neuvial, P. (2025). FDP control in mass-univariate linear models using the residual bootstrap. Electronic Journal of Statistics, 19(1), 1313-1336.
Blanchard, G., Neuvial, P., & Roquain, E. (2020). Post hoc confidence bounds on false positives using reference families.
N = 100
p = 2
D = 2
X <- matrix(0,nrow = N, ncol = p)
X[,1] <- 1
X[,-1] <- runif(N*(p-1), min = 0, max = 3)
beta <- matrix(0, nrow = p, ncol = D)
epsilons <- matrix(rnorm(N*D), nrow = N, ncol = D)
Y <- X %*% beta + epsilons
C <- diag(p)
resLM <- calibration_bootstap(Y = Y, X = X, C = C, B = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.