ch.filterOverlapsByQuantile | R Documentation |
This function filters the choice data for analysis by removing RT outliers and bad subjects based on RT and p(HVO) using quantiles rather than fixed values.
ch.filterOverlapsByQuantile(
data,
snCol,
RTcol,
overlapRoundCol,
correctCol,
correctVals = c(TRUE, FALSE),
chanceThreshold = 1,
lowRTquantileThreshold = 0,
highRTquantileThreshold = 1,
minOverlapN = 0,
statsOutputFile = NULL
)
data |
A dataframe containing the choice RT data. (typically after running through ch.moralsDataPrep()). |
snCol |
A string that specifies the name of the column in "data" that contains the subject number. |
RTcol |
A string that specifies the name of the column in "data" that contains the RT for each trial. |
overlapRoundCol |
A string that specifies the name of the column in "data" that contains the rounded overlaps for the item in each trial. Column created in ch.moralsDataPrep() via ch.mergeChoiceDataWithOverlapsData(). |
correctCol |
A string that specifies the name of the new column that will contains an indication of whether or not the response was correct. |
correctVals |
A vector of two values that specifies the "correct" value (index 1) and the "incorrect" value (index 2). e.g, c("yes", "no") |
chanceThreshold |
A number specifying the quantile that all subjects whose p(HVO) falls below it will be removed from the dataset. DEFAULT = 0 (none removed) |
lowRTquantileThreshold |
A number specifying the quantile that, for each overlapRound, individual RTs that fall below it will be removed from the dataset. DEFAULT = 0.0 (none removed) |
highRTquantileThreshold |
A number specifying the quantile that, for each overlapRound, individual RTs that fall above it will be removed from the dataset. DEFAULT = 1.0 (none removed) |
minOverlapN |
A number specifying the minimum number of responses an overlapRound condition must have to remain in the dataset. DEFAULT = 0 (none removed) |
statsOutputFile |
the filename that you want the statistics summary output written to. DEFAULT = NULL (no file written) |
a dataframe of filtered data.
ch.filterOverlapsByQuantile (data=moralsData, "sn", "RT", "overlapRound", "avePred", correctVals = c(TRUE, FALSE), chanceThreshold = 0.5, lowRTquantileThreshold = 0.025, highRTquantileThreshold = 0.975, minOverlapN = 40)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.