Computes the stability score (see StabilityScore
) and
upper-bounds of the PFER
and FDP
from selection
proportions of models with a given parameter controlling the sparsity of the
underlying algorithm and for different thresholds in selection proportions.
StabilityMetrics(
selprop,
pk = NULL,
pi_list = seq(0.6, 0.9, by = 0.01),
K = 100,
n_cat = NULL,
PFER_method = "MB",
PFER_thr_blocks = Inf,
FDP_thr_blocks = Inf,
Sequential_template = NULL,
graph = TRUE,
group = NULL
)
A list with:
a matrix of the best (block-specific) stability scores for different (sets of) penalty parameters. In multi-block stability selection, rows correspond to different sets of penalty parameters, (values are stored in the output "Lambda") and columns correspond to different blocks.
a matrix of (block-specific) penalty parameters. In multi-block stability selection, rows correspond to sets of penalty parameters and columns correspond to different blocks.
a matrix of average numbers of (block-specific) edges selected by the underlying algorithm for different (sets of) penalty parameters. In multi-block stability selection, rows correspond to different sets of penalty parameters, (values are stored in the output "Lambda") and columns correspond to different blocks.
a matrix of calibrated numbers of (block-specific) stable edges for different (sets of) penalty parameters. In multi-block stability selection, rows correspond to different sets of penalty parameters, (values are stored in the output "Lambda") and columns correspond to different blocks.
a matrix of calibrated (block-specific) thresholds in selection proportions for different (sets of) penalty parameters. In multi-block stability selection, rows correspond to different sets of penalty parameters, (values are stored in the output "Lambda") and columns correspond to different blocks.
a matrix of computed (block-specific) upper-bounds in PFER of calibrated graphs for different (sets of) penalty parameters. In multi-block stability selection, rows correspond to different sets of penalty parameters, (values are stored in the output "Lambda") and columns correspond to different blocks.
a matrix of computed (block-specific) upper-bounds in FDP of calibrated stability selection models for different (sets of) penalty parameters. In multi-block stability selection, rows correspond to different sets of penalty parameters, (values are stored in the output "Lambda") and columns correspond to different blocks.
an array of (block-specific) stability scores obtained with different combinations of parameters. Rows correspond to different (sets of) penalty parameters and columns correspond to different thresholds in selection proportions. In multi-block stability selection, indices along the third dimension correspond to different blocks.
an array of computed upper-bounds of PFER obtained with different combinations of parameters. Rows correspond to different penalty parameters and columns correspond to different thresholds in selection proportions. Not available in multi-block stability selection graphical modelling.
an array of computed upper-bounds of FDP obtained with different combinations of parameters. Rows correspond to different penalty parameters and columns correspond to different thresholds in selection proportions. Not available in multi-block stability selection graphical modelling.
array of selection proportions.
optional vector encoding the grouping structure. Only used for
multi-block stability selection where pk
indicates the number of
variables in each group. If pk=NULL
, single-block stability
selection is performed.
vector of thresholds in selection proportions. If
n_cat=NULL
or n_cat=2
, these values must be >0
and
<1
. If n_cat=3
, these values must be >0.5
and
<1
.
number of resampling iterations.
computation options for the stability score. Default is
NULL
to use the score based on a z test. Other possible values are 2
or 3 to use the score based on the negative log-likelihood.
method used to compute the upper-bound of the expected
number of False Positives (or Per Family Error Rate, PFER). If
PFER_method="MB"
, the method proposed by Meinshausen and Bühlmann
(2010) is used. If PFER_method="SS"
, the method proposed by Shah and
Samworth (2013) under the assumption of unimodality is used.
vector of block-specific thresholds in PFER for
constrained calibration by error control. If PFER_thr=Inf
and
FDP_thr=Inf
, unconstrained calibration is used.
vector of block-specific thresholds in the expected
proportion of falsely selected features (or False Discovery Proportion,
FDP) for constrained calibration by error control. If PFER_thr=Inf
and FDP_thr=Inf
, unconstrained calibration is used.
logical matrix encoding the type of procedure to
use for data with multiple blocks in stability selection graphical
modelling. For multi-block estimation, the stability selection model is
constructed as the union of block-specific stable edges estimated while the
others are weakly penalised (TRUE
only for the block currently being
calibrated and FALSE
for other blocks). Other approaches with joint
calibration of the blocks are allowed (all entries are set to TRUE
).
logical indicating if stability selection is performed in a
regression (if FALSE
) or graphical (if TRUE
)
framework.
vector encoding the grouping structure among predictors. This argument indicates the number of variables in each group and only needs to be provided for group (but not sparse group) penalisation.
ourstabilityselectionsharp
stabilityselectionMBsharp
stabilityselectionSSsharp
Other stability metric functions:
ConsensusScore()
,
FDP()
,
PFER()
,
StabilityScore()
## Sparse or sparse group penalisation
# Simulating set of selection proportions
set.seed(1)
selprop <- matrix(round(runif(n = 20), digits = 2), nrow = 2)
# Computing stability scores for different thresholds
metrics <- StabilityMetrics(
selprop = selprop, pi = c(0.6, 0.7, 0.8),
K = 100, graph = FALSE
)
## Group penalisation
# Simulating set of selection proportions
set.seed(1)
selprop <- matrix(round(runif(n = 6), digits = 2), nrow = 2)
selprop <- cbind(
selprop[, 1], selprop[, 1],
selprop[, 2], selprop[, 2],
matrix(rep(selprop[, 3], each = 6), nrow = 2, byrow = TRUE)
)
# Computing stability scores for different thresholds
metrics <- StabilityMetrics(
selprop = selprop, pi = c(0.6, 0.7, 0.8),
K = 100, graph = FALSE, group = c(2, 2, 6)
)
Run the code above in your browser using DataLab