# Loading the 'tcals' parameters
data(tcals)
# Selecting item parameters only
tcals <- as.matrix(tcals[,1:4])
# Item bank creation with 'tcals' item parameters
bank <- createItemBank(tcals)
# Selection of two arbitrary items (15 and 20) of the
# 'tcals' data set
it <- bank$itemPar[c(15,20),]
# Creation of a response pattern
x <- c(0,1)
# MLWI for item 1
MWI(bank, 1, x, it)
# MPWI for item 1
MWI(bank, 1, x, it, type="MPWI")
# MLWI for item 1, different integration range
MWI(bank, 1, x, it, lower=-2, upper=2, nqp=20)
# MPWI for item 1, uniform prior distribution on the range [-2,2]
MWI(bank, 1, x, it, type="MPWI", priorDist="unif", priorPar=c(-2,2))
Run the code above in your browser using DataLab