as_vis: Converting APES object into mplot-vis object (experimental)

View source: R/as_vis.R

as_visR Documentation

Converting APES object into mplot-vis object (experimental)

Description

Converting APES object into mplot-vis object (experimental)

Usage

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)
## 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)

kevinwang09/APES documentation built on Nov. 10, 2023, 12:09 p.m.