aat_bootstrap {AATtools}  R Documentation 
Compute bootstrapped approachbias scores
Description
Compute bootstrapped approachbias scores with confidence intervals.
Usage
aat_bootstrap(
ds,
subjvar,
pullvar,
targetvar = NULL,
rtvar,
iters,
algorithm = c("aat_doublemeandiff", "aat_doublemediandiff", "aat_dscore",
"aat_dscore_multiblock", "aat_regression", "aat_standardregression",
"aat_singlemeandiff", "aat_singlemediandiff"),
trialdropfunc = c("prune_nothing", "trial_prune_3SD", "trial_prune_3MAD",
"trial_prune_SD_dropcases", "trial_recode_SD", "trial_prune_percent_subject",
"trial_prune_percent_sample", "trial_prune_grubbs"),
errortrialfunc = c("prune_nothing", "error_replace_blockmeanplus",
"error_prune_dropcases"),
plot = TRUE,
include.raw = FALSE,
parallel = TRUE,
...
)
## S3 method for class 'aat_bootstrap'
print(x, ...)
## S3 method for class 'aat_bootstrap'
plot(x, ...)
Arguments
ds 
a longformat data.frame 
subjvar 
Quoted name of the participant identifier column 
pullvar 
Quoted name of the column indicating pull trials. Pull trials should either be represented by 1, or by the second level of a factor. 
targetvar 
Name of the column indicating trials featuring the target stimulus. Target stimuli should either be represented by 1, or by the second level of a factor. 
rtvar 
Name of the reaction time column. 
iters 
Total number of desired iterations. At least 200 are required to get confidence intervals that make sense. 
algorithm 
Function (without brackets or quotes) to be used to compute AAT scores. See Algorithms for a list of usable algorithms. 
trialdropfunc 
Function (without brackets or quotes) to be used to exclude outlying trials in each half. The way you handle outliers for the reliability computation 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 doubledfference scores and regression scoring approaches, but not when using dscores or median doubledifference scores.

errortrialfunc 
Function (without brackets or quotes) to apply to an error trial.

plot 
Plot the bias scores and their confidence intervals after computation is complete. This gives a good overview of the data. 
include.raw 
logical indicating whether raw splithalf data should be included in the output object. 
parallel 
If TRUE (default), will use parallel computing to compute results faster. If a doParallel backend has not been registered beforehand, this function will register a cluster and stop it after finishing, which takes some extra time. 
... 
Other arguments, to be passed on to the algorithm or outlier rejection functions (see arguments above) 
x 
An 
Value
A list, containing bootstrapped bias scores, their variance, bootstrapped 95 percent confidence intervals, the number of iterations, and a matrix of bias scores for each iteration.
Author(s)
Sercan Kahveci
Examples
# Compute 10 bootstrapped AAT scores.
boot<aat_bootstrap(ds=erotica[erotica$is_irrelevant==0,], subjvar="subject",
pullvar="is_pull", targetvar="is_target",rtvar="RT",
iters=10,algorithm="aat_doublemediandiff",
trialdropfunc="trial_prune_3SD",
plot=FALSE, parallel=FALSE)
plot(boot)
print(boot)