Learn R Programming

AATtools (version 0.0.1)

q_reliability: Compute psychological experiment reliability

Description

This function can be used to compute an exact reliability score for a psychological task whose results involve a difference score. The resulting intraclass correlation coefficient is equivalent to the average all possible split-half reliability scores. It ranges from -1 to 1, with -1 implying that all variance in the data is explained by within-subjects variability, 1 implying that all variance is explained by between-subjects variability, and 0 implying that within-subjects and between-subjects variability contribute equally to the total variance in the sample.

Usage

q_reliability(ds, subjvar, formula, aatterm = NA)

# S3 method for qreliability print(x, ...)

# S3 method for qreliability plot(x, ...)

Value

a qreliability object, containing the reliability coefficient, and a data.frame with participants' bias scores and score variance.

Arguments

ds

a long-format data.frame

subjvar

name of the subject variable

formula

a formula predicting the participant's reaction time using trial-level variables such as movement direction and stimulus category

aatterm

a string denoting the term in the formula that contains the participant's approach bias

x

a qreliability object

...

Other arguments passed to the generic print and plot functions.

Author

Sercan Kahveci

Examples

Run this code
# Double-difference score reliability
q_reliability(ds=erotica,subjvar="subject",
              formula= RT ~ is_pull * is_target, aatterm = "is_pull:is_target")

# Single-difference reliability for target stimuli
q_reliability(ds=erotica[erotica$is_target ==1,],subjvar="subject",
              formula= RT ~ is_pull, aatterm = "is_pull")

# Reliability of the mean reaction time of approaching target stimuli (no difference score)
q_reliability(ds=erotica[erotica$is_target ==1 & erotica$is_pull ==1,],subjvar="subject",
              formula= RT ~ 1, aatterm = "1")

Run the code above in your browser using DataLab