This function calculates reaction time and accuracy scores, which are very basic to most tests.
Usage
calc_spd_acc(
data,
...,
by = NULL,
name_acc = "acc",
name_rt = "rt",
rt_rm_out = TRUE,
rt_unit = c("ms", "s")
)
Arguments
- data
Raw data of class
data.frame
.- ...
Other arguments passed to
check_outliers_rt()
.- by
The column name(s) in
data
used to be grouped by. If set toNULL
, all data will be treated as from one subject.- name_acc
The column name of the
data
input whose values are user's correctness, in which is anumeric
vector so coded that 1 means scoring correct, 0 means scoring incorrect, and that -1 means no response is made.- name_rt
The column name of the
data
input whose values are user's reaction time, in which is anumeric
vector withNA
values representing abnormal reaction times.- rt_rm_out
A logical value indicating if outliers should be removed from reaction time.
- rt_unit
The unit of response time in
data
.
Value
A tibble contains the required scores.
Details
A major part of behavior tests is the speed and accuracy metrics, which are actually the only ones that any test collects. Based on these two metrics, two basic groups of scores can be obtained. The first group contains the mean and standard deviations of response times the number, and the second contains the number and percent of correct responses.