ch.moralsGrpRTpHit | R Documentation |
This function analyzes the group morals data.
ch.moralsGrpRTpHit(
data,
trialCol,
RTCol,
fitCol,
resCol,
overlapRoundCol,
yesNoCol,
yesNoVal = c("Yes", "No"),
correctCol,
correctVals = c(TRUE, FALSE),
useTwoParameterModel = FALSE,
params
)
data |
the morals dataframe after running through ch.moralsDataPrep(). |
trialCol |
a string that specifies the name of the column in "data" that contains the trial number. |
fitCol |
a string that specifies the name of the new column that will contain the predicted datapoints. |
resCol |
a string that specifies the name of the new column that will contain the residual datapoints. |
overlapRoundCol |
a string that specifies the name of the column in "data" that contains the overlap 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") |
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. |
params |
a list of parameters that are read in using "ch.readMoralsDBfile.r." |
RTcol |
a string that specifies the name of the column in "data" that contains the RT for each trial. |
dataframe with the learning function fit and residuals
ch.moralsGrpRTpHit (data=moralsData,"trial", "RT", "res.RT", "fit.RT", "overlap", "keyDef", c("Yes", "No"), "correct", c("yes", "no"), params=parameters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.