| compute_iat | R Documentation |
Compute D-score for the IAT according to different algorithms.
compute_iat(data, Dscore = c("d1", "d2", "d3", "d4", "d5", "d6"))
data |
Dataframe with class |
Dscore |
Character. Indicates which D-score to compute. For details on the algorithms, please refer to Greenwald et al. (2003). |
Dataframe with class "dscore". The number of rows of the
dataframe corresponds to the total number of participants.
Variables are defined as follows (the values are specific for each
participant):
participantRespondents' IDs.
n_trialNumber of trails before data cleaning.
nslow10000Number of slow trials (> 10,000 ms).
nfast400Number of fast trials (< 400 ms).
nfast300Number of fast trials (< 300 ms).
accuracy.practice_MappingAProportion of correct responses in practice block of Mapping A.
accuracy.practice_MappingBProportion of correct responses in practice block of Mapping B.
accuracy.test_MappingAProportion of correct responses in test block of Mapping A.
accuracy.test_MappingBProportion of correct responses in test block of Mapping B.
accuracy.MappingAProportion of correct responses in Mapping A.
accuracy.MappingBProportion of correct responses in Mapping B.
RT_mean.MappingAMean response time in Mapping A.
RT_mean.MappingBMean response time in Mapping B.
mean_practice_MappingAMean response time in practice block of Mapping A.
mean_practice_MappingBMean response time in practice block of Mapping B.
mean_test_MappingAMean response time in test block of Mapping A.
mean_test_MappingBMean response time in test block of Mapping B.
d_practice_dXD-scores compute_iat on the practice blocks. The X stands for the selected D-score procedure.
d_test_dXD-scores compute_iat on the test blocks. The X stands for the selected D-score procedure.
dscore_dXThe average D-score for the practice and test D-scores. The X stands for the selected D-score procedure.
cond_ordIndicates the order with which the associative
conditions have been presented, either "MappingA_First" or
"MappingB_First".
legendMappingAIndicates the corresponding value of Mapping A in the original dataset.
legendMappingBIndicates the corresponding value of Mapping B in the original dataset.
# compute D-score 2 for the IAT data ###
data("raw_data") # import data
iat_cleandata <- clean_iat(raw_data, sbj_id = "Participant",
block_id = "blockcode",
mapA_practice = "practice.iat.Milkbad",
mapA_test = "test.iat.Milkbad",
mapB_practice = "practice.iat.Milkgood",
mapB_test = "test.iat.Milkgood",
latency_id = "latency",
accuracy_id = "correct",
trial_id = "trialcode",
trial_eliminate = c("reminder", "reminder1"),
demo_id = "blockcode",
trial_demo = "demo")
iat_data <- iat_cleandata[[1]]
# calculate D-score
iat_dscore <- compute_iat(iat_data,
Dscore = "d2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.