Learn R Programming

sirt (version 0.36-30)

rasch.mirtlc: Multidimensional Latent Class 1PL and 2PL Model

Description

This function estimates the multidimensional latent class Rasch (1PL) and 2PL model (Bartolucci, 2007) for dichotomous data which emerges from the original latent class model (Goodman, 1974).

Usage

rasch.mirtlc(dat, Nclasses=NULL, modeltype="LC", dimensions=NULL ,
    group=NULL, weights=rep(1,nrow(dat)), theta.k=NULL, 
    distribution.trait= FALSE ,  range.b =c(-8,8), range.a=c(.2 , 6 ) ,  
    progress=TRUE, glob.conv=10^(-5), conv1=10^(-5), mmliter=1000, 
    mstep.maxit=3, seed=0, nstarts=1)

## S3 method for class 'rasch.mirtlc':
summary(object,...)

Arguments

dat
An $N \times I$ data frame
Nclasses
Number of latent classes. If the trait vector (or matrix) theta.k is specified, then Nclasses is set to the dimension of theta.k.
modeltype
Modeltype. LC is the latent class model of Goodman (1974). MLC1 is the multidimensional latent class Rasch model with item discrimination parameter of 1. MLC2 allows for the estimation of item discriminations.
dimensions
Vector of dimension integers which allocate items to dimensions.
group
A group identifier for multiple group estimation
weights
Vector of sample weights
theta.k
A grid of theta values can be specified if theta should not be estimated. In the one-dimensional case, it must be a vector, in the $D$-dimensional case it must be a matrix of dimension $D$.
distribution.trait
A type of the assumed theta distribution can be specified. One alternative is normal for the normal distribution assumption. The options smooth2, smooth3 and smooth4 use the log-linear smoothing of
range.b
Range of item difficulties which are allowed for estimation
range.a
Range of item slopes which are allowed for estimation
progress
Display progress? Default is TRUE.
glob.conv
Global relative deviance convergence criterion
conv1
Item parameter convergence criterion
mmliter
Maximum number of iterations
mstep.maxit
Maximum number of iterations within an M step
seed
Set random seed for latent class estimation. A seed can be specified. If the seed is negative, then the function will generate a random seed.
nstarts
If a positive integer is provided, then a nstarts starts with different starting values are conducted.
object
Object of class rasch.mirtlc
...
Further arguments to be passed

Value

  • A list with following entries
  • pjkItem probabilities evaluated at discretized ability distribution
  • pi.kEstimated trait distribution
  • theta.kDiscretized ability distribution
  • itemEstimated item parameters
  • traitEstimated ability distribution (theta.k and pi.k)
  • mean.traitEstimated mean of ability distribution
  • sd.traitEstimated standard deviation of ability distribution
  • skewness.traitEstimated skewnessof ability distribution
  • cor.traitEstimated correlation between abilities (only applies for multidimensional models)
  • icInformation criteria
  • DNumber of dimensions
  • GNumber of groups
  • devianceDeviance
  • llLog-likelihood
  • NclassesNumber of classes
  • modeltypeModeltype used
  • estep.resResult from E step: f.qk.yi is the individual posterior, f.yi.qk is the individual likelihood
  • datOriginal data frame
  • devLVector of deviances if multiple random starts were conducted
  • seedLVector of seed if multiple random starts were conducted
  • iterNumber of iterations

Details

The multidimensional latent class Rasch model (Bartolucci, 2007) is an item response model which combines ideas from latent class analysis and item response models with continuous variables. With modeltype="MLC2" the following $D$-dimensional item response model is estimated $$logit P(X_{pi} = 1 | \theta_p ) = a_i \theta_{pcd}- b_i$$ Besides the item thresholds $b_i$ and item slopes $a_i$, for a prespecified number of latent classes $c=1,\ldots,C$ a set of $C$ $D$-dimensional ${\theta_{cd} }_{cd}$ vectors are estimated. These vectors represent the locations of latent classes. If the user provides a grid of theta distribution theta.k as an argument in rasch.mirlc, then the ability distribution is fixed.

References

Bartolucci, F. (2007). A class of multidimensional IRT models for testing unidimensionality and clustering items. Psychometrika, 72, 141-157. Goodman, L. A. (1974). Exploratory latent structure analysis using both identifiable and unidentifiable models. Biometrika, 61, 215-231. Xu, X., & von Davier, M. (2008). Fitting the structured general diagnostic model to NAEP data. ETS Research Report ETS RR-08-27. Princeton, ETS.

See Also

See also the gdm function in the CDM package. For an assessment of global model fit see modelfit.sirt. The estimation of the multidimensional latent class item response model for polytomous data can be conducted in the MultiLCIRT package. Latent class analysis can be carried out with poLCA and randomLCA packages.

Examples

Run this code
#############################################################################
# EXAMPLE 1: Reading data
#############################################################################
data( data.read )
dat <- data.read

#******
# latent class models
# latent class model with 1 class
mod1 <- rasch.mirtlc( dat , Nclasses = 1 )
summary(mod1)

