simulpln {pln}R Documentation

Simulate data from polytomous logit-normit (graded logistic) model

Description

Simulate data from polytomous logit-normit (graded logistic) model

Usage

simulpln(n, nitem, ncat, alphas, betas)

Arguments

n

Number of responses to generate.

nitem

Number of items.

ncat

Number of categories for the items.

alphas

A vector of length nitem\times(ncat-1) corresponding to true values for the (decreasing) cutpoints for the items.

betas

A vector of length nitem corresponding to values for the beta vectors of slopes.

Details

Data from graded logistic models is generated under the following parameterization:

Pr(y_i = k_i| \eta) = \left\{ \begin{array}{ll} 1-\Psi (\alpha_{i,k} + \beta_i \eta) & \mbox{if } k_i = 0\\ \Psi (\alpha_{i,k} + \beta_i \eta) - \Psi (\alpha_{i,k+1} + \beta_i \eta) & \mbox{if } 0 < k_i < m-1\\ \Psi (\alpha_{i,k+1} + \beta_i \eta) & \mbox{if } k_i = m-1 \end{array} \right.

Where the items are y_i, i = 1, \dots, n, and response categories are k=0, \dots, m-1. \eta is the latent trait, \Psi is the logistic distribution function, \alpha is an intercept (cutpoint) parameter, and \beta is a slope parameter. When the number of categories for the items is 2, this reduces to the 2PL parameterization:

Pr(y_i = 1| \eta) = \Psi (\alpha_1 + \beta_i \eta)

Value

A data matrix in which each row represents a response pattern and the final column represents the frequency of each response pattern.

Author(s)

Carl F. Falk cffalk@gmail.com, Harry Joe

See Also

nrmlepln nrmlerasch nrbcpln

Examples

   n<-500;
   ncat<-3;
   nitem<-5
   alphas=c(0,-.5,  .2,-1,  .4,-.6,  .3,-.2,  .5,-.5)
   betas=c(1,1,1,.5,.5)
   
   set.seed(1234567)
   datfr<-simulpln(n,nitem,ncat,alphas,betas)
   nrmleplnout<-nrmlepln(datfr, ncat=ncat, nitem=nitem)
   nrmleplnout

[Package pln version 0.2-2 Index]