tests/testthat/test-borrowing_fixed_power_prior.R

test_that("borrowing_fixed_power_prior works as expected", {
  fpp <- borrowing_fixed_power_prior("ext", 0.33)
  expect_class(fpp, "Borrowing")
  expect_class(fpp, "BorrowingFixedPowerPrior")
  expect_equal(fpp@ext_flag_col, "ext")
  expect_equal(fpp@power_par, 0.33)
})

test_that("get_vars works for BorrowingFixedPowerPrior", {
  expect_identical(
    get_vars(borrowing_fixed_power_prior("ext_fl", 0.2)),
    c(ext_flag_col = "ext_fl")
  )
})

Try the psborrow2 package in your browser

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

psborrow2 documentation built on May 14, 2026, 5:10 p.m.