regress(diamonds, "price", c("carat", "clarity")) %>%
predict(pred_cmd = "carat = 1:10") %>%
plot(xvar = "carat")
logistic(titanic, "survived", c("pclass", "sex", "age"), lev = "Yes") %>%
predict(pred_cmd = c("pclass = levels(pclass)", "sex = levels(sex)", "age = 0:100")) %>%
plot(xvar = "age", color = "sex", facet_col = "pclass")
Run the code above in your browser using DataLab