Nothing
test_that("individual_frailty computes posterior expectations and variances", {
data(laser)
fit_gam <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma")
frail <- individual_frailty(fit_gam)
expect_s3_class(frail, "individual_frailty")
expect_equal(nrow(frail$estimates), 15)
expect_true(all(frail$estimates$E_z > 0))
expect_true(all(frail$estimates$Var_z >= 0))
# Unit 10 is most fragile in Laser data
expect_equal(as.character(frail$estimates$unit[frail$estimates$fragility_rank == 1]), "10")
expect_equal(unname(round(frail$estimates$E_z[frail$estimates$unit == "10"], 3)), 1.948)
# Errors on classical IGP
fit_none <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "none")
expect_error(individual_frailty(fit_none), "cannot be estimated")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.