simM3PL: Simulate M3PL item responses

View source: R/simM3PL.R

simM3PLR Documentation

Simulate M3PL item responses

Description

Simulates item responses according to the Multidimensional 3-Parameter Logistic (M3PL) model

Usage

  simM3PL(ipar, cors, p, n.simulee = 100, D = 1, easiness = T, seed = NULL)

Arguments

ipar

a data frame containing M3PL item parameters, specifically a1, a2, ... , d, and c

cors

a square matrix of the lower diagonal elements of a variance-covariance (VCV) matrix, including 1's in the main diagonal

p

the number of latent dimensions

n.simulee

the number of simulees to generate

D

scaling constant: 1.7 or 1.0 (default=1.0)

easiness

logical, T if d is related to the easiness of items per Reckase, F otherwise

seed

random number seed

Details

This function simulates item responses according to the Multidimensional 3-Parameter Logistic (M3PL) model using the item parameters input to the function. Thetas are drawn from the multivariate standard normal distribution with the population variance-covariance (correlation) matrix input to the function.

Value

call

function call stack

theta

a n.simulee by p matrix of true theta values

resp

a data frame of simulated item responses named "R1", "R2", ...

Author(s)

Seung W. Choi

References

Reckase, M. D. (2009). Multidimensional Item Response Theory. New York: Springer.

Examples

  data(sample.ipar)
  vcv1<-diag(3)
  vcv1[lower.tri(vcv1,diag=FALSE)]<-c(.5,.6,.7)
  resp1<-simM3PL(sample.ipar, vcv1, 3, n.simulee = 100, seed = 1234)$resp

MAT documentation built on May 1, 2022, 5:07 p.m.