Plots panels of the inhibition functions (probability of responding; Pr(R)) for each level of specified factors of stop-signal data as a function of user-defined SSD bins/categories. Optionally, posterior and/or prior predictive inhibition functions can be overlaid.
plot_ss_if(
input,
post_predict = NULL,
prior_predict = NULL,
probs = seq(0, 1, length.out = 5),
factors = NULL,
within_plot = NULL,
use_global_quantiles = FALSE,
subject = NULL,
quants = c(0.025, 0.975),
functions = NULL,
n_cores = 1,
n_post = 50,
layout = NA,
to_plot = c("data", "posterior", "prior")[1:2],
use_lim = c("data", "posterior", "prior")[1:2],
legendpos = c("topleft", "bottomright"),
posterior_args = list(),
prior_args = list(),
...
)Returns NULL invisibly
Either an emc object or a stop-signal data frame, or a list of such objects. SSD column in data required.
Optional posterior predictive data (matching columns) or list thereof.
Optional prior predictive data (matching columns) or list thereof.
Numeric vector of probabilities with values on the unit interval that defines SSD bins/categories.
Character vector of factor names to aggregate over; defaults to plotting full data set ungrouped by factors if NULL.
Character indicating factor for which inhibition functions are plotted in the same panel
If set to TRUE, SSDs are pooled over participants before calculating percentiles, so
the same absolute SSD range is used to get Pr(R) for each participant,
and then these probabilities are averaged over participants.
Subset the data to a single subject (by index or name).
Numeric vector of credible interval bounds (e.g. c(0.025, 0.975)).
A function (or list of functions) that create new columns in the datasets or predictives
Number of CPU cores to use if generating predictives from an emc object.
Number of posterior draws to simulate if needed for predictives.
Numeric vector used in par(mfrow=...); use NA for auto-layout.
Character vector: any of "data", "posterior", "prior".
Character vector controlling which source(s) define axis limits
Character vector controlling the positions of the legends
Optional list of graphical parameters for posterior lines/ribbons.
Optional list of graphical parameters for prior lines/ribbons.
Other graphical parameters for the real data lines.
Per default, the SSD-categories are defined in terms of the percentiles of the
SSD distribution for each participant, and then averaged over participants (see use_global_quantiles).
If credible regions are not plotted, the data is plotted with error bars (plus/minus the standard error per SSD bin/category)