ch.moralsGetProbNo: A function to assess the participants bias to say no as a...

ch.moralsGetProbNoR Documentation

A function to assess the participants bias to say no as a function of "x"

Description

This function assesses the participants bias to say no as a function of "x"

Usage

ch.moralsGetProbNo(
  data,
  x,
  yesNoCol,
  yesNoVal = c("Yes", "No"),
  summarize = T,
  minNperXbin = 0,
  plotFilename = NULL,
  ...
)

Arguments

data

the dataframe.

x

a string the specifies the column name in "data" that contains the x variable.

yesNoCol

a string the specifies the column name in "data" that contains the variable with the participant's yes/no response.

summarize

Do you want to collapse the data by "x"? DEFAULT = TRUE.

minNperXbin

an integer that specifies the minimum number of trials necessary to include an group of the x variable in the graph. DEFAULT = 0.

plotFilename

the filename to save the plot (pdf) if you want it. DEFAULT = NULL (no plot saved).

respYNVal

a vector of two values that specifies the yes "take action" value (index 1) and the no "take no action" value (index 2). e.g, c("yes", "no")

Value

an lm fit object.

Examples

ch.moralsGetProbNo (data=moralsData, "overlapRound", "respDef", c("Yes", "No"))

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