plot_mdiff_contrast_bs: Makes a plot from an esci_estimate object

Description Usage Arguments Value

View source: R/class_esci_estimate_plot.R

Description

This function takes an esci_estimate object and makes a plot emphasizing effect sizes

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
plot_mdiff_contrast_bs(
  estimate,
  rope = list(reference = NULL, upper = NULL, lower = NULL, rope_units = "raw"),
  plot_attributes = NULL,
  spacing = 1,
  starting_point = 1,
  difference_gap = 2,
  data_layout = c("random", "swarm", "none"),
  data_spread = 0.25,
  error_layout = c("halfeye", "eye", "gradient", "none"),
  error_scale = 0.3,
  error_nudge = 0.35,
  error_normalize = c("groups", "all", "panels"),
  ylim = c(NA, NA),
  breaks = 5,
  difference_axis_units = c("sd", "raw"),
  difference_axis_breaks = 5,
  y.axis.text = 10,
  y.axis.title = 12,
  x.axis.text = 10,
  x.axis.title = 12,
  ylab = "default",
  xlab = "default",
  ggtheme = NULL
)

Arguments

estimate

A esci_estimate object

rope
  • list giving reference value, upper, lower, and units for plotting a rope

plot_attributes
  • a esci_plot_attributes object; obtain one with my_plot_attributes <- esci_plot_attributes()

spacing
  • optional number indicating space ot be left between groups, defaults to 1

starting_point
  • optional number indicating starting point on x axis, defaults to 1

difference_gap
  • optional number indicating distance left between last group and difference arena

data_layout
  • optional; if raw data included specifies ggbeeswarm layout: random (default), swarm, or none

data_spread
  • optional; if raw data included controls spacing in ggbeeswarm layout, higher values more spread out

error_layout
  • optional, tells shape to use for expected error distribution: halfeye (default), eye, gradient, or none

error_scale
  • optional number giving width allocated to expected error distribution

error_nudge
  • optional; if raw data, this number specifies offset for expected error distribution

error_normalize
  • optional; the way error distribution height is normalized in the graph: groups (default), all, panels

ylim
  • optional vector of two numeric elements for desired min and max on y axis, defaults to c(NA, NA)

breaks
  • optional suggested number of breaks desired for y axis. Defaults to 5

difference_axis_units
  • plot difference axis in original units or sds

difference_axis_breaks
  • otional suggested number of breaks for the difference axis. Defaults to 5.

y.axis.text
  • optional number giving font size for y-axis markings, defaults to 10pt

y.axis.title
  • optional number giving font size for y-axis labels, defaults to 12pt

x.axis.text
  • optional number giving font size for x-axis markings, defaults to 10pt

x.axis.title
  • optional number giving font size for x-axis labels, defaults to 12pt

ylab
  • optional label for y axis - defaults to outcome_variable_name if present in estimate$properties

xlab
  • optional label for x axis - defaults to grouping_variable_name if present in estimate$properties

ggtheme
  • an optional ggtheme object to apply to the graph. Defaults to theme_classic

Value

Returns an ggplot2 object


rcalinjageman/esci2 documentation built on Dec. 22, 2021, 1:02 p.m.