plot.model.predict: Plot method for model.predict functions

plot.model.predictR Documentation

Plot method for model.predict functions

Description

Plot method for model.predict functions

Usage

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

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

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


radiant-rstats/radiant.model documentation built on Nov. 29, 2023, 5:59 a.m.