Nothing
test_that("S3 methods for igp_fit work properly", {
data(laser)
fit <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma")
# Print & Summary
expect_output(print(fit))
s <- summary(fit)
expect_s3_class(s, "summary_igp_fit")
expect_output(print(s))
# Coef & Vcov & Confint
expect_equal(length(coef(fit)), 3)
expect_equal(dim(vcov(fit)), c(3, 3))
ci <- confint(fit)
expect_equal(dim(ci), c(3, 2))
# logLik, AIC, BIC
ll <- logLik(fit)
expect_s3_class(ll, "logLik")
expect_equal(AIC(fit), fit$aic)
expect_equal(BIC(fit), fit$bic)
# Predict
p_lt <- predict(fit, threshold = 10, type = "lifetime")
expect_s3_class(p_lt, "lifetime_dist")
p_fr <- predict(fit, type = "frailty")
expect_s3_class(p_fr, "individual_frailty")
p_qu <- predict(fit, threshold = 10, type = "quantiles")
expect_true(is.data.frame(p_qu))
# Plot
pdf(NULL)
expect_silent(plot(fit, type = "paths", threshold = 10))
expect_silent(plot(fit, type = "frailty"))
expect_silent(plot(fit, type = "lifetime", threshold = 10))
expect_silent(plot(fit, type = "diagnostics"))
expect_silent(plot(fit, type = "all", threshold = 10))
dev.off()
})
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.