% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tcc.R
\name{tcc}
\alias{tcc}
\title{Test and Item Characteristic Curves (Expected Scores)}
\usage{
tcc(item_params, theta = seq(-4, 4, by = 0.1), model = NULL, D = 1)
}
\arguments{
\item{item_params}{A data frame of item parameters (the \code{item_params}
element from \code{\link{binary_irt}}, \code{\link{polytomous_irt}}, or
\code{\link{mixed_irt}}). All models in the package are supported.}

\item{theta}{A numeric vector of ability values at which to evaluate the
curves (default = \code{seq(-4, 4, by = 0.1)}).}

\item{model}{Optional model override (see \code{\link{item_info}}).}

\item{D}{Scaling constant for the dichotomous logistic metric (default
\code{1}).}
}
\value{
A list with two elements:
\itemize{
\item \code{test_curve}: a data frame with columns \code{theta} and
\code{expected_score} (the test characteristic curve).
\item \code{item_curves}: a numeric matrix with one row per item and one
column per theta value, giving the expected score of each item.
}
}
\description{
Computes item characteristic curves (the expected score of each item as a
function of ability) and the test characteristic curve (the expected total
score as a function of ability). The test characteristic curve maps the latent
ability scale onto the number-correct (true-score) scale and underlies
true-score equating and score reporting; the item curves show how each item's
expected score rises across the trait.
}
\examples{
  set.seed(123)
  sim <- sim_irt(n_people = 400,
                 item_structure = list(list(model = "2PL", n_items = 10)))
  fit <- binary_irt(sim$resp, model = "2PL", method = "EM",
                    control = list(max_iter = 15, verbose = FALSE))

  curves <- tcc(fit$item_params, theta = seq(-3, 3, by = 0.5))
  curves$test_curve

  # Expected score on the first item across ability
  curves$item_curves[1, ]
}
\seealso{
\code{\link{item_info}}, \code{\link{score_table}}
}
