plot_hsf_pb_dist: Plot hierarchical shift function percentile bootstrap samples

View source: R/hsf_plot.R

plot_hsf_pb_distR Documentation

Plot hierarchical shift function percentile bootstrap samples

Description

Plot hierarchical shift function percentile bootstrap samples generated with hsf_pb. Bootstrap distributions of group trimmed mean differences are plotted using tidybayes::geom_halfeyeh. The function returns a ggplot object, which can be customised using the ggplot2 package.

Usage

plot_hsf_pb_dist(
  data,
  null_value = 0,
  point_interv = "mode_hdi",
  interval_width = c(0.5, 0.9),
  fill_colour = "orange",
  int_colour = "black"
)

Arguments

data

A list generated by hsf_pb.

null_value

Reference value to plot as a horizontal line - default = 0.

point_interv

Option mean/median/mode_ci/hdi to pass to point_interval - default = "mode_hdi"

interval_width

Width of the intervals - default c(0.5, 0.9)

fill_colour

Colour of the bootstrap distributions - default = "orange".

int_colour

Colour of the interval and summary point - default = "black".

Value

A ggplot object.

References

Rousselet, G. A., & Wilcox, R. R. (2019, January 17). Reaction times and other skewed distributions: problems with the mean and the median. https://doi.org/10.31234/osf.io/3y54r

Examples

plot_hsf_pb(out) # default plot
p <- plot_hsf_pb(out) # get ggplot object
plot_hsf_pb(out, gp_line_colour = "purple", gp_point_colour = "purple") # pink group shift function


GRousselet/rogme documentation built on Nov. 12, 2022, 4:38 a.m.