View source: R/rac_functions.R
| make_rac | R Documentation |
Main function to compute and plot RAC (Response Time-Accuracy Characteristic) for eyewitness lineup data.
make_rac(
data,
lineup_size = 6,
time_bins = NULL,
show_plot = TRUE,
innocent_suspect = "auto",
...
)
data |
A dataframe with columns: target_present, identification, response_time |
lineup_size |
Integer. Number of people in lineup (default = 6) |
time_bins |
Numeric vector of bin edges (recommended for continuous RT data) |
show_plot |
Logical. Whether to display the plot (default = TRUE) |
innocent_suspect |
How innocent-suspect identifications in
target-absent lineups are obtained. |
... |
Additional arguments passed to make_rac_gg() |
A list containing RAC data and plot
# Example with binned response times (in milliseconds)
lineup_data <- create_example_lineup_data(n_trials = 200,
include_response_time = TRUE,
seed = 123)
rac_result <- make_rac(lineup_data,
time_bins = c(0, 5000, 10000, 15000, 20000))
print(rac_result)
rac_result$plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.