CA.curves: Plots confidence-accuracy relationship curves

View source: R/CA.rel.R

CA.curvesR Documentation

Plots confidence-accuracy relationship curves

Description

CA.curves() takes the argument of CA.rel() and prints the seperate calibration tables (mean, prop correct, etc.) for each confidence interval per variable

Usage

CA.curves(CA.rel, legend.position = c(0, 1), legend.text.size = 12,
  labelVarType = FALSE, ylim = NULL, ybreaks = c(0, 20, 40, 60, 80,
  100), xlim = NULL)

Arguments

CA.rel

Object created by the CA.rel function

legend.position

A vector indicating the position of the legend where c(0,0) is bottom left and c(1,1) is top right. To hide the legend, define the argument as "none"

legend.text.size

Integer indicating text size of the legend, the standard is 12

labelVarType

A logical variable indicating whether the legend names should include the variable names.

ylim

A vector indicating the limitation of the y axis. Standard is c(0,100) for calibration analyses and c(50,100) for CAC analyses

ybreaks

A vector indicating the breaks of the y axis.

xlim

A vector indication the limitation of the x axis.

Details

For a more detailed explanation see the github page for a manual. https://github.com/IngerMathilde/CArelationship

Author(s)

Inger van Boeijen <inger.vb.r@gmail.com>

Examples

library(jtools)
library(ggplot2)
data(metamemoryCA)

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)
# Include variable names in label
CA.curves(Ch, labelVarType = TRUE)
# Change legend position to bottom right corner and change legend text size to 23
CA.curves(Ch, legend.position = c(1,0), legend.text.size = 10)


IngerMathilde/legalPsych documentation built on March 28, 2024, 10:10 p.m.