rmvlogis {ltm}R Documentation

Random Responses under Dichotomous IRT models

Description

Produces binary random variates under the Rasch, two-parameter and three parameter logistic models.

Usage

rmvlogis(n, thetas, guessing = FALSE, distr = c("normal", "logistic"))

Arguments

n a scalar indicating the number of response patterns to simulate.
thetas a numeric matrix with row representing the items and columns the parameters. See Details for more info.
guessing if TRUE binary variates are simulated under the three parameter model.
distr a character string indicating the distribution of the latent variable. Options are Normal and Logistic.

Details

The binary variates are simulated under the following parameterization for the probability of correctly responding in the ith item:

π_i = c_i + (1 - c_i) / [1 + exp{-(beta_{1i} + beta_{2i} z)}],

where z denotes the latent variable, and β_{1i} and β_{2i} are the first and second columns of thetas, respectively. If guessing = TRUE then c_i's should be located in the third column of thetas.

Value

a numeric matrix with n rows and columns the number of items, containing the simulated binary variates.

Author(s)

Dimitris Rizopoulos dimitris.rizopoulos@med.kuleuven.be

See Also

ltm, rasch, tpm

Examples


# 10 response patterns under a Rasch model
# with 5 items
rmvlogis(10, cbind(seq(-2, 2, 1), 1))


[Package ltm version 0.6-0 Index]