ch.moralsDprimeAnalysis: A function to calculate a dPrime analysis on the Morals data.

ch.moralsDprimeAnalysisR Documentation

A function to calculate a dPrime analysis on the Morals data.

Description

This function analyzes the group morals data.

Usage

ch.moralsDprimeAnalysis(
  data,
  overlapRoundCol,
  correctCol,
  correctVals,
  targetPresentCol,
  targetPresentVals,
  resCol,
  addCorrection = TRUE,
  minUniqueOverlaps = 3,
  params,
  printR2 = TRUE,
  filenameID = NULL
)

Arguments

data

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

overlapRoundCol

a string that specifies the name of the column in "data" that contains the overlap round column.

correctCol

a string the specifies the column name in "data" that contains the variable whether the participant's response was correct.

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")

resCol

a string that specifies the name of the new column that will contain the residual datapoints.

addCorrection

a boolean that specifies whether you want a .5 correction to be added the total hits, FAs, misses, and CRs. This corrects for 0 and 1 values for FA and Hits. DEFAULT = T.

minUniqueOverlaps

An integer specifying the minimum number of unique overlap bins necessary for the program to calculate the dPrime functions. DEFAULT = 3.

params

a list of parameters that are read in using "ch.readMoralsDBfile.r."

Value

a dataframe with the dPrime tatistics.

Examples

ch.moralsDprimeAnalysis (data=moralsData,"overlapRound", "correct", c(1,0), "targetPresent", c(TRUE,FALSE), params = params)

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