## Not run:
# # data generation
# data <- irt.model(model="3pl")$gen.data(2000, 50)
# # JMLE
# x <- estimate.items(data$responses, model="3pl", method="jmle", people=data$people, debug=TRUE)
# cor(data$items, x$items)
# plot(data$items$a, x$items$a, xlim=c(0, 2), ylim=c(0, 2), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$b, x$items$b, xlim=c(-4, 4), ylim=c(-4, 4), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$c, x$items$c, xlim=c(0, .3), ylim=c(0, .3), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# # MMLE
# x <- estimate.items(data$responses, model="3pl", method="mmle", debug=TRUE)
# cor(data$items, x$items)
# plot(data$items$a, x$items$a, xlim=c(0, 2), ylim=c(0, 2), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$b, x$items$b, xlim=c(-4, 4), ylim=c(-4, 4), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$c, x$items$c, xlim=c(0, .3), ylim=c(0, .3), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# # BME
# x <- estimate.items(data$responses, model="3pl", method="bme", debug=TRUE)
# cor(data$items, x$items)
# plot(data$items$a, x$items$a, xlim=c(0, 2), ylim=c(0, 2), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$b, x$items$b, xlim=c(-4, 4), ylim=c(-4, 4), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$c, x$items$c, xlim=c(0, .3), ylim=c(0, .3), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# ## End(Not run)
## Not run:
# # data generation
# data <- irt.model(model="3pl")$gen.data(2000, 50)
# # JMLE
# x <- estimate.items.3pl.jmle(data$responses, data$people, debug=TRUE)
# cor(data$items, x$items)
# plot(data$items$a, x$items$a, xlim=c(0, 2), ylim=c(0, 2), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$b, x$items$b, xlim=c(-4, 4), ylim=c(-4, 4), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$c, x$items$c, xlim=c(0, .3), ylim=c(0, .3), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# # MMLE
# x <- estimate.items.3pl.mmle(data$responses, debug=TRUE)
# cor(data$items, x$items)
# plot(data$items$a, x$items$a, xlim=c(0, 2), ylim=c(0, 2), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$b, x$items$b, xlim=c(-4, 4), ylim=c(-4, 4), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$c, x$items$c, xlim=c(0, .3), ylim=c(0, .3), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# # BME
# x <- estimate.items.3pl.bme(data$responses, debug=TRUE)
# cor(data$items, x$items)
# plot(data$items$a, x$items$a, xlim=c(0, 2), ylim=c(0, 2), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$b, x$items$b, xlim=c(-4, 4), ylim=c(-4, 4), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# plot(data$items$c, x$items$c, xlim=c(0, .3), ylim=c(0, .3), pch=16,
# xlab="True", ylab="Est.", col=rgb(.8,.2,.2,.6))
# ## End(Not run)
Run the code above in your browser using DataLab