MKL {mstR}R Documentation

Module Kullback-Leibler (MKL) and posterior module Kullback-Leibler (MKLP)

Description

This command returns the value of the Kullback-Leibler (MKL) or the posterior Kullback-Leibler (MKLP) weighted likelihood for a given target module and an item bank (both under dichotomous and polytomous IRT models).

Usage

MKL(itemBank, modules, target.mod, theta = NULL, it.given, x, model = NULL, 
    lower = -4, upper = 4, nqp = 33, type = "MKL", priorDist = "norm", 
    priorPar = c(0, 1), D = 1)
 

Arguments

itemBank

numeric: a suitable matrix of item parameters. See Details.

modules

a binary matrix that specifies the item membership to th emodules. See Details.

target.mod

numeric: the module (referred to as its column number in the modules matrix) for which the information must be computed.

theta

either the provisional ability level or NULL (default). See Details.

it.given

numeric: a vector of item indicators for all previously administered items.

x

numeric: a vector of item responses, coded as 0 or 1 only (for dichotomous items) or from 0 to the number of response categories minus one (for polytomous items). The length of x must be equal to the length of it.given.

model

either NULL (default) for dichotomous models, or any suitable acronym for polytomous models. Possible values are "GRM", "MGRM", "PCM", "GPCM", "RSM" and "NRM". See Details.

lower

numeric: the lower bound for numerical integration (default is -4).

upper

numeric: the upper bound for numerical integration (default is 4).

nqp

numeric: the number of quadrature points (default is 33).

type

character: the type of Kullback-Leibler information to be computed. Possible values are "MKL" (default) and "MKLP". See Details.

priorDist

character: the prior ability distribution. Possible values are "norm" (default) for the normal distribution, and "unif" for the uniform distribution. Ignored if type is not "MPWI".

priorPar

numeric: a vector of two components with the prior parameters. If priorDist is "norm", then priorPar contains the mean and the standard deviation of the normal distribution. If priorDist is "unif", then priorPar contains the bounds of the uniform distribution. The default values are 0 and 1 respectively. Ignored if type is not "MPWI".

D

numeric: the metric constant. Default is D=1 (for logistic metric); D=1.702 yields approximately the normal metric (Haley, 1952). Ignored if model is not NULL.

Details

This function extends the KL and the KLP methods to select the next item in CAT, to the MST framework. This command serves as a subroutine for the nextModule function.

Dichotomous IRT models are considered whenever model is set to NULL (default value). In this case, itemBank must be a matrix with one row per item and four columns, with the values of the discrimination, the difficulty, the pseudo-guessing and the inattention parameters (in this order). These are the parameters of the four-parameter logistic (4PL) model (Barton and Lord, 1981).

Polytomous IRT models are specified by their respective acronym: "GRM" for Graded Response Model, "MGRM" for Modified Graded Response Model, "PCM" for Partical Credit Model, "GPCM" for Generalized Partial Credit Model, "RSM" for Rating Scale Model and "NRM" for Nominal Response Model. The itemBank still holds one row per item, end the number of columns and their content depends on the model. See genPolyMatrix for further information and illustrative examples of suitable polytomous item banks.

FROM HERE

Under polytomous IRT models, let k be the number of administered items, and set x_1, ..., x_k as the provisional response pattern (where each response x_l takes values in \{0, 1, ..., g_l\}). Set \hat{\theta}_k as the provisional ability estimate (with the first k responses). Set M as the number of items in the target module of interest (not yet administered). Set also L(\theta | x_1, ..., x_k) as the likelihood function of the first k items and evaluated at \theta. Set finally P_{jt}(\theta) as the probability of answering response category t to item j of the target module (j = 1, ..., M) for a given ability level \theta. Then, module Kullack-Leibler (MKL) information is defined as

MKL(\theta || \hat{\theta}_k) = \sum_{j=1}^{M} \sum_{t=0}^{g_j} \,P_{jt}(\hat{\theta}_k) \,\log \left( \frac{P_{jt}(\hat{\theta}_k)}{P_{jt}(\theta)}\right).

In case of dichotomous IRT models, all g_l values reduce to 1, so that item responses x_l equal either 0 or 1. Set simply P_j(\theta) as the probability of answering item j correctly (j = 1, ..., M) for a given ability level \theta. Then, MKL information reduces to

MKL(\theta || \hat{\theta}) = \sum_{j=1}^{M} \left\{P_j(\hat{\theta}) \,\log \left( \frac{P_j(\hat{\theta}_k)}{P_j(\theta)}\right) + [1-P_j(\hat{\theta}_k)] \,\log \left( \frac{1-P_j(\hat{\theta}_k)}{1-P_j(\theta)}\right) \right\}.

The quantity that is returned by this MKL function is either: the likelihood function weighted by module Kullback-Leibler information (the MKL value):

MKL(\hat{\theta}_k) = \int MKL(\theta || \hat{\theta}_k) \, L(\theta | x_1, ..., x_k) \,d\theta

or the posterior function weighted by module Kullback-Leibler information (the MKLP value):

MKLP(\hat{\theta}) = \int MKL(\theta || \hat{\theta}_k) \, \pi(\theta) \,L(\theta | x_1, ..., x_k) \,d\theta

where \pi(\theta) is the prior distribution of the ability level.

These integrals are approximated by the integrate.mstR function. The range of integration is set up by the arguments lower, upper and nqp, giving respectively the lower bound, the upper bound and the number of quadrature points. The default range goes from -4 to 4 with length 33 (that is, by steps of 0.25).

