plot.mnl.predict: Plot method for mnl.predict function

plot.mnl.predictR Documentation

Plot method for mnl.predict function

Description

Plot method for mnl.predict function

Usage

## S3 method for class 'mnl.predict'
plot(x, xvar = "", facet_row = ".", facet_col = ".", color = ".class", ...)

Arguments

x

Return value from predict function predict.mnl

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

...

further arguments passed to or from other methods

See Also

predict.mnl to generate predictions

Examples

result <- mnl(
  ketchup,
  rvar = "choice",
  evar = c("price.heinz28", "price.heinz32", "price.heinz41", "price.hunts32"),
  lev = "heinz28"
)
pred <- predict(result, pred_cmd = "price.heinz28 = seq(3, 5, 0.1)")
plot(pred, xvar = "price.heinz28")


radiant.model documentation built on Oct. 16, 2023, 9:06 a.m.