README.md

output: github_document

REAC Reaction Times Analysis in Attention Research

The REAC package provides tools for

Installation

You can install the released version of abvyr from CRAN with:

devtools::install_github("tamasSmahajcsikszabo/REAC")

Functions

the shaker() function

The shaker() function transposes and organizes your data into a tidy format (observations are rows, variables are columns).

shaker(example, 
  grouping = c("year", "subject"), 
  gather = "trial", 
  value = "RT")

the ABV() function

The ABV() function calculates the Attention Bias Variability Index. One of the key inputs from the user is the width of bins which impacts the width of the calculation.

ABV(example2, 
  grouping = c("year", "subject"), 
  trial = "trial", 
  bin_width = 3, 
  value = "RT", 
  label = "label", 
  type = c("Incongruent", "Congruent"), 
  ID = "subject")

the winzer() function

The winzer() function winsorizes your data with predefined quantiles values for lower and upper bound.

winzer(example, 
  grouping = c("year", "subject"), 
  x = 0.25, 
  y = 0.75, 
  z = 1.5, 
  label = "trial", 
  value = "RT")

Effect of the winzer() on a simulated ex-Gaussian reaction time dataset

Example code for plotting the original data and the winsozized dataset

## the original dataset shaped
data <- shaker(REAC::example, grouping = c("year", "subject"), gather = "trial", value = "RT")

## the process of winsorization
winsorized <- winzer(data, grouping = c("year", "subject"), x = 0.05, y = 0.95, z = 2, value = "RT", label = "trial") %>% 
  shaker(grouping = c("year", "subject"), gather = "trial", value = "RT")



TamasSmahajcsikszabo/REAC documentation built on May 23, 2019, 8:19 p.m.