set.seed(123)
# simulate covariates (pure noise in two blocks of 20 and 80 variables)
X <- cbind(matrix(rnorm(4000, 0, 1), ncol = 20), matrix(rnorm(16000, 2, 0.6), ncol = 80))
# stratum membership
stratum <- sort(rep(1:100, 2))
# the response
Y <- rep(c(1, 0), 100)
# default L1 penalty
lambda <- find.default.lambda(response = Y,
penalized = X,
stratum = stratum)
# perform stability selection
# \donttest{
stable1 <- stable.clr(response = Y, penalized = X, stratum = stratum,
lambda.seq = lambda)# }
Run the code above in your browser using DataLab