getPredictedRTpHVOfit | R Documentation |
This function attempts to fit a non-linear, decelerating function to the pHVO data; a linear function to the RT data.
getPredictedRTpHVOfit(
data,
RTcol,
pHVOcol,
overlapRoundCol,
grpCol = NULL,
correctCol = NULL,
correctVals = c(TRUE, FALSE),
useTwoParameterModel = FALSE
)
data |
A dataframe containing the summarized choice data. |
RTcol |
a string that specifies the name of the column in "data" that contains the RT for each cell. |
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. |
grpCol |
a string that specifies the name of the column in "data" that contains the grouping variable 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 grouping variable 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). If this is set to NULL, then then a single RT function will be fit to the collapsed correct and incorrect trials. 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) |
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. |
a list containing: the input data and best fit for RT and pHVO; RTfit = the lm object; pHitFit = the nls fit object with the fit of the pHVO data.
getPredictedRTpHVOfit (data=moralsData,"resdRT", "pHit", "overlapRound", grpCol = "refValue", useTwoParameterModel = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.