# Estimating ability using IRT when the model parameters are known

I have 3PL model parameters (guessing, difficulty and discrimination item parameters). Is there any function with which I can estimate individual ability from item response data? I tried the function factor.score in the package ltm, but it seems to require the whole data from which the parameters were estimated, which I don't have.

-
You say "but it seems to require the whole data from which the parameters were estimated, which I don't have". Do you have the individual responses to the items? –  Momo Aug 11 '12 at 10:15
Yes, I got responses of a handful of testees to estimate the latent abilities. And I have estimates for model parameters from the previous research and I want to use them to estimate the latent abilities. –  KH Kim Aug 11 '12 at 11:04

I can't find a way to do this in the ltm package, though it's relatively straightforward if you are willing to use the mirt package.

First, write out some arbitrary matrix or data frame consisting of possible but random response patterns. You can include the actual response patterns you are interested in as well for later use.

  dat <- matrix(sample(c(0,1), 10000, TRUE), ncol = 5)
colnames(dat) <- paste0('item', 1:5)


Use this as the data input and to mirt() and give the option pars = 'values' to return a data frame containing parameter names, numbers, starting values, etc. Edit this object to contain the values you want for the intercepts, slopes, or whatever else, and set all the estimation logical to FALSE. This will cause the model to instantly converge with the parameters that you want.

  library(mirt)
sv <- mirt(dat, 1, itemtype = '3PL', pars = 'values')
#custom discrimination, easiness, and guessing values
sv$value[sv$name == 'a1'] <- c(1,.9,.8,1,1.1)
sv$value[sv$name == 'd'] <- c(-1,0,1.5,-1.5,0)
sv$value[sv$name == 'g'] <- c(.2,.15,.17,.19,.15)
#set the parameters as fixed
sv\$est <- FALSE


Finally, (arbitrarily) estimate this model by using pars = sv, and use the returned object to calculate the factor scores. If you included the response patterns you are interested in then using fscores() directly work, otherwise use the response.vector option to estimate the patterns directly.

  mod <- mirt(dat, 1, pars = sv)
fscores(mod)
#more interested in pattern: 0, 1, 1, 0, 1
fscores(mod, response.vector = c(0,1,1,0,1))