plotStabilityPaths: Plot Stability Paths

View source: R/plotting.R

plotStabilityPathsR Documentation

Plot Stability Paths

Description

Plot the stability paths of each variable (predictor), showing the selection probability as a function of the regularization step.

Usage

plotStabilityPaths(
  se,
  selProbMin = metadata(se)$stabsel.params.cutoff,
  col = "cadetblue",
  lwd = 1,
  lty = 1,
  ylim = c(0, 1.1),
  ...
)

Arguments

se

the SummarizedExperiment object resulting from stability selection, by running randLassoStabSel.

selProbMin

A numerical scalar in [0,1]. Predictors with a selection probability greater than selProbMin are shown as colored lines. The color is defined by the col argument.

col

color of the selected predictors.

lwd

line width (default = 1).

lty

line type (default = 1).

ylim

limits for y-axis (default = c(0,1.1)).

...

additional parameters to pass on to matplot.

Value

TRUE (invisibly).

See Also

stabsel and matplot

Examples

## create data set
Y <- rnorm(n = 500, mean = 2, sd = 1)
X <- matrix(data = NA, nrow = length(Y), ncol = 50)
for (i in seq_len(ncol(X))) {
  X[ ,i] <- runif(n = 500, min = 0, max = 3)
}
s_cols <- sample(x = seq_len(ncol(X)), size = 10, 
  replace = FALSE)
for (i in seq_along(s_cols)) {
  X[ ,s_cols[i]] <- X[ ,s_cols[i]] + Y
}
  
## reproducible randLassoStabSel() with 1 core
set.seed(123)
ss <- randLassoStabSel(x = X, y = Y)
plotStabilityPaths(ss)


fmicompbio/monaLisa documentation built on Nov. 2, 2024, 1:33 p.m.