ch.moralsModelOvrlpPredPhitQ | R Documentation |
This function fits and plots a model whereby p(hit)quantity (that is, where the correct answer is the Item with the greatest quantity) is predicted by the overlap of value. This model is used to show that values values can predict p(Hit)quantity when values overlap is considered. The model is as follows: p(Hit)quantity = a + b1*(-1*sType) + b2*(sType*OverlapRound), where sType ==1 if targetPresent(quantity) is inconsistent with targetPresent(value), and -1 if it is consistent. OverlapRound is the overlap of the values distributions.
ch.moralsModelOvrlpPredPhitQ(
data,
OvrlpQuantConsistentCol,
itemQuantDiffCol,
overlapRoundCol,
pHitQCol,
minN = NULL,
filename = NULL,
grpLgndNames = NULL,
lgndPlacement = "topright",
cex1 = 1.5,
cexLegend = 0.75,
ylim = c(0, 1),
yLab = "p(HitQuant)",
xlab = "Overlap",
parOp = NULL,
showLegend = TRUE,
...
)
data |
a morals dataframe. |
OvrlpQuantConsistentCol |
a string the specifies the column name in "data" that contains the a boolean that specifies whether targetPresent(quantity) is consistent with targetPresent(value) (TRUE) or not (FALSE). |
itemQuantDiffCol |
a string the specifies the column name in "data" that contains the absolute value of the quantity difference between Item1 and Item2. |
overlapRoundCol |
a string that specifies the name of the column in "data" that contains the overlap column. |
pHitQCol |
a string that specifies the name of the column in "data" that contains a "1" if the participant chose the item with the greatest quantity and a "0" if they did not. |
minN |
an integer indicating the minimum number of trials in each condition that is valid for analysis. Below that number, the condition will be removed. DEFAULT = NULL. |
filename |
the filename (pdf) to save the output of the graph. DEFAULT = NULL (no graph saved) |
lgndPlacement |
a string that specified the placement of the legend: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". DEFAULT = "topright" |
cex1 |
the relative font size for the y-axis label. DEFAULT = 1. |
cexLegend |
the relative font size for the legend. DEFAULT = .75. |
ylim |
the limits of the y axis. DEFAULT = c(0,1). |
yLab |
y axis label. DEFAULT = "p(HitQuant)". |
parOp |
the parameter list to enter into par. DEFAULT = NULL |
showLegend |
A boolean to print the legend on the graph. DEFAULT = TRUE |
xLab |
x axis label. DEFAULT = "Overlap". |
the lm model fit.
ch.moralsQuantAnalyis (analysisReadyData.gp, "probe1", "probe2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.