plot_hsf_pb | R Documentation |
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.
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 )
data |
A list generated by |
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 |
A ggplot object.
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
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.