Plot method for model.predict functions

Description

Plot method for model.predict functions

Usage

1
2
3
## S3 method for class 'model.predict'
plot(x, xvar = "", facet_row = ".",
  facet_col = ".", color = "none", conf_lev = 0.95, ...)

Arguments

x

Return value from predict functions (e.g., predict.regress)

xvar

Variable to display along the X-axis of the plot

facet_row

Create vertically arranged subplots for each level of the selected factor variable

facet_col

Create horizontally arranged subplots for each level of the selected factor variable

color

Adds color to a scatter plot to generate a heat map. For a line plot one line is created for each group and each is assigned a different colour

conf_lev

Confidence level to use for prediction intervals (.95 is the default)

...

further arguments passed to or from other methods

See Also

predict.regress to generate predictions

predict.logistic to generate predictions

Examples

1
2
3
4
5
6
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="pclass=levels(pclass), sex=levels(sex), age=seq(0,100,20)") %>%
  plot(xvar = "age", color = "sex", facet_col = "pclass")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.