Learn R Programming

xxIRT (version 2.0.1)

irt_stats: Compute IRT Statistics

Description

Compute probability, information, likelihood and loglikelihood via a common interface

Usage

irt_stats(x, stats = c("prob", "info", "lik", "loglik"), summary = NULL,
  fun = NULL, ...)

Arguments

x

an IRT model object

stats

the statistic to be computed

summary

the summarization direction

fun

the summarization function

...

other optional arguments

Details

In irt_stats, use stats="prob" to compute probility, stats="info" to compute information, stats="lik" to compute likelihood, and stats="loglik" to compute log-likelihood. Use summary="people" to summarize results over items and summary="items" to summarize results over people.

Examples

Run this code
# NOT RUN {
 
# Compute prob(ability), info(rmation), lik(elihood) and loglik(elihood)
x <- irt_model("3pl")$gendata(20, 5)
irt_stats(x, "prob")
irt_stats(x, "prob", "people", sum)
irt_stats(x, "info")
irt_stats(x, "info", "items", sum)
irt_stats(x, "lik")
irt_stats(x, "loglik")
# }

Run the code above in your browser using DataLab