# 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)
# EAP estimation, standard normal prior distribution
th <- eapEst(tcals, x)
c(th, eapSem(th, tcals, x))
# EAP estimation, uniform prior distribution upon range [-2,2]
th <- eapEst(tcals, x, priorDist="unif", priorPar=c(-2,2))
c(th, eapSem(th, tcals, x, priorDist="unif", priorPar=c(-2,2)))
# EAP estimation, Jeffreys' prior distribution
th <- eapEst(tcals, x, priorDist="Jeffreys")
c(th, eapSem(th, tcals, x, priorDist="Jeffreys"))
Run the code above in your browser using DataLab