The argument type defines the type of information to be computed. The default value, "MKL", computes the MKL value, while the MKLP value is obtained with type="MKLP". For the latter, the priorDist and priorPar arguments fix the prior ability distribution. The normal distribution is set up by priorDist="norm" and then, priorPar contains the mean and the standard deviation of the normal distribution. If priorDist is "unif", then the uniform distribution is considered, and priorPar fixes the lower and upper bounds of that uniform distribution. By default, the standard normal prior distribution is assumed. This argument is ignored whenever method is not "MKLP".

The provisional response pattern and the related administered items are provided by the vectors x and it.given respectively. The target module (for which the maximum information is computed) is given by its column number in the modules matrix, through the target.mod argument.

The provisioal (ad-interim) ability level can be provided through the theta argument. If not provided or set to NULL (default value), it is then internally computed as the ML estimate of ability for the given response pattern x and the previously administered items it.given.

Value

The required KL (or KLP) weighted module likelihood for the target module.

Author(s)

David Magis
Department of Psychology, University of Liege, Belgium
david.magis@uliege.be

References

Barton, M.A., and Lord, F.M. (1981). An upper asymptote for the three-parameter logistic item-response model. Research Bulletin 81-20. Princeton, NJ: Educational Testing Service.

Haley, D.C. (1952). Estimation of the dosage mortality relationship when the dose is subject to error. Technical report no 15. Palo Alto, CA: Applied Mathematics and Statistics Laboratory, Stanford University.

See Also

Ii, nextModule, integrate.mstR, genPolyMatrix

Examples


## Dichotomous models ##

 # Generation of an item bank under 2PL, made of 7 successive modules that target
 # different average ability levels and with different lengths
 # (the first generated item parameters hold two modules of 8 items each)
 it <- rbind(genDichoMatrix(16, model = "2PL"),
             genDichoMatrix(6, model = "2PL", bPrior = c("norm", -1, 1)),
             genDichoMatrix(6, model = "2PL", bPrior = c("norm", 1, 1)),
             genDichoMatrix(9, model = "2PL", bPrior = c("norm", -2, 1)),
             genDichoMatrix(9, model = "2PL", bPrior = c("norm", 0, 1)),
             genDichoMatrix(9, model = "2PL", bPrior = c("norm", 2, 1)))
 it <- as.matrix(it)

 # Creation of the 'module' matrix to list item membership in each module
 modules <- matrix(0, 55, 7)
 modules[1:8, 1] <- modules[9:16, 2] <- modules[17:22, 3] <- 1
 modules[23:28, 4] <- modules[29:37, 5] <- modules[38:46, 6] <- 1
 modules[47:55, 7] <- 1

 # Creation of the response pattern for module 1 and true ability level 0
 x <- genPattern(th = 0, it = it[1:8,], seed = 1)

 # MKL for module 3
 MKL(it, modules, target.mod = 3, it.given = 1:8, x = x)

 # Same with pre-estimation of ability by ML (same result)
 th <- thetaEst(it[1:8,], x, method = "ML") 
 MKL(it, modules, target.mod = 3, it.given = 1:8, x = x, theta = th)

 # Same with pre-estimation of ability by EAP (different result)
 th <- thetaEst(it[1:8,], x, method = "EAP") 
 MKL(it, modules, target.mod = 3, it.given = 1:8, x = x, theta = th)

 # MKLP for module 3
 MKL(it, modules, target.mod = 3, it.given = 1:8, x = x, type = "MKLP")

 # MKL for for module 3, different integration range
 MKL(it, modules, target.mod = 3, it.given = 1:8, x = x, lower = -2, upper = 2, nqp = 20)

 # MKLP for module 3, uniform prior distribution on the range [-2,2]
 MKL(it, modules, target.mod = 3, it.given = 1:8, x = x, type = "MKLP", 
     priorDist = "unif", priorPar = c(-2, 2))


## Polytomous models ##

 # Same structure as above but parameters are now generated from PCM with at most
 # 4 categories
 it.pol <- genPolyMatrix(55, model = "PCM", nrCat = 4)
 it.pol <- as.matrix(it)

 # Creation of the response pattern for module 1 and true ability level 0
 x <- genPattern(th = 0, it = it.pol[1:8,], seed = 1)

# MKL for module 3
 MKL(it.pol, modules, target.mod = 3, it.given = 1:8, x = x, model = "PCM")

 # Same with pre-estimation of ability by ML (same result)
 th <- thetaEst(it.pol[1:8,], x, method = "ML", model = "PCM") 
 MKL(it.pol, modules, target.mod = 3, it.given = 1:8, x = x, theta = th, 
     model = "PCM")

 # Same with pre-estimation of ability by EAP (different result)
 th <- thetaEst(it.pol[1:8,], x, method = "EAP", model = "PCM") 
 MKL(it.pol, modules, target.mod = 3, it.given = 1:8, x = x, theta = th, 
     model = "PCM")

 # MKLP for module 3
 MKL(it.pol, modules, target.mod = 3, it.given = 1:8, x = x, type = "MKLP", 
     model = "PCM")

 # MKL for for module 3, different integration range
 MKL(it.pol, modules, target.mod = 3, it.given = 1:8, x = x, lower = -2, 
     upper = 2, nqp = 20, model = "PCM")

 # MKLP for module 3, uniform prior distribution on the range [-2,2]
 MKL(it.pol, modules, target.mod = 3, it.given = 1:8, x = x, type = "MKLP", 
     priorDist = "unif", priorPar = c(-2, 2), model = "PCM")
 

[Package mstR version 1.2 Index]