Learn R Programming

plRasch (version 1.0)

simRasch: Simulate a data matrix from the Rasch Model

Description

Simulate a data matrix from the Rasch Model

Usage

simRasch(ncat, nitem, nexaminee, beta = NULL)

Arguments

ncat
number of response categories
nitem
number of items
nexaminee
number of examinees
beta
item parameter; if it is NULL, beta will be randomly generated from the standard normal distribution

Value

data
data is generated from Rasch model. It is a data frame or matrix with rows indicating individuals, columns indicating items, and the entry values indicating the choices are either 0 or 1
beta
item parameter
theta
the underlying latent trait

References

Anderson, C.J., Li, Z., & Vermunt, J.K. (2007). Estimation of models in the Rasch family for polytomous items and multiple latent variables. Journal of Statistical Software, 20.

See Also

llla

Examples

Run this code
NCAT <- 2;
NITEM <- 4;
NEXAMINEE <- 50;
BETA <- c(-1, 0, 0.5, 1)
set.seed(1);
rasch.sim <- simRasch(ncat=NCAT, nitem=NITEM, nexaminee=NEXAMINEE, beta=BETA)

Run the code above in your browser using DataLab