Learn R Programming

TAM (version 1.9-0)

IRT.informationCurves: Item and Test Information Curve

Description

An S3 method which computes item and test information curves, see Muraki (1993).

Usage

IRT.informationCurves(object, ...)

## S3 method for class 'tam.mml':
IRT.informationCurves( object , h=.0001 , iIndex = NULL , 
          theta = NULL , ... )
          
## S3 method for class 'tam.mml.2pl':
IRT.informationCurves( object , h=.0001 , iIndex = NULL , 
          theta = NULL , ... )

## S3 method for class 'tam.mml.mfr':
IRT.informationCurves( object , h=.0001 , iIndex = NULL , 
          theta = NULL , ... )

## S3 method for class 'tam.mml.3pl':
IRT.informationCurves( object , h=.0001 , iIndex = NULL , 
          theta = NULL , ... )
          
## S3 method for class 'IRT.informationCurves':
plot(x , curve_type="test" , \dots)

Arguments

object
Object of class tam.mml, tam.mml.2pl, tam.mml.mfr or tam.mml.3pl.
...
Further arguments to be passed
h
Numerical differentiation parameter
iIndex
Indices of items for which test information should be computed. The default is to use all items.
theta
Optional vector of $\theta$ for which information curves should be computed.
curve_type
Type of information to be plotted. It can be "test" for the test information curve and "se" for the standard error curve.
x
Object of class tam.mml, tam.mml.2pl, tam.mml.mfr or tam.mml.3pl.

Value

  • List with following entries
  • se_curveStandard error curves
  • test_info_curveTest information curve
  • info_curves_itemItem information curves
  • info_curves_categoriesItem-category information curves
  • thetaUsed $\theta$ grid

References

Muraki, E. (1993). Information functions of the generalized partial credit model. Applied Psychological Measurement, 17(4), 351-363.

Examples

Run this code
#############################################################################
# EXAMPLE 1: Dichotomous data | data.read
#############################################################################

data(data.read , package="sirt")
dat <- data.read

# fit 2PL model
mod1 <- tam.mml.2pl( dat ) 
summary(mod1)

# compute information curves at grid seq(-5,5,length=100)
imod1 <- IRT.informationCurves( mod1 , theta= seq(-5,5,len=100)  )
str(imod1)
# plot test information
plot( imod1 )
# plot standard error curve
plot( imod1 , curve_type = "se" , xlim=c(-3,2) )
# cutomized plot
plot( imod1 , curve_type = "se" , xlim=c(-3,2) , ylim = c(0,2) , lwd=2 , lty=3)

#############################################################################
# EXAMPLE 2: Mixed dichotomous and polytomous data
#############################################################################	

data(data.timssAusTwn.scored, package="TAM")
dat <- data.timssAusTwn.scored
# select item response data
items <- grep( "M0" , colnames(dat) , value=TRUE )
resp <- dat[, items ]

#*** Model 1: Partial credit model
mod1 <- tam.mml( resp )
summary(mod1)
# information curves
imod1 <- IRT.informationCurves( mod1 , theta= seq(-3,3,len=20)  )

#*** Model 2: Generalized partial credit model
mod2 <- tam.mml.2pl( resp , irtmodel="GPCM")
summary(mod2)
imod2 <- IRT.informationCurves( mod2 )

#*** Model 3: Mixed 3PL and generalized partial credit model
psych::describe(resp)
maxK <- apply( resp , 2 , max , na.rm=TRUE )
I <- ncol(resp)
# specify guessing parameters, including a prior distribution
est.guess <- 1:I
est.guess[ maxK > 1 ] <- 0
guess <- .2*(est.guess >0)
guess.prior <- matrix( 0 , nrow=I , ncol=2 )
guess.prior[ est.guess  > 0 , 1] <- 5 
guess.prior[ est.guess  > 0 , 2] <- 17

# fit model
mod3 <- tam.mml.3pl( resp , gammaslope.des = "2PL" , est.guess=est.guess , guess=guess ,
           guess.prior = guess.prior ,  
           control=list( maxiter=100 , Msteps=10 , fac.oldxsi=0.1 ,
                        nodes = seq(-8,8,len=41) ) ,  est.variance=FALSE )
summary(mod3)

# information curves
imod3 <- IRT.informationCurves( mod3 )
imod3

#*** estimate model in mirt package
library(mirt)
itemtype <- rep("gpcm" , I)
itemtype[ maxK==1] <- "3PL"
mod3b <- mirt::mirt(resp , 1 , itemtype=itemtype , verbose=TRUE )
print(mod3b)

Run the code above in your browser using DataLab