test_that("ModelBase", {
num_rows <- 100
test_data <- data.frame(
id = 1:num_rows,
sex = sample(c("male", "female"), size = num_rows, replace = T),
age = sample(1:100, num_rows, replace = T),
x1 = runif(num_rows),
x2 = runif(num_rows)
)
my_formula <- ~ x1 + x2 + I(x1^2) + x1:x2
params = c(`(Intercept)` = 1, x1 = 2.5, x2 = -3, `I(x1^2)` = 0.5 , `x1:x2` = 1)
Mod <- ModelBase$new(params = params, formula = my_formula)
checkmate::expect_class(Mod, "ModelBase")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.