set.seed(1)
## item responses under a rating scale model (RSM) with
## 6 persons with three different person parameters
## 9 increasingly difficult items
## 3 different threshold parameters
ppar <- rep(-1:1, each = 2)
ipar <- seq(-2, 2, by = 0.5)
tpar <- 0:2
sim <- rrsm(theta = ppar, beta = ipar, tau = tpar)
## simulated item response data along with setting parameters
sim
## print and plot corresponding item response object
iresp <- itemresp(sim$data)
iresp
plot(iresp)
Run the code above in your browser using DataLab