plot_hsf_pb: Plot percentile bootstrap hierarchical shift function

View source: R/hsf_plot.R

plot_hsf_pbR Documentation

Plot percentile bootstrap hierarchical shift function

Description

Plot percentile bootstrap hierarchical shift function generated with hsf_pb. The function returns a ggplot object, which can be customised using the ggplot2 package. Individual shift functions are superimposed in the background. The trimmed mean of the shift functions is plotted on top, with a percentile bootstrap confidence interval or highest density interval for each quantile. A horizontal line indicates a null reference value.

Usage

plot_hsf_pb(
  data,
  null_value = 0,
  interv = "hdi",
  viridis_option = "B",
  ind_line_alpha = 0.5,
  ind_line_size = 0.5,
  gp_line_colour = "black",
  gp_line_size = 1,
  gp_point_colour = "black",
  gp_point_size = 0.5
)

Arguments

data

A list generated by hsf_pb.

null_value

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

interv

Interval to plot: "ci" or "hdi" - default = "hdi"

viridis_option

Viridis colour map for individual shift functions - default = "B".

ind_line_alpha

Alpha transparency for individual shift functions - default = 0.5

ind_line_size

Line thickness for for individual shift functions - default = 0.5

gp_line_colour

Group line colour - default = "black".

gp_line_size

Group line size - default = 1.

gp_point_colour

Group point colour - default = "black".

gp_point_size

Group point size - default = 0.5

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.