Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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
up vote 4 down vote accepted

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.

  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.pattern option to estimate the patterns directly.

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

Hope that's helpful.

EDIT: Since I posted this answer a while back, the mirtCAT package was developed as an extension to mirt and contains a helper function called generate.mirt_object() for setting up a suitable mirt model with known coefficients.

Here's how that can be done using the parameters above.

 pars <- data.frame(a1 = c(1,.9,.8,1,1.1),
                    d = c(-1,0,1.5,-1.5,0),
                    g = c(.2,.15,.17,.19,.15))
 mod <- generate.mirt_object(pars, itemtype = '3PL')

 # trait scores for pattern: 0, 1, 1, 0, 1
 fscores(mod, response.pattern = c(0,1,1,0,1))

I think the wrapper version is less error prone, and certainly nicer to look at and understand.

share|improve this answer

Try thetaEst from catR.

From the manual: This command returns the ability estimate for a given response pattern and a given matrix of item parameters.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.