View source: R/plot_itempool.R
plot.Itempool | R Documentation |
Itempool
objectplot.Itempool
plots the item characteristic curves (item response
curves) or test characteristic curve of an Itempool-class
object.
## S3 method for class 'Itempool' plot( x, theta_range = c(-4, 4), type = "icc", tcc_prop_corr = FALSE, focus_item = NULL, title = "", suppress_plot = FALSE, legend_title = NULL, base_r_graph = FALSE, y_lim = NULL, ... )
x |
An |
theta_range |
Either a numeric vector of length two setting the
boundaries of x-axis, e.g. |
type |
The type of the graph. The default value is
|
tcc_prop_corr |
If |
focus_item |
A character string of the 'item_id' of the item to be
focused. If |
title |
Title of the plot. Set |
suppress_plot |
If |
legend_title |
The title of the plot's legend. |
base_r_graph |
If |
y_lim |
A numeric vector of length two representing the lower and upper bound of y-axis. |
... |
Additional arguments that will be passed to |
Depending on the value of suppress_plot
function either prints
the item characteristic curve or returns the plot object.
Emre Gonulates
ip <- generate_ip(n = sample(10:15,1)) plot(ip) # Additional arguments will passed to geom_line plot(ip, size = .25, alpha = 0.3) # Set the boundaries of the graph plot(ip, theta_range = c(-2, 2)) # alternatively provide theta values plot(ip, theta_range = seq(-6, 6, by = 0.25)) # Test Characteristic Curve plot(ip, type = "tcc") # Proportion correct for test characteristic curve plot(ip, type = "tcc", tcc_prop_corr = TRUE) # Plot histogram of item parameters plot(ip, type = "hist") ## Not run: # Item parameter summary ip <- generate_ip(n = 200) plot(ip, type = "pars") plot(ip, type = "pars", dotsize = .75) plot(ip, type = "pars", focus_item = "Item_22") # Use base R graphics plot(ip, type = "pars", base_r_graph = TRUE) # # Remove the legend altogether # plot(ip, suppress_plot = TRUE) + ggplot2::theme(legend.position="none") # # Change the labels: # plot(ip, suppress_plot = TRUE) + # ylab("Probability") + xlab("Ability Score") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.