Converting APES object into mplot-vis object (experimental)

as_vis(boot_apes, model)

Arguments

boot_apes

Bootstrapped APES result

model

The full model If TRUE, then googleVis will be used to make an interactive plot.

Examples

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)
#> No variable size specified, searching all sizes from 1 to p... 
if (FALSE) {
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)
}