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

Description Usage Arguments Value Author(s) References Examples

View source: R/sim.mrm.R

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

1
2
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

data.matrix

0/1 data matrix of item responses.

beta

Generated/Provided easiness parameters.

emp.probs

Observed class sizes

xi

Generated/Provided person parameters.

Author(s)

David Preinerstorfer

david.preinerstorfer@univie.ac.at

http://homepage.univie.ac.at/david.preinerstorfer.

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

1
2
3
4
#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))

mRm documentation built on May 1, 2019, 9:13 p.m.