% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit.R
\name{chisq_detail}
\alias{chisq_detail}
\title{Class-interval detail for one item's chi-square test of fit}
\usage{
chisq_detail(fit, item)
}
\arguments{
\item{fit}{A fitted object from \code{\link{rasch}}.}

\item{item}{Item name or index.}
}
\value{
A list with \code{item}, \code{location}, the \code{intervals}
  data frame, the \code{categories} data frame, the whole-sample observed
  mean \code{ave}, and the item's total \code{chisq}, \code{df}, and
  \code{p}. Intervals with fewer than 2 responders are shown but carry no
  chi-square contribution (\code{used = FALSE}), matching the item-trait
  computation.
}
\description{
The per-class-interval breakdown behind an item's item-trait chi-square,
as dissected in Andrich and Marais (2019, ch. 13): for every class
interval the size, the maximum and mean
person location, the standardised residual between observed and expected
interval means, its squared chi-square component, the observed and
expected means (OM, EV), the sample-size-free effect size
ES = (OM - EV)/sqrt(mean V), and per response category the observed
proportion (OBS.P), the mean model probability (EST.P), and the observed
conditional threshold proportion (OBS.T), the proportion scoring k among
those scoring k - 1 or k.
}
\examples{
set.seed(1)
d <- seq(-1.5, 1.5, length.out = 6)
X <- matrix(rbinom(400 * 6, 1, plogis(outer(rnorm(400), d, "-"))), 400, 6)
colnames(X) <- paste0("I", 1:6)
chisq_detail(rasch(X), "I3")$intervals
}
