Learn R Programming

irt (version 0.1.1)

plot_info: Plot Item Information Function

Description

plot_info Plots the item information function.

Usage

plot_info(
  ip,
  tif = FALSE,
  theta_range = c(-5, 5),
  title = "",
  suppress_plot = FALSE,
  ...
)

Arguments

ip
tif

If TRUE a test information plot will be plotted. The default value is FALSE.

theta_range

The boundaries of x axis.

title

Title of the plot

suppress_plot

If FALSE the function will print the plot. If TRUE, function will return the plot object. Default value is FALSE.

...

Extra parameters that will pass to geom_line.

Value

Depending on the value of suppress_plot function either prints the item information function or returns the plot object.

Examples

Run this code
# NOT RUN {
# 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 <- itempool(data.frame(a = runif(n, .5, 2), b = rnorm(n),
                             c = runif(n, 0, .3), D = 1))
plot_info(ip)
plot_info(ip, tif = TRUE)
# }

Run the code above in your browser using DataLab