library("testthat")
#
# BAR regression
#
test_that("Numeric penalty", {
prior <- createBarPrior(penalty = 10)
expect_equal(BrokenAdaptiveRidge:::getPenalty(NULL, prior), 10)
})
test_that("Unhandled penalty", {
prior <- createBarPrior(penalty = "aic")
expect_error(BrokenAdaptiveRidge:::getPenalty(NULL, prior))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.