Learn R Programming

rpf (version 0.3)

rpf.sample: Randomly sample response patterns given a list of items

Description

Returns a random sample of response patterns given a list of unidimensional item models and parameters.

Usage

rpf.sample(theta, items, params)

Arguments

theta
either a vector of trait abilities or the number of abilities to draw from N(0,1)
items
a list of item models
params
a list of item parameters. If omitted, random item parameters are generated for each item model.

Value

  • Returns a matrix of response patterns

See Also

sample

Examples

Run this code
i1 <- rpf.drm()
i1.p <- rpf.rparam(i1)
i2 <- rpf.gpcm(numOutcomes=3)
i2.p <- rpf.rparam(i2)
rpf.sample(5, list(i1,i2), list(i1.p, i2.p))

Run the code above in your browser using DataLab