Preprocessing | R Documentation |
These are pre-processing rules that can be used in aat_splithalf, aat_bootstrap, and aat_compute.
The following rules are to be used for the trialdropfunc
argument.
The way you handle outliers for the reliability computation and bootstrapping more broadly
should mimic the way you do it in your regular analyses.
It is recommended to exclude outlying trials when computing AAT scores using the mean double-dfference scores and regression scoring approaches,
but not when using d-scores or median double-difference scores.
prune_nothing
excludes no trials (default)
trial_prune_3SD
excludes trials deviating more than 3SD from the mean per participant.
trial_prune_3MAD
excludes trials deviating more than 3 median absolute deviations from the median per participant.
trial_prune_grubbs
applies a Grubbs' test to the data, removing one outlier at a time until the test is no longer significant.
trial_prune_SD_dropcases
removes trials deviating more than a specific number of standard deviations from the participant's mean,
and removes participants with an excessive percentage of outliers.
Required arguments:
trialsd
- trials deviating more than trialsd
standard deviations from the participant's mean are excluded (optional; default is 3)
maxoutliers
- participants with a higher percentage of outliers are removed from the data. (optional; default is .15)
trial_recode_SD
recodes outlying reaction times to the nearest non-outlying value,
with outliers defined as reaction times deviating more than a certain number of standard deviations from the participant's mean. Required argument:
trialsd
- trials deviating more than this many standard deviations from the mean are classified as outliers.
trial_prune_percent_subject
and trial_prune_percent_sample
remove trials below and/or above certain percentiles,
on a subject-by-subject basis or sample-wide, respectively. The following arguments are available:
lowerpercent
and uppperpercent
(optional; defaults are .01 and .99).
The following pre-procesing rules are to be used for the errortrialfunc
argument.
They determine what is to be done with errors - remove or recode?
prune_nothing
removes no errors (default).
error_replace_blockmeanplus
replaces error trial reaction times with the block mean, plus an arbitrary extra quantity.
If used, the following additional arguments are required:
blockvar
- Quoted name of the block variable (mandatory)
errorvar
- Quoted name of the error variable, where errors are 1 or TRUE and correct trials are 0 or FALSE (mandatory)
errorbonus
- Amount to add to the reaction time of error trials. Default is 0.6 (recommended by Greenwald, Nosek, & Banaji, 2003
)
error_prune_dropcases
removes errors and drops participants if they have more errors than a given percentage. The following arguments are available:
errorvar
- Quoted name of the error variable, where errors are 1 or TRUE and correct trials are 0 or FALSE (mandatory)
maxerrors
- participants with a higher percentage of errors are excluded from the dataset. Default is .15.
These are pre-processing rules to be used for the casedropfunc
argument.
The way you handle outliers here should mimic the way you do it in your regular analyses.
prune_nothing
excludes no participants (default)
case_prune_3SD
excludes participants deviating more than 3SD from the sample mean.
prune_nothing(ds, ...) trial_prune_percent_subject( ds, subjvar, rtvar, lowerpercent = 0.01, upperpercent = 0.99, ... ) trial_prune_percent_sample( ds, rtvar, lowerpercent = 0.01, upperpercent = 0.99, ... ) trial_prune_3SD(ds, subjvar, rtvar, ...) trial_prune_3MAD(ds, subjvar, rtvar, ...) trial_prune_SD_dropcases( ds, subjvar, rtvar, trialsd = 3, maxoutliers = 0.15, ... ) trial_recode_SD(ds, subjvar, rtvar, trialsd = 3, ...) trial_prune_grubbs(ds, subjvar, rtvar, ...) case_prune_3SD(ds, ...) error_replace_blockmeanplus( ds, subjvar, rtvar, blockvar, errorvar, errorbonus, ... ) error_prune_dropcases(ds, subjvar, errorvar, maxerrors = 0.15, ...)
ds |
A data.frame. |
... |
Other arguments (ignored). |
subjvar |
The name of the subject variable. |
rtvar |
The name of the reaction time variable. |
lowerpercent, upperpercent |
for |
trialsd |
The amount of deviation from the participant mean (in SD) after which a trial is considered an outlier and excluded (defaults to 3). |
maxoutliers |
for |
blockvar |
The name of the block variable. |
errorvar |
The name of the error variable. |
errorbonus |
for |
maxerrors |
for |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.