Learn R Programming

TAM (version 1.6-0)

IRT.threshold: Thurstonian Thresholds and Wright Map for Item Response Models

Description

The function IRT.threshold computes Thurstonian thresholds for item response models. It is only based on fitted models for which the IRT.irfprob does exist. This function creates a Wright map and works as a wrapper to the wrightMap function in the WrightMap package. Wright maps operate on objects of class IRT.threshold.

Usage

IRT.threshold(object, prob.lvl=.5)	
	
## S3 method for class 'IRT.threshold':
print(x , \dots) 

IRT.WrightMap(object, ...)

## S3 method for class 'IRT.threshold':
IRT.WrightMap(object, label.items=NULL, \dots)

Arguments

object
Object of fitted models for which IRT.irfprob exists.
prob.lvl
Requested probability level of thresholds.
x
Object of class IRT.threshold
label.items
Vector of item labels
...
Further arguments to be passed.

Value

  • Function IRT.threshold: Matrix with Thurstonian thresholds Function IRT.WrightMap: A Wright map generated by the WrightMap package.

See Also

See the wrightMap function in the WrightMap package. See http://wrightmap.org/WrightMap fur tutorials of the WrightMap package.

Examples

Run this code
#############################################################################
# EXAMPLE 1: Fitted unidimensional model with gdm
#############################################################################

data(data.Students)
dat <- data.Students

# select part of thze dataset
resp <- dat[ , paste0("sc",1:4) ]
resp[ paste(resp[,1]) == 3 ,1] <-  2
psych::describe(resp)

# Model 1: Partial credit model in gdm
theta.k <- seq( -5 , 5 , len=21 )   # discretized ability
mod1 <- gdm( dat = resp , irtmodel="1PL" , theta.k=theta.k , skillspace="normal" ,
           centered.latent=TRUE)

# compute thresholds
thresh1 <- IRT.threshold(mod1)
print(thresh1)
IRT.WrightMap(thresh1)

#############################################################################
# EXAMPLE 2: Fitted mutidimensional model with gdm
#############################################################################

data( data.fraction2 )
dat <- data.fraction2$data
Qmatrix <- data.fraction2$q.matrix3

# Model 1: 3-dimensional Rasch Model (normal distribution)
theta.k <- seq( -4 , 4 , len=11 )   # discretized ability
mod1 <- gdm( dat , irtmodel="1PL" , theta.k=theta.k , Qmatrix=Qmatrix , 
              centered.latent=TRUE , maxiter=10 )
summary(mod1)            

# thresholds
thresh1 <- IRT.threshold(mod1)
print(thresh1)

Run the code above in your browser using DataLab