## Not run:
# # data generation
# data <- irt.model(model="3pl")$gen.data(500, 50)
# # MLE
# x <- estimate.people(data$responses, data$items, "3pl", "mle", debug=TRUE)
# cor(data$people$theta, x$people$theta)
# plot(data$people$theta, x$people$theta, xlim=c(-4,4), ylim=c(-4,4),
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.5), pch=16)
# # MAP
# x <- estimate.people(data$responses, data$items, "3pl", "map", debug=TRUE)
# cor(data$people$theta, x$people$theta)
# plot(data$people$theta, x$people$theta, xlim=c(-4,4), ylim=c(-4,4),
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.5), pch=16)
# # EAP
# x <- estimate.people(data$responses, data$items, "3pl", "eap")
# cor(data$people$theta, x$people$theta)
# plot(data$people$theta, x$people$theta, xlim=c(-4,4), ylim=c(-4,4),
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.5), pch=16)
# ## End(Not run)
## Not run:
# # data generation
# data <- irt.model(model="3pl")$gen.data(500, 50)
# # MLE
# x <- estimate.people.3pl.mle(data$responses, data$items, debug=TRUE)
# cor(data$people$theta, x$people$theta)
# plot(data$people$theta, x$people$theta, xlim=c(-4,4), ylim=c(-4,4),
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.5), pch=16)
# # MAP
# x <- estimate.people.3pl.map(data$responses, data$items, debug=TRUE)
# cor(data$people$theta, x$people$theta)
# plot(data$people$theta, x$people$theta, xlim=c(-4,4), ylim=c(-4,4),
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.5), pch=16)
# # EAP
# x <- estimate.people.3pl.eap(data$responses, data$items)
# cor(data$people$theta, x$people$theta)
# plot(data$people$theta, x$people$theta, xlim=c(-4,4), ylim=c(-4,4),
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.5), pch=16)
# ## End(Not run)
Run the code above in your browser using DataLab