Algorithms | R Documentation |
AAT score computation algorithms
aat_doublemeandiff(ds, subjvar, pullvar, targetvar, rtvar, ...)
aat_doublemediandiff(ds, subjvar, pullvar, targetvar, rtvar, ...)
aat_dscore(ds, subjvar, pullvar, targetvar, rtvar, ...)
aat_mediandscore(ds, subjvar, pullvar, targetvar, rtvar, ...)
aat_dscore_multiblock(ds, subjvar, pullvar, targetvar, rtvar, blockvar, ...)
aat_regression(ds, subjvar, formula, aatterm, ...)
aat_standardregression(ds, subjvar, formula, aatterm, ...)
aat_singlemeandiff(ds, subjvar, pullvar, rtvar, ...)
aat_singlemediandiff(ds, subjvar, pullvar, rtvar, ...)
ds |
A long-format data.frame |
subjvar |
Column name of the participant identifier variable |
pullvar |
Column name of the movement variable (0: avoid; 1: approach) |
targetvar |
Column name of the stimulus category variable (0: control stimulus; 1: target stimulus) |
rtvar |
Column name of the reaction time variable |
... |
Other arguments passed on by functions (ignored) |
blockvar |
name of the variable indicating block number |
formula |
A regression formula to fit to the data to compute an AAT score |
aatterm |
A character naming the formula term representing the approach bias. Usually this is the interaction of the movement-direction and stimulus-category terms. |
A data.frame containing participant number and computed AAT score.
aat_doublemeandiff()
: computes a mean-based double-difference score:
(mean(push_target) - mean(pull_target)) - (mean(push_control) - mean(pull_control))
aat_doublemediandiff()
: computes a median-based double-difference score:
(median(push_target) - median(pull_target)) - (median(push_control) - median(pull_control))
aat_dscore()
: computes D-scores for a 2-block design (see Greenwald, Nosek, and Banaji, 2003):
((mean(push_target) - mean(pull_target)) - (mean(push_control) - mean(pull_control))) / sd(participant_reaction_times)
aat_mediandscore()
: computes a double-difference score usign medians,
and divides it by the median absolute deviation of the participant's overall reaction times:
((median(push_target) - median(pull_target)) - (median(push_control) - median(pull_control))) / mad(participant_reaction_times)
aat_dscore_multiblock()
: computes D-scores for pairs of sequential blocks
and averages the resulting score (see Greenwald, Nosek, and Banaji, 2003).
Requires extra blockvar
argument, indicating the name of the block variable.
aat_regression()
: aat_regression
and aat_standardregression
fit regression models to participants' reaction times and extract a term that serves as AAT score.
aat_regression
extracts the raw coefficient, equivalent to a mean difference score.
aat_standardregression
extracts the t-score of the coefficient, standardized on the basis of the variability of the participant's reaction times.
These algorithms can be used to regress nuisance variables out of the data before computing AAT scores.
When using these functions, additional arguments must be provided:
formula
- a formula to fit to the data
aatterm
- the term within the formula that indicates the approach bias; this is usually the interaction of the pull and target terms.
aat_standardregression()
: See above
aat_singlemeandiff()
: subtracts the mean approach reaction time from the mean avoidance reaction time.
Using this algorithm is only sensible if the supplied data contain a single stimulus category.
aat_singlemediandiff()
: subtracts the median approach reaction time from the median avoidance reaction time.
Using this algorithm is only sensible if the supplied data contain a single stimulus category.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.