test_that("deviance() works.", {
fit <- SLOPE(abalone$x, abalone$y, family = "poisson", path_length = 20)
d <- deviance(fit)
expect_equivalent(
d,
c(
0.811481727095348,
0.623090978381263,
0.546090761782434,
0.503613217938781,
0.48356002029254,
0.427917412849951,
0.397310747935371,
0.384952482526774,
0.37696682671935,
0.365625557434747,
0.360166287336796,
0.357895673218362,
0.357006148674834,
0.35665810484565,
0.356526439340104,
0.356473865952857,
0.356453757295853,
0.356446103336271,
0.356443197668266
),
tolerance = 1e-2
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.