Nothing
if (interactive()) library(tinytest)
data(Birthwt)
X <- Birthwt$X
y <- Birthwt$bwt
group <- Birthwt$group
fit <- grpreg(X, y, group, penalty="grLasso", lambda.min=0)
lmfit <- lm(y~X)
# BIC
expect_silent(sb <- select(fit))
expect_equal(sb$IC[100], BIC(lmfit), tolerance=1e-4)
# AIC
expect_warning(sa <- select(fit, criterion='AIC', df.method='active'))
expect_silent(sa <- select(fit, criterion='AIC'))
expect_equivalent(sa$IC[100], AIC(lmfit), tolerance=1e-4)
# GCV
expect_silent(s <- select(fit, criterion='GCV', smooth=TRUE))
# AICc
expect_silent(s <- select(fit, criterion='AICc'))
expect_true(all(s$IC >= sa$IC))
# EBIC
expect_silent(s <- select(fit, criterion='EBIC'))
expect_true(all(s$IC >= sb$IC))
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.