descript_d: Descriptive table of either the IAT D-score or the SC-IAT Ds

Description Usage Arguments Value Examples

View source: R/descript_d.R

Description

Descriptive statistics for the IAT D-score or the SC-IAT D.

Usage

1
descript_d(data, latex = FALSE)

Arguments

data

Dataframe with either class dscore or class dsciat.

latex

Logical. If TRUE, the table for the descriptive statistics will be printed in latex format. Default is FALSE.

Value

Dataframe, containing the mean, s.d., minimum and maximum of the IAT (D-score, D-practice, and D-test) or the SC-IAT (D-Sciat, RT.MappingA, RT.MappingB).

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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")
  descript_d(iat_dscore) # descriptive statistics for the IAT

 # 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")
  descript_d(d_sciat1,
             latex = TRUE) # descriptive statistics for the SC-IAT in latex
                          # format

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