if (FALSE) { # rlang::is_installed(c("parsnip", "nestedmodels"))
library(nestedmodels)
library(parsnip)
model <- linear_reg() %>%
set_engine("lm") %>%
nested()
nested_data <- tidyr::nest(example_nested_data, data = -id)
fit <- fit(model, z ~ x + y + a + b, nested_data)
# Reduce the model size
butcher(fit)
}
Run the code above in your browser using DataLab