irf_fmp {flexmet}R Documentation

FMP Item Response Function

Description

Find FMP item response probabilities for user-supplied item and person parameters.

Usage

irf_fmp(theta, bmat, maxncat = 2, returncat = NA, cvec = NULL, dvec = NULL)

Arguments

theta

Vector of latent trait parameters.

bmat

Items x parameters matrix of FMP item parameters (or a vector of FMP item parameters for a single item).

maxncat

Maximum number of response categories (the first maxncat - 1 columns of bmat are intercepts).

returncat

Response categories for which probabilities should be returned, 0,..., maxncat - 1.

cvec

Optional vector of lower asymptote parameters. If cvec = NULL, then all lower asymptotes set to 0.

dvec

Optional vector of upper asymptote parameters. If dvec = NULL, then all upper asymptotes set to 1.

Value

Matrix of item response probabilities.

Examples


# plot the IRF for an item with 4 response categories and k = 2

set.seed(2342)
bmat <- sim_bmat(n_items = 1, ncat = 4, k = 2)$bmat

theta <- seq(-3, 3, by = .01)

probability <- irf_fmp(theta = theta, bmat = bmat,
                       maxncat = 4, returncat = 0:3)

plot(theta, probability[, , 1], type = 'l', ylab = "probability")
points(theta, probability[, , 2], type = 'l')
points(theta, probability[, , 3], type = 'l')
points(theta, probability[, , 4], type = 'l')


[Package flexmet version 1.1 Index]