# calculate D for the SCIAT
data("raw_data") # load data
sciat_data <- clean_sciat(raw_data, sbj_id = "Participant",
block_id = "blockcode",
latency_id = "latency",
accuracy_id = "correct",
block_sciat_1 = c("test.sc_dark.Darkbad",
"test.sc_dark.Darkgood"),
block_sciat_2 = c("test.sc_milk.Milkbad",
"test.sc_milk.Milkgood"),
trial_id = "trialcode",
trial_eliminate = c("reminder",
"reminder1"))
sciat1 <- sciat_data[[1]] # compute D for the first SC-IAT
d_sciat1 <- compute_sciat(sciat1,
mappingA = "test.sc_dark.Darkbad",
mappingB = "test.sc_dark.Darkgood",
non_response = "alert")
head(d_sciat1) # dataframe containing the SC-IAT D of the of the
# first SC-IAT
sciat2 <- sciat_data[[2]] # Compute D for the second SC-IAT
d_sciat2 <- compute_sciat(sciat2,
mappingA = "test.sc_milk.Milkbad",
mappingB = "test.sc_milk.Milkgood",
non_response = "alert")
head(d_sciat2)
Run the code above in your browser using DataLab