View source: R/plot_cat_output.R
plot.cat_output | R Documentation |
plot.cat_output
Plots the progress of CAT for one examinee.
## 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 )
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 |
Depending on the value of printPlot
function either prints
the CAT progress plot or returns the plot object.
Emre Gonulates
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.