plot_info {irt} | R Documentation |
Plot Item Information Function
Description
plot_info
Plots the item information function.
Usage
plot_info(
ip,
tif = FALSE,
theta_range = c(-5, 5),
focus_item = NULL,
title = "",
suppress_plot = FALSE,
base_r_graph = FALSE,
separate_testlet = TRUE,
...
)
Arguments
ip |
An |
tif |
If |
theta_range |
Either (a) a numeric vector of length two where the values are minimum and maximum theta values, or, (b) a numeric vector of length more than two where values represents the theta values that will be plotted. |
focus_item |
If one or more items information graphs needed to be focused whereas rest of the items' information functions needed to be on the background, provide item numbers or item ID's to be focused. |
title |
Title of the plot. If the value is |
suppress_plot |
If |
base_r_graph |
If |
separate_testlet |
A logical value indicating whether to separate
items within testlets or not. If |
... |
Extra parameters that will pass to |
Value
Depending on the value of suppress_plot
function either prints
the item information function or returns the plot object.
Author(s)
Emre Gonulates
Examples
# Plot the information function of an item
plot_info(item(b = 1))
# Plot information function(s) of an Itempool object
n <- sample(10:20,1)
ip <- generate_ip()
plot_info(ip)
plot_info(ip, tif = TRUE)
plot_info(ip, tif = TRUE, theta_range = c(-3, 3))
# Focus on one item
plot_info(ip, focus_item = "Item_2")
# Base R Graphics
plot_info(ip, base_r_graph = TRUE)
plot_info(ip, focus_item = "Item_2", base_r_graph = TRUE)
# Plot information with focus on a specific item(s)
plot_info(ip, focus_item = "Item_1")
plot_info(ip, focus_item = 3)
# plot_info(ip, focus_item = c(2, 8))
# plot_info(ip, focus_item = c("Item_5", "Item_6"))
plot_info(ip, focus_item = 7, alpha = .7, color = "gray")
plot_info(ip, focus_item = "Item_3", color = "green", base_r_graph = TRUE)
# Information Plots with Testlets
ip <- c(testlet(itempool(b = c(-1, 1), item_id = c("t1-i1", "t1-i2"),
D = 1.702), testlet_id = "t1"),
testlet(itempool(b = c(-2, 0, 2),
item_id = c("t2-i1", "t2-i2", "t2-i3"),
D = 1.702), testlet_id = "t2"),
item(b = -1.5, item_id = "i1", D = 1.702),
item(b = 0.25, item_id = "i2", D = 1.702),
item(b = 1.5, item_id = "i3", D = 1.702))
plot_info(ip)
plot_info(ip, separate_testlet = FALSE)