aat_splithalf {AATtools} | R Documentation |
Compute the bootstrapped split-half reliability for approach-avoidance task data
Description
Compute bootstrapped split-half reliability for approach-avoidance task data.
Usage
aat_splithalf(
ds,
subjvar,
pullvar,
targetvar = NULL,
rtvar,
stratvars = NULL,
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"),
casedropfunc = c("prune_nothing", "case_prune_3SD"),
plot = TRUE,
include.raw = FALSE,
parallel = TRUE,
...
)
## S3 method for class 'aat_splithalf'
print(x, coef = c("SpearmanBrown", "Raju", "FlanaganRulon"), ...)
## S3 method for class 'aat_splithalf'
plot(x, type = c("median", "minimum", "maximum", "random"), ...)
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. |
stratvars |
Names of additional variables to stratify splits by. |
iters |
Total number of desired iterations. At least 6000 are recommended for reasonable estimates. |
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 double-dfference scores and regression scoring approaches, but not when using d-scores or median double-difference scores.
|
errortrialfunc |
Function (without brackets or quotes) to apply to an error trial.
|
casedropfunc |
Function (without brackets or quotes) to be used to exclude outlying participant scores in each half. The way you handle outliers here should mimic the way you do it in your regular analyses.
|
plot |
Create a scatterplot of the AAT scores computed from each half of the data from the last iteration. This is highly recommended, as it helps to identify outliers that can inflate or diminish the reliability. |
include.raw |
logical indicating whether raw split-half 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 |
coef |
Optional character argument, indicating which reliability coefficient should be printed. Defaults to Raju's beta. |
type |
Character argument indicating which iteration should be chosen. Must be an abbreviation of
|
Details
The calculated split-half coefficients are described in Warrens (2016).
Value
A list, containing the mean bootstrapped split-half reliability, bootstrapped 95 a list of data.frames used over each iteration, and a vector containing the split-half reliability of each iteration.
Author(s)
Sercan Kahveci
References
Warrens, M. J. (2016). A comparison of reliability coefficients for psychometric tests that consist of two parts. Advances in Data Analysis and Classification, 10(1), 71-84.
See Also
Examples
split <- aat_splithalf(ds=erotica[erotica$is_irrelevant==0,],
subjvar="subject", pullvar="is_pull", targetvar="is_target",
rtvar="RT", stratvars="stimuluscode", iters=10,
trialdropfunc="trial_prune_3SD",
casedropfunc="case_prune_3SD", algorithm="aat_dscore",
plot=FALSE, parallel=FALSE)
print(split)
#Mean reliability: 0.521959
#Spearman-Brown-corrected r: 0.6859041
#95%CI: [0.4167018, 0.6172474]
plot(split)
#Regression Splithalf
aat_splithalf(ds=erotica[erotica$is_irrelevant==0,],
subjvar="subject", pullvar="is_pull", targetvar="is_target",
rtvar="RT", iters=10, trialdropfunc="trial_prune_3SD",
casedropfunc="case_prune_3SD", algorithm="aat_regression",
formula = RT ~ is_pull * is_target, aatterm = "is_pull:is_target",
plot=FALSE, parallel=FALSE)
#Mean reliability: 0.5313939
#Spearman-Brown-corrected r: 0.6940003
#95%CI: [0.2687186, 0.6749176]