tests/testthat/test_priorpred.R

sp <- list(knots=c(1,2,3,5), degree=3)

test_that("prior prediction", {
  set.seed(1)
  pred <- prior_pred(10, mspline = sp,
                     coefs_mean = NULL,
                     prior_hsd = p_gamma(2,1),
                     prior_hscale = p_normal(0,1),
                     censtime = 20)
  expect_is(pred, "data.frame")
})

Try the survextrap package in your browser

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

survextrap documentation built on June 10, 2025, 5:11 p.m.