NRM.sim: Simulate data (nrm)

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/NRM.sim.R

Description

This function simulates data according to the Nominal Response Model.

Usage

1
NRM.sim(Parlist, pp)

Arguments

Parlist

A list of numerical vectors with item parameters has to be committed. Note that the zeta parameters as well as the lambda parameters have to add up to 0 for each item. For details concerning the structure of the list see section 'Details'.

pp

A numerical vector of person parameters.

Details

The structure of the Parlist is as follows:

Value

The function returns a length(pp)*length(Parlist) data.frame.

Author(s)

Manuel Reif

References

Bock, R. D. (1972). Estimating item parameters and latent ability when responses are scored in two or more nominal categories. Psychometrika, 37, 29-51.

See Also

NLM.sim

nrm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Simulating 5 Items within a loop
ParList <- lapply(1:5,function(x)
{
  Item1 <- c(c(-2,-1,1,2),c(-1.2,0.3,0.2,0.7))
  names(Item1) <- c(paste("zeta",1:4,sep=""),paste("lamb",1:4,sep=""))
  Item1
})

names(ParList) <- paste("item",1:5,sep="")

# simulate person parameters
perp1     <- rnorm(1500,0,1)

# simulate data.frame 
sim.nrm.1 <- NRM.sim(ParList,perp1)

mcIRT documentation built on May 29, 2017, 9:33 p.m.