tests/testthat/test-relax.R

test_that("relaxed SLOPE", {
  set.seed(30)
  xy <- SLOPE:::randomProblem(100, 10)

  x <- diag(3)
  beta <- c(1, 0.0, 1)
  y <- x %*% beta

  # one parameter
  fit <- SLOPE(xy$x, xy$y, gamma = 0.0001, scale = FALSE, center = FALSE)
  expect_silent(dont_plot(fit))
})

Try the SLOPE package in your browser

Any scripts or data that you put into this service are public.

SLOPE documentation built on July 2, 2025, 9:07 a.m.