plot_tif {shortIRT}R Documentation

Plot Test Information Functions

Description

Plot the test information functions of the short test form (default), of the full length test or of both versions

Usage

plot_tif(results, tif = c("stf", "full", "both"))

Arguments

results

The object obtained from the stf-generating functions

tif

character, define the TIF to plot, either "stf" (TIF of the STF), "full", (TIF of the full-length test) or "both" (TIF of both STF and full-length test). Default is "stf"

Value

A ggplot object

Examples

# set a seed to replicate the results
set.seed(999)
# Simulate person and item parameters
true_theta <- rnorm(1000)
b <- runif(30, -3, 3)
a <- runif(30, 0.6, 2)
parameters <- data.frame(b, a)
# simulate data
data <- sirt::sim.raschtype(true_theta, b = b, fixed.a = a)
stf <- uip(data, starting_theta = true_theta, item_par = parameters, num_item = 5)
# plot the test information function of the full-length test
plot_tif(stf, tif = "full")
# plot the test information of the full-length test and of the short test form
plot_tif(stf, tif = "both")

[Package shortIRT version 0.1.3 Index]