demo_tab <- data.frame(
selector = rep(c("AIC", "BIC"), each = 3),
variable = rep(paste0("x", 1:3), times = 2),
coef = c(0.6, 0, -0.2, 0.55, 0.05, -0.3)
)
demo_tab$selected <- demo_tab$coef != 0
plot_compare_coeff(demo_tab)
Run the code above in your browser using DataLab