plot.cat_output {irt} | R Documentation |
Plot progress of a CAT algorithm for one examinee
Description
plot.cat_output
Plots the progress of CAT for one examinee.
Usage
## S3 method for class 'cat_output'
plot(
x,
...,
plot_b = TRUE,
se_band = TRUE,
horizontal_line = "true_theta",
title = "CAT Progress",
suppress_plot = FALSE,
base_r_graph = FALSE
)
Arguments
x |
A "cat_output" object that is output of |
... |
Additional arguments. |
plot_b |
If |
se_band |
A logical value. If |
horizontal_line |
An option to add a horizontal line. Provide either one
of these or a list of a combination of these (except
|
title |
Title of the Plot |
suppress_plot |
If |
base_r_graph |
Currently this function only works with package 'ggplot2'. If |
Value
Depending on the value of printPlot
function either prints
the CAT progress plot or returns the plot object.
Author(s)
Emre Gonulates
Examples
cd <- create_cat_design(ip = generate_ip(n = 100))
co <- cat_sim(true_ability = rnorm(1), cd = cd)
plot(co)
# Suppress item difficulties
plot(co, plot_b = FALSE)
# Suppress Standard Error Band
plot(co, se_band = FALSE)
# Add final theta estimate line
plot(co, horizontal_line = "final_theta")
plot(co, horizontal_line = "true_theta")
# Change Title
plot(co, title = "CAT Progress for Examinee ABC")
## Not run:
# Change Text Size
plot(co) + theme(text=element_text(size=20))
# Change x-axis label
plot(co) + xlab("My New X Axis Label")
# Change y limits of the graph
plot(co) + coord_cartesian(ylim = c(-5,5))
# Change legend position
plot(co) + theme(legend.position="none")
plot(co) + theme(legend.position="left")
# Add a horizontal line
plot(co) + geom_hline(yintercept = -1, color = "red", linetype = 5)
## End(Not run)