Learn R Programming

mRm (version 1.1.6)

sim.mrm: Generating data matrices conforming to a mixed Rasch model

Description

This function generates data matrices conforming to a mixed Rasch model (Rost 1990). Both, person and item parameters may be provided by the user. Otherwise, person parameters are randomly drawn from a standard normal distribution; random equidistant partitions of the interval [-2, 2] are used as item parameters. Class membership of each object is based on a realization of a multinomial random variable with sample size and class proportions as parameters (see Preinerstorfer and Formann 2011 for details).

Usage

sim.mrm(N.sample, N.items, cl.prob, item.para = NULL, pers.para = NULL, seed = NULL)

Arguments

N.sample
Sample size.
N.items
Number of items.
cl.prob
Vector of relative class sizes.
item.para
Matrix of item (easiness) parameters. Rows indicate items, columns indicate classes. If no parameters are provided by the user, random permutations of an equidistant partition of the interval [-2, 2] are used in each class.
pers.para
Vector of person parameters. If no parameters are provided by the user, person parameters are drawn from a standard normal distribution.
seed
Seed value.

Value

References

Preinerstorfer, D. and Formann, A. K. (2012) Parameter recovery and model selection in mixed Rasch models. British Journal of Mathematical and Statistical Psychology, 65, 251-262.

Rost (1990). Rasch models in latent classes: An integration of two approaches to item analysis. Applied Psychological Measurement, 14, 271-282.

Examples

Run this code

#Simulate a data matrix conforming to a 2-class 
#mixed Rasch model with sample size 1000 and 20 items.

data <- sim.mrm(1000, 20, c(.5, .5))

Run the code above in your browser using DataLab