Function to plot the best-fitting parameters of either the 2-component or 3-component model. .
plot_model_parameters(
model_fit,
model,
id_var = "id",
set_size_var = NULL,
condition_var = NULL,
n_col = 2,
return_data = FALSE,
palette = "Dark2"
)
If return_data
is set to FALSE
(which it is by
default),the function returns a ggplot2 object visualising the mean model
parameters across participants (if applicable) per set-size (if applicable)
and condition (if applicable).
If return_data
is set to TRUE
, the function returns a
list with two components:
plot:
The ggplot2 object.
data:
A data frame with the data used to generate the plot.
The model fit object containing the parameters to be plotted.
A string indicating the model that was fit to the data. Currently the options are "2_component", "3_component", "slots", and "slots_averaging".
The column name coding for participant id.
The column name (if applicable) coding for the set size of each response.
The column name (if applicable) coding for the condition of each response.
An integer controlling the number of columns in the resulting plot.
A boolean (TRUE or FALSE) indicating whether the data for the plot should be returned.
A character stating the preferred colour palette to use. To see all available palettes, type?scale_colour_brewer into the console.