plot_resp_loglik {irt} | R Documentation |
Plot the Log-Likelihood of a response string
Description
plot_resp_loglik
plots the log-likelihood of a response string.
Usage
plot_resp_loglik(
ip,
resp,
theta_range = c(-5, 5),
title = "",
likelihood = FALSE,
show_estimate = TRUE,
base_r_graph = FALSE,
suppress_plot = FALSE,
text_size = 12,
...
)
Arguments
ip |
An |
resp |
The response string or a |
theta_range |
Either (a) a numeric vector of length two where the values are minimum and maximum theta values, or, (b) a numeric vector of length more than two where values represents the theta values that will be plotted. |
title |
Title of the plot. If the value is |
likelihood |
If |
show_estimate |
If |
base_r_graph |
If |
suppress_plot |
If |
text_size |
The overall text size of the axis and titles. The default value is 12. |
... |
Additional arguments passed to annotate. |
Value
Depending on the value of suppress_plot
function either prints
the Log-likelihood function of the response string or returns the plot
object.
To-do
Make it to plot multiple test information functions. You can input a list each of which contains item parameters. And the name of the test also.
Author(s)
Emre Gonulates
Examples
## Not run:
ip <- generate_ip(n = 9)
resp_set <- generate_resp_set(ip = ip, theta = rnorm(10))
# Plot second item's response log-likelihood function
plot_resp_loglik(ip, resp_set[[2]])
# Plot response likelihood function of second item
plot_resp_loglik(ip, resp_set[[2]], likelihood = TRUE)
# Plot using base r graphics
plot_resp_loglik(ip, resp_set[[2]], likelihood = TRUE, base_r_graph = TRUE)
# Suppress the MLE estimate
plot_resp_loglik(ip, resp_set[[4]], show_estimate = FALSE)
## End(Not run)