## Not run:
# # JMLE
# x <- gen.rsp(gen.irt(3000, 30, a.sig=.4))
# y <- estimate.item.jmle(x$rsp, x$thetas, model="3PL", diagnose=TRUE)
# plot(x$items$a, y$parameters$a, xlim=c(0, 3), ylim=c(0, 3), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# plot(x$items$b, y$parameters$b, xlim=c(-3, 3), ylim=c(-3, 3), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# plot(x$items$c, y$parameters$c, xlim=c(0, .5), ylim=c(0, .5), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# ## End(Not run)
## Not run:
# # MMLE
# x <- gen.rsp(gen.irt(3000, 30, a.sig=.4))
# y <- estimate.item.mmle(x$rsp, model="3PL", diagnose=TRUE)
# plot(x$items$a, y$parameters$a, xlim=c(0, 3), ylim=c(0, 3), pch=16, col=rgb(.8,.2,.2,.5),)
# abline(a=0, b=1, lty=2)
# plot(x$items$b, y$parameters$b, xlim=c(-3, 3), ylim=c(-3, 3), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# plot(x$items$c, y$parameters$c, xlim=c(0, .5), ylim=c(0, .5), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# y$diagnosis$h
# z <- estimate.theta.mle(x$rsp, y$parameters$a, y$parameters$b, y$parameters$c)
# plot(x$thetas, z, xlim=c(-5, 5), ylim=c(-5, 5), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# ## End(Not run)
## Not run:
# # BME
# x <- gen.rsp(gen.irt(3000, 30, a.sig=.4))
# y <- estimate.item.bme(x$rsp, model="3PL", diagnose=TRUE, a.mu=0, a.sig=.4, c.alpha=5, c.beta=30)
# plot(x$items$a, y$parameters$a, xlim=c(0, 3), ylim=c(0, 3), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# plot(x$items$b, y$parameters$b, xlim=c(-3, 3), ylim=c(-3, 3), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# plot(x$items$c, y$parameters$c, xlim=c(0, .5), ylim=c(0, .5), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# y$diagnosis$h
# z <- estimate.theta.mle(x$rsp, y$parameters$a, y$parameters$b, y$parameters$c)
# plot(x$thetas, z, xlim=c(-5, 5), ylim=c(-5, 5), pch=16, col=rgb(.8,.2,.2,.5))
# abline(a=0, b=1, lty=2)
# ## End(Not run)
Run the code above in your browser using DataLab