ch.moralsItemRTpHit: A function to analyze the Morals data by item

ch.moralsItemRTpHitR Documentation

A function to analyze the Morals data by item

Description

This function plots the relation between overlap and p(HVO)/RT for every item.

Usage

ch.moralsItemRTpHit(
  data,
  itemCols,
  resCol,
  overlapRoundCol,
  correctCol,
  correctVals = c(TRUE, FALSE),
  useTwoParameterModel = FALSE,
  minNperOverlap = 0,
  minUniqueOverlaps = 3,
  statsOutputFile = NULL,
  numPlotRows = 2,
  numPlotCols = 2,
  dt.set = NULL
)

Arguments

data

the morals dataframe after running through ch.moralsDataPrep().

itemCols

a vector of strings that specifies the names of the columns in "data" that contains the the probes. This is all the columns for all of the groups

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.

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.

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 pHVO and RT function. DEFAULT = 3.

statsOutputFile

the filename that you want the statistics summary output written to. DEFAULT = NULL (construct filename from "params")

numPlotRows

an integer that specifies the number of rows in the output figure, DEFAULT = 2)

numPlotCols

an integer that specifies the number of columns in the output figure, DEFAULT = 2)

dt.set

A string that specifies the a short title to identify the output of these plots. DEFAULT = NULL)

Value

dataframe with the learning function fit and residuals

Examples

ch.moralsSnRTpHit (data=moralsData,"sn", "trial", "RT", "res.RT", "fit.RT", "overlap", "keyDef", c("Yes", "No"), "correct", params=parameters)

ccpluncw/ccpl_R_chMorals documentation built on Feb. 4, 2024, 3:30 p.m.