tests/testthat/test-cure_modeling_inits.R

context("Cure regression")

test_that("curesurv correctly checks inits values", {
  # Test the presence of init values
  expect_error(
    curesurv::curesurv(Surv(time = time_obs, event = event) ~ age_cr,
                         data = pancreas_data,
                         riskpop =  "ehazard",
                         riskpop.alpha = TRUE,
                       method_opt = "L-BFGS-B",
                       init = c(0,0,0,0,0))
    )
})

Try the curesurv package in your browser

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

curesurv documentation built on April 12, 2025, 2:21 a.m.