sim function

Simulate response data

Simulate response data

Simulate responses from the 1PL, 2PL, or 3PL model

sim(ip, x = NULL)

Arguments

  • ip: Item parameters: a matrix with one row per item, and three columns: [,1] item discrimination aa, [,2] item difficulty bb, and [,3] asymptote cc. Can also use the object returned by est.
  • x: A vector of values of the latent variable ("abilities").

Returns

A matrix of responses: persons as rows, items as columns, entries are either 0 or 1, no missing data

Examples

pa <- cbind(runif(20,.8,2), runif(20,-2.4,2.4), rep(0,50)) rs <- sim(ip=pa, x=rnorm(1000))

Author(s)

Ivailo Partchev

  • Maintainer: Ivailo Partchev
  • License: GPL (>= 2)
  • Last published: 2022-05-12

Useful links