# latent class model with 2 classes
mod2 <- rasch.mirtlc( dat , Nclasses = 2 )
summary(mod2)

# latent class model with 3 classes
mod3 <- rasch.mirtlc( dat , Nclasses = 3 , seed = - 30)  
summary(mod3)

# latent class model with 4 classes and
# 3 starts with different seeds
mod4 <- rasch.mirtlc( dat , Nclasses = 4 ,seed= -30 ,  nstarts=3 )   
# display different solutions
sort(mod1$devL)
summary(mod4)

# latent class multiple group model
# define group identifier
group <- rep( 1 , nrow(dat))
group[ 1:150 ] <- 2
mod5 <- rasch.mirtlc( dat , Nclasses = 3 , group = group )  
summary(mod5)

#*************
# Unidimensional IRT models with ordered trait

# 1PL model with 3 classes
mod11 <- rasch.mirtlc( dat , Nclasses = 3 , modeltype="MLC1" , mmliter=30)
summary(mod11)

# 1PL model with 11 classes
mod12 <- rasch.mirtlc( dat , Nclasses = 11 ,modeltype="MLC1", mmliter=30)
summary(mod12)

# 1PL model with 11 classes and fixed specified theta values
mod13 <- rasch.mirtlc( dat ,  modeltype="MLC1" , 
    theta.k = seq( -4 , 4 , len=11 ) , mmliter=100)
summary(mod13)

# 1PL model with fixed theta values and normal distribution
mod14 <- rasch.mirtlc( dat ,  modeltype="MLC1" , mmliter=30 , 
        theta.k = seq( -4 , 4 , len=11 ) , distribution.trait="normal")
summary(mod14)

# 1PL model with a smoothed trait distribution (up to 3 moments)
mod15 <- rasch.mirtlc( dat ,  modeltype="MLC1" , mmliter=30 , 
        theta.k = seq( -4, 4 , len=11 ) ,  distribution.trait="smooth3")
summary(mod15)

# 2PL with 3 classes
mod16 <- rasch.mirtlc( dat , Nclasses=3 , modeltype="MLC2" , mmliter=30 )
summary(mod16)

# 2PL with fixed theta and smoothed distribution
mod17 <- rasch.mirtlc( dat, theta.k=seq(-4,4,len=12) , mmliter=30 ,
          modeltype="MLC2" , distribution.trait="smooth4"  )
summary(mod17)

# 1PL multiple group model with 8 classes
# define group identifier
group <- rep( 1 , nrow(dat))
group[ 1:150 ] <- 2
mod21 <- rasch.mirtlc( dat , Nclasses = 8 , modeltype="MLC1" , group=group )
summary(mod21)

#***************
# multidimensional latent class IRT models

# define vector of dimensions
dimensions <- rep( 1:3 , each = 4 )

# 3-dimensional model with 8 classes and seed 145
mod31 <- rasch.mirtlc( dat , Nclasses = 8 , mmliter=30 , 
        modeltype="MLC1" , seed = 145 , dimensions = dimensions )
summary(mod31)

# try the model above with different starting values
mod31s <- rasch.mirtlc( dat , Nclasses = 8 ,
        modeltype="MLC1" , seed = -30 , nstarts=30 , dimensions = dimensions )
summary(mod31s)     

# estimation with fixed theta vectors
# => 4^3 = 216 classes
theta.k <- seq(-4 , 4 , len=6 )
theta.k <- as.matrix( expand.grid( theta.k , theta.k , theta.k ) )
mod32 <- rasch.mirtlc( dat ,  dimensions=dimensions , 
        theta.k= theta.k , modeltype="MLC1"  )
summary(mod32)

# 3-dimensional 2PL model
mod33 <- rasch.mirtlc( dat ,  dimensions=dimensions , 
       theta.k= theta.k , modeltype="MLC2"  )
summary(mod33)

#############################################################################
# SIMLUATED EXAMPLE 2: Skew trait distribution
#############################################################################
set.seed(789)
N <- 1000   # number of persons
I <- 20     # number of items
theta <- sqrt( exp( rnorm( N ) ) )
theta <- theta - mean(theta )
# calculate skewness of theta distribution
mean( theta^3 ) / sd(theta)^3
# simulate item responses
dat <- sim.raschtype( theta , b=seq(-2,2,len=I ) )

# normal distribution
mod1 <- rasch.mirtlc( dat , theta.k=seq(-4,4,len=15)  , modeltype="MLC1",
            distribution.trait="normal" , mmliter=30)

# allow for skew distribution with smoothed distribution
mod2 <- rasch.mirtlc( dat , theta.k=seq(-4,4,len=15)  , modeltype="MLC1",
            distribution.trait="smooth3" , mmliter=30)

# nonparametric distribution
mod3 <- rasch.mirtlc( dat , theta.k=seq(-4,4,len=15)  , modeltype="MLC1",
            mmliter=30)

summary(mod1)
summary(mod2)            
summary(mod3)

Run the code above in your browser using DataLab