Learn R Programming

pcIRT (version 0.1)

simCRSM: simulate data according to CRSM

Description

With this function data sets according to the Continous Rating Scale Model are simulated

Usage

simCRSM(itempar, distr, perspar, mid = 0.5, len = 1, seed=NULL)

Arguments

itempar
a numerical vector with item parameters
distr
a number setting the distribution parameter for the item set
perspar
a numerical vector with the person parameters
mid
the midpoint of the response scale (on which the data set is generated)
len
the length of the response scale (on which the data set is generated)
seed
a seed for the random number generated can optionally be set

Value

  • datmatsimulated data set
  • true_itemparthe fixed item parameters according to the input
  • true_distrparthe fixed distribution parameter according to the input
  • true_persparthe fixed person parameters according to the input

Details

The midpoint and the length of the response scale define the interval of the data set generated. The default of the function generates data according to a response scale between 0 and 1 - that is midpoint 0.5 and length 1.

References

Mueller, H. (1987). A Rasch model for continuous ratings. Psychometrika, 52, 165-181.

See Also

simMPRM

Examples

Run this code
#set item parameters
item_p <- c(-1.5,-0.5,0.5,1)

#set distribution parameter for items
dis_p <- 5

#generate person parameters by a standard normal distribution
pp <- rnorm(50, 0,1)

#simulate data set
#this is only an illustrating example for simulating data!
#In practice, a sample size of n=50 will be too small for most application demands
simdatC <- simCRSM(item_p, dis_p, pp)

Run the code above in your browser using DataLab