
Itempool
objectplot.Itempool
plots the item characteristic curves (item response
curves) or test characteristic curve of an Itempool-class
object.
# S3 method for Itempool
plot(
x,
theta_range = c(-4, 4),
tcc = FALSE,
tcc_prop_corr = FALSE,
title = "",
suppress_plot = FALSE,
legend_title = NULL,
...
)
An Itempool-class
object.
The boundaries of x axis.
If TRUE
a test characteristic curve will be plotted.
If TRUE
, test characteristic curve will be
show the proportion correct of the test (i.e. the range of y-axis
will be 0-1 instead of 0 to the number of items).
Title of the plot. Default is NULL
. If tcc
is
TRUE
it will be 'Test Characteristic Curve', if FALSE
it will be 'Item Characteristic Curve'.
If FALSE
the function will print the plot. If
TRUE
, function will return the plot object. Default value is
FALSE
.
The title of the plot's legend.
Additional arguments that will be passed to geom_line
Depending on the value of suppress_plot
function either prints
the item characteristic curve or returns the plot object.
# NOT RUN {
n <- sample(10:15,1)
ip <- itempool(a = runif(n, .5, 2), b = rnorm(n), c = runif(n, 0, .3), D = 1)
plot(ip)
# Additional arguments will passed to geom_line
plot(ip, size = .25, alpha = 0.3)
# Test Characteristic Curve
plot(ip, tcc = TRUE)
# Proportion correct for test characteristic curve
plot(ip, tcc = TRUE, tcc_prop_corr = TRUE)
# # Remove the legend altogether
# plot(ip, suppress_plot = TRUE) + theme(legend.position="none")
# # Change the labels:
# plot(ip, suppress_plot = TRUE) + ylab("Probability") + xlab("Ability Score")
# }
Run the code above in your browser using DataLab