ch.moralsItemChoiceAnalysis: A function to graph the response choice pattern per item in...

ch.moralsItemChoiceAnalysisR Documentation

A function to graph the response choice pattern per item in the morals experiment

Description

This function graphs the response choice pattern per item in the morals experiment.

Usage

ch.moralsItemChoiceAnalysis(
  data,
  item1Col,
  item2Col,
  overlapRoundCol,
  dirOverlapCol,
  respChoiceCol,
  respChoiceVal = c("Item1", "Item2"),
  params,
  saveFigures = T,
  comparisonItemName = NULL
)

Arguments

data

morals dataframe.

item1Col

a string that specifies the name of the column in "data" that contains one of the items in the morals task.

item2Col

a string that specifies the name of the column in "data" that contains the comparison item in the morals task.

overlapRoundCol

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

dirOverlapCol

a string that specifies the name of the column in "data" that contains the directional Overlap for the item in each trial.

respChoiceCol

a string that specifies the name of the column in "data" that contains the the participant's response to the prompt - yes take action or no take no action.

respChoiceVal

a vector of two values that specifies the choose Item1 option ("yes" take action in many morals experimants) value (index 1) and the choose Item1 option ("no" take no action in many morals experimants) value (index 2).

params

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

saveFigures

a boolean to state whether to save the figures

comparisonItemName

a string that states the exact item that you want to compare to all the other items. If this parameter is used, then only one item will be compared to all the others. Otherwise, all items will be compared to each other. Default comparisonItemName = NULL.

directionCol

a string that specifies the name of the column in "data" that contains the direction of the overlap for each trial.

Value

the dataset used to create the graphs. Because this dataset doubles the actual data (all A-B item combinations are duplicated to be B-A combinations as well), do not use it for analysis unless you keep this in mind. The duplication is needed because a graph showing the responses to Item A, needs to have all Item A responses, regardless of order. It is expected that the graph showing responses to Item B will include some of Item A when there is an Item A-Item B combination.

Examples

ch.moralsItemChoiceAnalysis (analysisReadyData.gp, "Item1", "Item2", "overlapRound", "dirOverlap","keyDef", respChoiceVal = c("Yes", "No"), params, printFigures = T)

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