aat_stimulusscores {AATtools}R Documentation

Compute stimulus-specific bias scores Computes mean single-difference scores (push - pull) for each stimulus.

Description

Compute stimulus-specific bias scores Computes mean single-difference scores (push - pull) for each stimulus.

Usage

aat_stimulusscores(
  ds,
  subjvar,
  stimvar,
  pullvar,
  targetvar = NULL,
  rtvar,
  aggfunc = c("mean", "median"),
  iters = 5
)

Arguments

ds

the data.frame to use

subjvar

Name of the subject-identifying variable

stimvar

Name of the stimulus-identifying variable

pullvar

Name of the movement-direction identifying variable

targetvar

Optional. Name of the stimulus-category identifying variable

rtvar

Name of the reaction-time identifying variable

aggfunc

The function with which to aggregate the RTs before computing difference scores. Defaults to mean but can be changed to median.

iters

If there are missing values (which is almost inevitable) then multiple imputation will be used to complete the covariance matrix - this argument sets the number of multiple imputations to be used.

Value

Exports a list containing a data.frame with stimulus-specific bias scores, indicated in the column names, a covariance matrix of that same data, and a data.frame indicating to which stimulus category each stimulus belongs.

Examples

ds<-aat_simulate(biasfx_jitter=40,nstims=16)
ds$stim<-paste0(ds$stim,"-",ds$is_target)
aat_stimulusscores(ds,"subj","stim","is_pull","is_target","rt")

[Package AATtools version 0.0.2 Index]