ch.moralsPlotsByGrpsAndGetModels | R Documentation |
This function analyzes p(No), p(Hit), RT, d prime, and beta by grouping variable for the morals data.
ch.moralsPlotsByGrpsAndGetModels(
data,
grpCols,
RTCol,
overlapRoundCol,
yesNoCol,
yesNoVal = c("Yes", "No"),
correctCol,
correctVals = c(TRUE, FALSE),
targetPresentCol,
targetPresentVals,
params,
minNperOverlap = 0,
minUniqueOverlaps = 3,
useTwoParameterModel = useTwoParameterModel,
savePlots = T
)
data |
the morals dataframe after running through ch.moralsDataPrep(). |
grpCols |
a vector of strings that specifies the names of the column in "data" that are the grouping variables. |
overlapRoundCol |
a string that specifies the name of the column in "data" that contains the overlapRound column. |
yesNoCol |
a string the specifies the column name in "data" that contains the variable with the participant's yes/no response. |
yesNoVal |
a vector of two values that specifies the yes "take action" value (index 1) and the no "take no action" value (index 2). e.g, c("yes", "no") |
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") |
targetPresentCol |
a string that specifies the name of the column in "data" that contains the whether or not the target was presented. |
targetPresentVals |
a vector of two values that specifies the "target present" value (index 1) and the "target absent" value (index 2). e.g, c("yes", "no") |
params |
a list of parameters that are read in using "ch.readMoralsDBfile.r." |
minNperOverlap |
an integer that specifies the minimum number of trials necessary to include an overlap bin in the graph. DEFAULT = 0. |
minUniqueOverlaps |
An integer specifying the minimum number of unique overlap bins necessary for the program to calculate the dPrime function. DEFAULT = 3. |
useTwoParameterModel |
A boolean that specifies whether to use a two parameter p(HOV) model. If this is set to TRUE, then this function will fit a p(HVO) model whereby the rightmost point (overlap = 1.0) is not fixed at p(HVO) = 0.5. DEFAULT = FALSE. |
savePlots |
a boolean that specifies whether to save plots. DEFAULT = T. |
RTcol |
a string that specifies the name of the column in "data" that contains the RT for each trial. |
.
ch.moralsPlotsByGrpsAndGetModels (data=moralsData,c("title", "typeOfScen"), "res.RT", "overlapRound", "keyDef", c("Yes", "No"), "correct", params=parameters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.