Produce calculations necessary for pp_plot.
pp_calcs(formula, data, ref_group = NULL, scheme = "ggplot2")
A formula of the type out ~ group
where out
is
the outcome variable and group
is the grouping variable. Note the
grouping variable must only include only two groups.
The data frame that the data in the formula come from.
Optional character vector (of length 1) naming the reference group to be plotted on the x-axis. Defaults to the highest scoring group.
What color scheme should the lines follow? Defaults to
mimic the ggplot2 color scheme. Other options come from the
viridisLite
package, and must be installed first. These are the same options available
in the package: "viridis", "magma", "inferno", and "plasma". These color
schemes work well for color blindness and print well in black and white.
Alternatively, colors can be supplied manually through a call to col
(through ...
).
List with appropriate probs
, name of the reference group, data for
the reference group and all other groups, and data for the x/y axes.