# NOT RUN {
fit_full <- lm(Sepal.Length ~ ., data = iris)
fit_part <- lm(Sepal.Length ~ Petal.Length, data = iris)
mod_full <- flashlight(model = fit_full, label = "full", data = iris, y = "Sepal.Length")
mod_part <- flashlight(model = fit_part, label = "part", data = iris, y = "Sepal.Length")
mods <- multiflashlight(list(mod_full, mod_part))
plot(light_profile(mod_full, v = "Species"))
plot(light_profile(mod_full, v = "Species", type = "ale"))
plot(light_profile(mod_full, v = "Species", type = "response"))
plot(light_profile(mod_full, v = "Species", type = "residual", stats = "quartiles"))
plot(light_profile(mod_full, v = "Petal.Width"))
plot(light_profile(mod_full, v = "Petal.Width", type = "residual"))
plot(light_profile(mod_full, v = "Petal.Width", stats = "quartiles"))
plot(light_profile(mod_full, v = "Petal.Width", by = "Species"))
plot(light_profile(mod_full, v = "Petal.Width", by = "Species"), swap_dim = TRUE)
plot(light_profile(mods, v = "Species"))
plot(light_profile(mods, v = "Petal.Width"))
plot(light_profile(mods, v = "Petal.Width"), swap_dim = TRUE)
plot(light_profile(mods, v = "Petal.Width", by = "Species"))
plot(light_profile(mods, v = "Petal.Width", by = "Species", type = "ale"))
plot(light_profile(mods, v = "Petal.Width", by = "Species"), swap_dim = TRUE)
plot(light_profile(mods, v = "Petal.Width", by = "Species", type = "predicted"))
plot(light_profile(mods, v = "Petal.Width", by = "Species",
type = "predicted", n_bins = 5), swap_dim = TRUE)
plot(light_profile(mods, v = "Petal.Width", by = "Species",
type = "predicted", stats = "quartiles"), rotate_x = TRUE)
# }
Run the code above in your browser using DataLab