plot_model_parameters: Plot best-fitting parameters of model fit

Description Usage Arguments Value

View source: R/plotting.R

Description

Function to plot the best-fitting parameters of either the 2-component or 3-component model. .

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_model_parameters(
  model_fit,
  model,
  id_var = "id",
  set_size_var = NULL,
  condition_var = NULL,
  n_col = 2,
  return_data = FALSE,
  palette = "Dark2"
)

Arguments

model_fit

The model fit object containing the parameters to be plotted.

model

A string indicating the model that was fit to the data. Currently the options are "2_component", "3_component", "slots", and "slots_averaging".

id_var

The column name coding for participant id.

set_size_var

The column name (if applicable) coding for the set size of each response.

condition_var

The column name (if applicable) coding for the condition of each response.

n_col

An integer controlling the number of columns in the resulting plot.

return_data

A boolean (TRUE or FALSE) indicating whether the data for the plot should be returned.

palette

A character stating the preferred colour palette to use. To see all available palettes, type display.brewer.all() into the console.

Value

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:


mixtur documentation built on Aug. 3, 2021, 9:07 a.m.