rrwRawDataToRRWFormatData: This function uses the rrwModelList to collapse the raw data...

View source: R/rrwRawDataToRRWFormatData.r

rrwRawDataToRRWFormatDataR Documentation

This function uses the rrwModelList to collapse the raw data into usable RRW data

Description

Function that uses the rrwModelList to collapse the raw data into usable RRW data

Usage

rrwRawDataToRRWFormatData(
  data,
  grpCols = NULL,
  dataRtCol = "rt",
  correctCol = "correct",
  correctVals = c(TRUE, FALSE),
  dataOverlapCol = "overlapRound",
  splitByCorrect = TRUE
)

Arguments

data

This is a dataframe containing the raw trial-by-trial data that must contain the following columns: overlap; RT (often a median); the proportion correct/incorrect; whether or not the row specifies a correct or incorrect trial. The dataset can also contains columns that effect code the influence of different parameters.

grpCols

A vector of strings containing the grouping columns. If NULL this argument will be ignored. DEFAULT = NULL

dataRtCol

A string that identifies the name of the column in data that contains the RTs for the specific overlap/correct/condition combination. Default is "rt"

correctCol

a string that specifies the name of the column that specifies if the participant chose the item with the greatest value distribution (correct) or if they did not (incorrect).

correctVals

a vector of two values that specifies the "correct" value (index 1) and the "incorrect" value (index 2). e.g, c("yes", "no"). DEFAULT = c(TRUE, FALSE)

dataOverlapCol

A string that identifies the name of the column in data that contains the distributional overlaps for each row. The default is "overlap"

splitByCorrect

A boolean that specifies whether to use the "correct/incorrect" column as a grouping variable for the RT data. DEFAULT = TRUE. '

Value

The input data for the RRW, which is, essentially, the data summarized by the critical condition, overlap, etc.

Examples

rrwRawDataToRRWFormatData (data, modelList, "rt", "correct", c(TRUE, FALSE), "overlapRound")

ccpluncw/ccpl_R_RRW documentation built on July 4, 2025, 3:24 p.m.