% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{plot_icc}
\alias{plot_icc}
\title{Plot an item characteristic curve}
\usage{
plot_icc(fit, item, group = NULL, n_groups = NULL, grid = seq(-5, 5, 0.05))
}
\arguments{
\item{fit}{A fitted object from \code{\link{rasch}}.}

\item{item}{Item name or column index.}

\item{group}{Optional person grouping vector, or one or more names of
factors nominated in the fit, for a DIF overlay; several names give
the factor-combination cells (the factorial display).}

\item{n_groups}{Number of class intervals for the observed means; by
default the fit's own count, or -- with a \code{group} overlay -- a
count adapted to keep the smallest group's interval cells adequately
filled.}

\item{grid}{Logit grid over which to draw the model curve.}
}
\value{
Called for its plotting side effect; invisibly \code{NULL}.
}
\description{
Draws the model expected-score curve with observed class-interval means
overlaid. With \code{group} supplied, observed means are drawn separately
per group, the conventional graphical DIF display.
}
\examples{
set.seed(1)
d <- seq(-2, 2, length.out = 6)
X <- matrix(rbinom(400 * 6, 1, plogis(outer(rnorm(400), d, "-"))), 400, 6)
colnames(X) <- sprintf("I\%02d", 1:6)
plot_icc(rasch(X), "I03")
}
