Print the output of a "drord" object.

# S3 method for drord
plot(
  x,
  treat_labels = c(1, 0),
  dist = "pmf",
  out_labels = if (dist == "pmf") {     x$out_levels } else {    
    x$out_levels[-length(x$out_levels)] },
  ...
)

Arguments

x

A "drord" object.

treat_labels

Labels for the treatment variables (treat = 1 followed by treat = 0).

dist

Which distribution to plot. Valid options are "cdf" or "pmf".

out_labels

Labels for the ordered outcome levels. If dist = "cdf", the highest level of outcome will be dropped.

...

Other arguments (not used)

Value

A list with named entries plot (a ggplot2 object) and plot_data, the data.frame from which the plot is made. The latter is included for additional modifications to the plot that are desired.