# Loading the 'tcals' parameters
data(tcals)
tcals <- as.matrix(tcals)
# Creation of a response pattern (tcals item parameters,
# true ability level 0)
set.seed(1)
x <- rbinom(85, 1, Pi(0, tcals)$Pi)
# ML estimation
thetaEst(tcals, x, method="ML")
# BM estimation, standard normal prior distribution
thetaEst(tcals, x)
# BM estimation, uniform prior distribution upon range [-2,2]
thetaEst(tcals, x, method="BM", priorDist="unif", priorPar=c(-2,2))
# BM estimation, Jeffreys' prior distribution
thetaEst(tcals, x, method="BM", priorDist="Jeffreys")
# EAP estimation, standard normal prior distribution
thetaEst(tcals, x, method="EAP")
# EAP estimation, uniform prior distribution upon range [-2,2]
thetaEst(tcals, x, method="EAP", priorDist="unif", priorPar=c(-2,2))
# EAP estimation, Jeffreys' prior distribution
thetaEst(tcals, x, method="EAP", priorDist="Jeffreys")
# WL estimation
thetaEst(tcals, x, method="WL")
Run the code above in your browser using DataLab