as_vis | R Documentation |
Converting APES object into mplot-vis object (experimental)
as_vis(boot_apes, model)
boot_apes |
Bootstrapped APES result |
model |
The full model If TRUE, then googleVis will be used to make an interactive plot. |
set.seed(10)
n = 100
p = 10
beta = c(1, -1, rep(0, p-2))
x = matrix(rnorm(n*p), ncol = p)
colnames(x) = paste0("X", 1:p)
y = rbinom(n = n, size = 1, prob = expit(x %*% beta))
data = data.frame(y, x)
model = glm(y ~ ., data = data, family = "binomial")
boot_apes = apes(model = model, n_boot = 20)
## Not run:
library(mplot)
plot(x = as_vis(boot_apes = boot_apes, model = model), which = "vip")
plot(x = as_vis(boot_apes = boot_apes, model = model), which = "vip", interactive = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.