ch.moralsFilterData | R Documentation |
This function filters the morals data for analysis by removing RT outliers and bad subjects based on RT and p(hit). The thresholds for removal are set in the moralsDBfile that is read and stored in a parameter list.
ch.moralsFilterData(
data,
snCol,
RTcol,
overlapRoundCol,
aveRTcol,
correctCol,
correctVals = c(TRUE, FALSE),
item1cols = c("Item1"),
item2cols = c("Item2"),
params
)
data |
the morals dataframe 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 occured in ch.moralsDataPrep(). |
aveRTcol |
a string that specifies the name of the column in "data" that contains the average RT by subject. Column created in ch.moralsDataPrep(). |
correctCol |
a string that specifies the name of the new column that will contains a "1" if the participant chose the item with the greatest value distribution and a "0" if they did not. |
correctVals |
a vector of two values that specifies the "correct" value (index 1) and the "incorrect" value (index 2). e.g, c("yes", "no") |
item1cols |
a vector of strings that specifies the names of the columns in "data" that contains the the probes in Item 1. |
item2cols |
a vector of strings that specifies the names of the columns in "data" that contains the the probes in Item 2. |
params |
a list of parameters that are read in using "ch.readMoralsDBfile.r." |
a dataframe of filtered data. It also writes the data to "analysisReadyData.txt," which will be used by other functions.
ch.moralsFilterData (data=moralsData, "sn", "RT", "overlapRound", "aveRT", "avePred", params=parameters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.