getPredictedRTpHVOfitForRefDist | R Documentation |
This function attempts to fit a non-linear, decelerating function to the pHVO data; a linear function to the RT data.
getPredictedRTpHVOfitForRefDist(
data,
grpCols = NULL,
RTcol,
pHVOcol,
overlapRoundCol,
refDistCol = NULL,
correctCol = NULL,
correctVals = c(TRUE, FALSE),
nCol = NULL,
minNperOverlap = 0,
useTwoParameterModel = TRUE
)
data |
A dataframe containing the choice data (often after running through ch.moralsDataPrep()). |
grpCols |
A vector of strings containing the grouping columns. Do not include the column that identifies the whether the stimuli are above or below the reference distribution value here. If NULL, then the fit will be run without grouping. DEFAULT = NULL. |
RTcol |
a string that specifies the name of the column in "data" that contains the RT for each trial. |
pHVOcol |
a string that specifies the name of the new column that will contains a p(HVO) for each cell. |
overlapRoundCol |
a string that specifies the name of the column in "data" that contains the overlap column. |
refDistCol |
a string that specifies the name of the column in "data" that identifies those stimuli whose value are above the reference distribution and those that are below the reference distribution. When this variable is included and useTwoParameterModel is set to TRUE, then the alpha parameter of the p(HVO) function will be fit so it is symetric above and below 0.5 for refHVO and refLVO. Also, the intercept parameter of the RT function is allowed to vary for refHVO and refLVO, but the slope is kept constant. DEFAULT = NULL (the refDistCol is ignored) |
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). This is used to filter the condition so that the analysis is run only on correct trials (p(HVO) of course, contains the influence of both correct and incorrect trials). If this is set to NULL, then no filtering will occur. DEFAULT = NULL |
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) |
nCol |
a string that specifies the name of the column that specifies the number of trials that composed the condition in each row of the dataframe. This is used to filter the data by minNperOverlap. If NULL, then there will be no filtering by n. DEFAULT = NULL. |
minNperOverlap |
an integer that specifies the minimum number of trials necessary to include an overlap bin in the graph. DEFAULT = 0. |
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 = TRUE. |
a list containing: the input data and best fit for RT and pHVO; RTfit = the lm object for each group; pHitFit = the nls fit object with the fit of the pHit data for each group.
getPredictedRTpHVOfitForModelList (data=moralsData,simpleModelList, "resdRT", "overlapRound", minNperOverlap = 40, useTwoParameterModel = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.