GG_scale_abbreviation: Plot results from scale abbreviation

GG_scale_abbreviationR Documentation

Plot results from scale abbreviation

Description

Plots results from the output of scale_abbreviation().

Usage

GG_scale_abbreviation(
  x,
  vars = c("reliability_frac", "mean_criterion_cors_frac", "r_full_score", "reliability"),
  add_lines_for_full_model = F
)

Arguments

x

Output from scale_abbreviation()

vars

Which variables to plot. Default is c("reliability_frac", "mean_criterion_cors_frac", "r_full_score", "reliability")

add_lines_for_full_model

Add lines for the full model for comparison. Default is FALSE.

Value

A ggplot2 object

Examples

library(mirt)
#simulate some mirt data 2PL
set.seed(1)
dat = mirt::simdata(N = 1e3, itemtype = "2PL", a = runif(100, 0.5, 2), d = rnorm(100, sd = 0.5))
#fit the model
fit = mirt::mirt(dat, 1)
#scale abbreviation
short_scale = abbreviate_scale(as.data.frame(dat), method = "max_loading", item_target = 10)
#plot
GG_scale_abbreviation(short_scale)

Deleetdk/kirkegaard documentation built on Feb. 28, 2025, 5:04 p.m.