Nothing
test_that("Anderson-Darling and Likelihood Ratio tests work", {
data(laser)
fit_none <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "none")
fit_gamma <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma")
# AD test
u_list <- fit_none$unit_data
dy <- unlist(lapply(u_list, function(u) u$dy))
dg <- unlist(lapply(u_list, function(u) 2.0379 * u$dt))
ad <- ad_test_ig(dy, dg, eta = 13.147)
expect_s3_class(ad, "ad_test_ig")
expect_true(ad$statistic > 0)
expect_true(ad$p_value > 0.05)
# LRT
lrt <- lr_test(fit_none, fit_gamma)
expect_s3_class(lrt, "lr_test")
expect_equal(lrt$df, 1)
expect_true(lrt$statistic > 0)
expect_true(lrt$p_value < 0.001)
})
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.