CA.rel | R Documentation |
CA.rel()
returns an object which can be placed into the different summary
functions (e.g.,CA.curves()
, CA.print()
) to showcase the different aspect of the
confidence-accuracy relationship.
CA.rel(data, confidence, correct, test, confidenceLevels, var = NULL,
var.names = NULL, var.levels = NULL, jack = FALSE,
confMin = NULL, confMax = NULL)
data |
Dataset used for analysis. |
confidence |
A string which identifies the variable that holds the confidence estimations. |
correct |
A string which identifies the variable that states whether a person made a correct identification rated as 0 incorrect and 1 correct. |
test |
A character string specifying the confidence-accuracy relationship test. The following is permitted: "CAL" (calibration) or "CAC" (confidence-accuracy characteristics) |
confidenceLevels |
A list or vector identifying the levels for which confidence is tested. Either all levels can be tested separately of confidence levels can also be collapsed. |
var |
A vector containing variable names, which allows comparison of calibration or CAC performance across different groups of those variables (e.g., choosers vs. nonchoosers). |
var.names |
A vector containing variable names that will be displayed in the graph. |
var.levels |
A vector to be declared if one wants to compare only specific levels of a certain variable with each other. |
jack |
A logical variable. If true, a jackknife SEs will be calculated to attain 95 percent confidence intervals for the C, OU, NRI statistics. |
confMin |
An integer, indicating the minimum value of the confidence scale used. It is only necessary to define this variable, if the confidenceLevel variable disregards the lower spectrum of the attainable confidence levels |
confMax |
An integer, indicating the maximum value of the confidence scale used. It is only necessary to define this variable, if the confidenceLevel variable disregards the higher spectrum of the attainable confidence levels |
For a more detailed explanation see the github page for a manual. https://github.com/IngerMathilde/CArelationship
A CA.rel object that can be put into several summary functions
Inger van Boeijen <inger.vb.r@gmail.com>
library(jtools)
data(metamemoryCA)
# Compare choosers vs. nonchoosers with collapsed confidence groups and Jackknife SE
Ch <- CA.rel(data = metamemoryCA, confidence = "Confidence",
correct = "ChoiceCorrect", test = "CAL", var = "ChoiceChooser",
confidenceLevels = list(c(0,20),c(30,40), c(50,60), c(70,80), c(90,100)),
jack = TRUE)
CA.curves(Ch)
CA.table(Ch)
# Create CAC curves for high vs. low raters with adjusted variable names
data.CAC <- subset(metamemoryCA, ChoiceValue == "Target") #create a subset with only suspect ID
CAC <- CA.rel(data = data.CAC, confidence = "Confidence",
correct = "ChoiceCorrect", test = "CAC", var =
c("Rater.EMS.Relative.Face.Recognition", "Rater.EMS.Eyewitness.Ability"),
var.names = c("EMS Relative Face Recognition", "EMS Eyewitness Ability"),
var.levels = c('Low', 'High'),
confidenceLevels = list(c(0,60), c(70,80), c(90,100)))
CA.curves(CAC)
CA.table(CAC)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.