multi_dscore: Compute and plot multiple D-scores

Description Usage Arguments Value Examples

View source: R/multi_dscore.R

Description

Compute and plot multiple D-scores.

Usage

1
multi_dscore(data, ds = c("built-in", "error-inflation"))

Arguments

data

Dataframe of class iat_clean.

ds

String. Indicates which D-score to compute. built-in compute only D-score with the built-in error correction (D1 and D2), error-inflation compute the D-scores without built-in correction (D3 to D6).

Value

A list. The first object is a dataframe containing all the computed Dscores. The second object is a ggplot object, depicting the distribution of the D-scores through violin plots.

@import tidyr

Examples

 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
 # Compute multiple IAT D-scores
  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]]

  # compute the mulitple scores and prepare the graphs for the built-in
  # strategies

  multiple_scores <- multi_dscore(iat_data, ds = "built-in")

  data_multiple <- multiple_scores$dscores # store the D-score in a dataframe

  # plot the results
  multiple_scores$graph
  

OttaviaE/implicitMeasures documentation built on Feb. 22, 2022, 2:05 p.m.