calc_spd_acc: Calculate basic speed and accuracy scores

View source: R/utils.R

calc_spd_accR Documentation

Calculate basic speed and accuracy scores

Description

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 to NULL, 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 a numeric 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 a numeric vector with NA 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.

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.

Value

A tibble contains the required scores.


psychelzh/preproc.iquizoo documentation built on Oct. 20, 2024, 6:27 p.m.