Description Usage Arguments Value Examples
Plot the individual D-score or SC-IAT D.
1 2 3 4 5 6 7 8 9 |
data |
Dataframe with either class |
point_size |
Numeric. Indicates the size of the points in the graph. Default is 1. |
x_label |
Character. Label of the x-axis. Default is |
x_values |
Logical. Shows the values for x-axis (default = |
order_sbj |
Character. Defines the order with which the participants are displayed. Default is the default order of participants in the dataframe. |
col_point |
Character. Defines the color of the points. Default is
|
include_stats |
Logical. Indicates whether to add descriptive statistics.
The |
A ggplot object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # Plotting the IAT D-score
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")
d_point(iat_dscore) # default plot
d_point(iat_dscore, order_sbj = "D-increasing") # D-score with increasing
# order
d_point(iat_dscore, order_sbj = "D-decreasing",
col_point = "salmon") # D-score with decreasing order changed color
# Plot the SC-IAT D for the first SC-IAT
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")
d_point(d_sciat1, col_point = "salmon",
include_stats = TRUE) # SC-IAT D with descriptive statistics
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.