ch.moralsItemChoiceAnalysis | R Documentation |
This function graphs the response choice pattern per item in the morals experiment.
ch.moralsItemChoiceAnalysis(
data,
item1Col,
item2Col,
overlapRoundCol,
dirOverlapCol,
respChoiceCol,
respChoiceVal = c("Item1", "Item2"),
params,
saveFigures = T,
comparisonItemName = NULL
)
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. |
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.
ch.moralsItemChoiceAnalysis (analysisReadyData.gp, "Item1", "Item2", "overlapRound", "dirOverlap","keyDef", respChoiceVal = c("Yes", "No"), params, printFigures = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.