This function provides easy visualization of any given user-requested effect from the bootstrap predictions computed by ezPredict or ezBoot.
ezPlot2(
preds
, CI = .95
, x = NULL
, split = NULL
, row = NULL
, col = NULL
, do_lines = TRUE
, ribbon = FALSE
, CI_alpha = .5
, point_alpha = .8
, line_alpha = .8
, bar_width = NULL
, to_numeric = NULL
, x_lab = NULL
, y_lab = NULL
, split_lab = NULL
, levels = NULL
, diff = NULL
, reverse_diff = NULL
, y_free = FALSE
, alarm = FALSE
, do_plot = TRUE
, print_code = FALSE
, parallel = FALSE
)If do_plot is TRUE (default) and print_code if FALSE (default), a printable/modifiable ggplot2 object representing the predictions and confidence intervals. If do_plot is FALSE or print_code is TRUE, a list containing the cell predictions and bootstrapped CIs is returned.
An list object resulting from a call to ezPredict or ezBoot.
Numeric vector of one or more confidence levels to use for plotting error bars. If plotting multiple confidence regions, it is suggested that an equal number of different values are supplied to the bar_width argument for differentiation.
Name of the variable to plot on the x-axis.
Name of a variable by which to split the data into different shapes/colors (and line types, if do_lines==TRUE).
Name of a variable by which to split the data into facet rows.
Name of a variable by which to split the data into facet columns.
Logical. If TRUE, lines will be plotted connecting groups of points.
Logical. If TRUE, a ribbon will be plotted instead of error bars (and no points will actually be plotted, just lines).
Numeric value between 0 and 1 specifying the opacity of the CI bars/ribbon.
Numeric value between 0 and 1 specifying the opacity of the plotted points.
Numeric value between 0 and 1 specifying the opacity of the plotted lines.
Numeric value or vector specifying custom widths for the error bar hat. Must either have a length of 1, or the same length as CI.
Names of any variables that need to be converted to the numeric class before plotting. If a single value, may be specified by name alone; if multiple values, must be specified as a .() list.
Character string specifying the x-axis label.
Character string specifying the y-axis label.
Character string specifying the key label.
Named list where each item name matches a factored column in data that needs either reordering of levels, renaming of levels, or both. Each item should be a list containing named elements new_order or new_names or both.
Names of any variables to collapse to a difference score. If a single value, may be specified by name alone; if multiple values, must be specified as a .() list. All supplied variables must be factors, ideally with only two levels (especially if setting the reverse_diff argument to TRUE).
Logical. If TRUE, triggers reversal of the difference collapse requested by diff. Take care with variables with more than 2 levels.
Logical. If TRUE, then rows will permit different y-axis scales.
Logical. If TRUE, call the alarm function when ezPlot2 completes (useful for plots that take a long time).
Logical. If TRUE, no plot will be produced but instead a data frame containing point predictions and confidence limits will be returned.
Logical. If TRUE, the code for creating the ggplot2 plot object is printed and the data to be plotted is returned instead of the plot itself.
Logical. If TRUE, computation will be parallel, assuming that a parallel backend has been specified (as in library(doMC);options(cores=4);registerDoMC(). Likely only to work when running R from a unix terminal.)
Michael A. Lawrence mike.lwrnc@gmail.com
Visit the ez development site at https://github.com/mike-lawrence/ez
for the bug/issue tracker and the link to the mailing list.
ezBoot, ezMixed, ezPredict
#see example in ezPredict documentation
Run the code above in your browser using DataLab