knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
R package for computing different Implicit Measures scores
The implicitMeasures
package aims at providing a tool for easily computing the scores for the Implicit Association Test [IAT; @Greenwald1998] and the Single Category Implicit Association Test [SC-IAT; @karpinski2006].
Six different algorithms for the computation of the IAT effect, the so-called D score, are available [@Greenwald2003]. The six algorithms differentiate themselves according to how extreme fast responses and error responses are treated. Different mistakes can be made during the computation of the D score. Moreover, many researchers fail to report the exact algorithm they have used for computing the D score. Consequently, the replicability of the results might be compromised [@ellithorpe2015].
implicitMeasures
includes the following functions:
clean_iat()
: Prepare and clean the IAT data.clean_sciat()
: Prepare and clean the SC-IAT data.compute_iat()
: Compute the IAT D score.compute_sciat()
: Compute the SC-IAT D score.descript_d()
: Descriptive table of the D scores (also in LaTeX).d_density()
: Plot IAT or SC-IAT scores (distribution).d_point()
: Plot IAT or SC-IAT scores (points).multi_dscore()
: Compute and plot multiple IAT D scores.multi_dsciat()
: Plot SC-IAT D scores.IAT_rel()
: computes the IAT reliability [@gaw2017]All the functions for the graphical representation of the results are based on ggplot2
[@ggplot2], and can be further customized by the users.
You can install the released version of implicitMeasures
from CRAN with:
install.packages("implicitMeasures")
and the development version from GitHub with:
# install.packages("devtools") # un-comment to install devtools devtools::install_github("OttaviaE/implicitMeasures")
This is a basic example which shows you how to compute the IAT D score. More detailed examples are illustrated in the package vignettes.
library(implicitMeasures) # load the raw_data dataframe data("raw_data") # prepare the dataset for the computation iat_data <- 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")) # store the dataset for computing the D-score iat <- iat_data[[1]] # Compute the D-score dscore <- compute_iat(iat, D = "d3")
The compute_iat()
function results in a data frame with class dscore
. This data frame can be passed to other functions, for example for plotting the results, either at the individual level:
d_point(dscore, x_values = FALSE)
or at the sample level:
d_density(dscore, graph = "density")
You can import your data in any format you want. If you import data sets from SPSS, please use either haven::read_sav("~/path/to/mydata.sav")
or foreign::read.spss("~/path/to/mydata.sav")
without changing the default options of the functions. The implicitMeasures
package recognizes that the data frame is coming from SPSS and handles it.
If you find any bugs or encounter any problems in using this package, please post a minimal reproducible example on github. For questions and other discussions, you can contact the author and maintainer of the package at otta.epifania@gmail.com.
implicitMeasures
If you want to contribute to implicitMeasures
, by all means! You can open a new branch on https://github.com/OttaviaE/implicitMeasures, modify the code, and submit your pull request for added features.
A special thank to Filippo Gambarota.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.