(internal) compute response probability
computeResponseProbability
is an internal function for computing response probability from a set of item parameters.
computeResponseProbability(ipar, model, theta_grid)
ipar
: a data.frame
containing item parameters.model
: the item model to use. Accepts grm
or gpcm.theta_grid
: theta values to compute probability values at.computeResponseProbability
returns an item-wise list of probability matrices.
ipar <- PROsetta:::extractAnchorParameters(data_asq, FALSE) theta_q <- seq(-4, 4, .1) p <- PROsetta:::computeResponseProbability(ipar, "grm", theta_q) plot( 0, 0, type = "n", xlim = c(-4, 4), ylim = c(0, 1), xlab = "Theta", ylab = "Response probability" ) lines(theta_q, p[[1]][, 1]) lines(theta_q, p[[1]][, 2]) lines(theta_q, p[[1]][, 3]) lines(theta_q, p[[1]][, 4]) lines(theta_q, p[[1]][, 5])
Useful links