calculateDelta {DMCfun} R Documentation

## calculateDelta

### Description

Calculate delta plot. Here RTs are split into n bins (Default: 5) for compatible and incompatible trials separately. Mean RT is calculated for each condition in each bin then subtracted (incompatible - compatible) to give a compatibility effect (delta) at each bin.

### Usage

calculateDelta(
dat,
nDelta = 19,
tDelta = 1,
columns = c("Subject", "Comp", "RT"),
compCoding = c("comp", "incomp"),
quantileType = 5
)


### Arguments

 dat DataFrame with columns containing the participant number, condition compatibility, and RT data (in ms). nDelta The number of delta bins. tDelta type of delta calculation (1=direct percentiles points, 2=percentile bounds (tile) averaging) columns Name of required columns Default: c("Subject", "Comp", "RT") compCoding Coding for compatibility Default: c("comp", "incomp") quantileType Argument (1-9) from R function quantile specifying the algorithm (?quantile)

### Value

calculateDelta returns a DataFrame with distributional delta analysis data (Bin, comp, incomp, meanBin, Effect)

### Examples

# Example 1
dat <- createDF(nSubjects = 1, nTrl = 10000, design = list("Comp" = c("comp", "incomp")))
RT = list("Comp_comp"   = c(500, 80, 100),
"Comp_incomp" = c(600, 80, 140)))
delta <- calculateDelta(dat)

# Example 2
dat <- createDF(nSubject = 1, nTrl = 10000, design = list("Congruency" = c("cong", "incong")))