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)
fit <- penalized.clr( response = Y, stratum = stratum,
penalized = X, lambda = c(1, 0.3),
p = c(20, 80), standardize = TRUE)
fit$penalized
fit$converged
fit$lambda
Run the code above in your browser using DataLab