stability: Function to perform stability selection

Description Usage Arguments Value Author(s) References Examples

View source: R/stability.R

Description

Function to perform stability selection

Usage

1
2
3
4
stability(x, y, EV, threshold = 0.75, B = 100, fraction = 0.5,
          model.selector = lasso.firstq, args.model.selector = NULL,
          parallel = FALSE, ncores = getOption("mc.cores", 2L),
          verbose = FALSE)

Arguments

x

Design matrix (without intercept).

y

Response vector.

EV

Bound for expected number of false positives.

threshold

Threshold for selection frequency. Must be in (0.5, 1).

B

Number of sub-sample iterations.

fraction

Fraction of data used at each of the B sub-samples.

model.selector

Function to perform model selection. Default is lasso.firstq. User supplied function must have at least three arguments: x (the design matrix), y (the response vector) and q (the maximal model size). Return value is the index vector of selected columns. See lasso.firstq for an example. Additional arguments can be passed through args.model.selector.

args.model.selector

Named list of further arguments for function model.selector.

parallel

Should parallelization be used? (logical)

ncores

Number of cores used for parallelization.

verbose

Should information be printed out while computing (logical).

Value

selected

Vector of selected predictors.

freq

Vector of selection frequencies.

q

Size of fitted models in order to control error rate at desired level.

Author(s)

Lukas Meier

References

Meinshausen, N. and B<c3><bc>hlmann, P. (2010) Stability selection (with discussion). Journal of the Royal Statistical Society: Series B 72, 417–473.

B<c3><bc>hlmann, P., Kalisch, M. and Meier, L. (2014) High-dimensional statistics with a view towards applications in biology. Annual Review of Statistics and its Applications 1, 255–278

Examples

1
2
3
4
5
x <- matrix(rnorm(100*1000), nrow = 100, ncol = 1000)
y <- x[,1] * 2 + x[,2] * 2.5 + rnorm(100)
fit.stab <- stability(x, y, EV = 1)
fit.stab
fit.stab$freq[1:10] ## selection frequency of the first 10 predictors

hdi documentation built on May 31, 2017, 2:57 a.m.