rtDescriptives: Descriptives of reaction time data

Description Usage Arguments Details Value Examples

View source: R/rtDescriptives.R

Description

Descriptives of reaction time data

Usage

1

Arguments

formula

A formula object of the form: binary response ~ reaction time + condition1 * condition2

data

A dataframe for looking up data specified in formula. For backwards compatibility this can also be with: a column named rt containing response times in ms, a column named response containing at most 2 response options, and an optional column named condition containing a numeric index as to which conditions observations belong.

plot

Logical, should a density plot of all condition-response pairs be made?

verbose

Logical, should a table of counts and proportions be printed?

Details

This function and rtHist are helper functions to inspect raw data.

Value

Invisibly returns an object of class 'D*M'. It's first element is table and contains raw counts and proportions for condition response pairs, conditions, and responses. It's second element plot contains a ggplot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
tt <- seq(0, 5, .01)
pars <- matrix(.5, 5, 2)
pars[1, ] <- 1
pars[2, ] <- c(0, 2)
dat <- simData(n = 3e3, pars = pars, tt = tt, pdfND = dbeta(tt, 10, 30))
x <- rtDescriptives(data = dat)

print(x$table, what = 'cr')
print(x$table, what = 'c')
print(x$table, what = 'r')

DstarM documentation built on Aug. 29, 2020, 1:06 a.m.