| plot_rt | R Documentation |
Visualize reaction time distributions from your model predictions. Overlay observed experimental data for reference.
plot_rt(simulated_output, observed_df, facet_x = c("item_idx"), facet_y = c())
simulated_output |
Output from |
observed_df |
Your observed data as a data frame |
facet_x |
Variables to split plots horizontally. Default is |
facet_y |
Variables to split plots vertically. Default is none ( |
Posterior predictions are plotted directly at the trial level. This pools all simulated trials for the requested facets without condition-level aggregation.
A plot showing predicted RT distributions (blue), with observed data (red) if provided
# Load example posterior simulation output
post_output_path <- system.file(
"extdata", "rdm_minimal", "abc", "posterior", "neuralnet",
package = "eam"
)
post_output <- load_simulation_output(post_output_path)
# Load example observed data
obs_file <- system.file(
"extdata", "rdm_minimal", "observation", "observation_data.csv",
package = "eam"
)
obs_df <- read.csv(obs_file)
# Plot RT distributions by item
plot_rt(post_output, obs_df, facet_x = c("item_idx"))
# Plot RT distributions by item and group
plot_rt(
post_output,
obs_df,
facet_x = c("item_idx"),
facet_y = c("group")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.