plot_hsf: Plot hierarchical shift function

View source: R/hsf_plot.R

plot_hsfR Documentation

Plot hierarchical shift function

Description

Plot hierarchical shift function generated with hsf. 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 confidence interval for each quantile. A horizontal line indicates the null reference value entered in hsf.

Usage

plot_hsf(
  data,
  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.

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(out) # default plot
p <- plot_hsf(out) # get ggplot object
plot_hsf(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.