Description Usage Arguments Details Value Author(s) References See Also Examples
This function simulates data according to the Nominal Response Model.
1 | NRM.sim(Parlist, pp)
|
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. |
The structure of the Parlist is as follows:
Vector for Item 1: c(zeta1, zeta2, ..., lambda1, lambda2, ...)
Vector for Item 2: c(zeta1, zeta2, ..., lambda1, lambda2, ...)
etc.
The function returns a length(pp)
*length(Parlist)
data.frame.
Manuel Reif
Bock, R. D. (1972). Estimating item parameters and latent ability when responses are scored in two or more nominal categories. Psychometrika, 37, 29-51.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.