set.seed(1)
A <- matrix(runif(100, 0, 1), 10, 10)
grp <- c(0, 0, 1, 1, 2, 2, 2, 2, 2, 3)
wt <- c(2, 2, 2, 2, 5, 5, 5, 5, 5, 1)
x <- c(0, 0, 5, 1, 0, 0, 0, 1, 0, 3)
y <- A %*% x
lam <- 0.1 * (10:7)
result <- admmSolverGroupSLOPE(y = y, A = A, group = grp, wt = wt,
lambda=lam, rho = 1, verbose = FALSE)
result$x
# [,1]
# [1,] 0.000000
# [2,] 0.000000
# [3,] 3.856002
# [4,] 2.080742
# [5,] 0.000000
# [6,] 0.000000
# [7,] 0.000000
# [8,] 0.000000
# [9,] 0.000000
# [10,] 3.512829
Run the code above in your browser using DataLab