% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dependence.R
\name{spread_test}
\alias{spread_test}
\title{Spread-parameter test for dependence within subtests}
\usage{
spread_test(fit, maxit = 60, tol = 1e-08)
}
\arguments{
\item{fit}{A fitted object from \code{\link{rasch}}.}

\item{maxit, tol}{Passed to the \code{\link{pcml_pc}} refit.}
}
\value{
A data frame with one row per polytomous item: \code{item},
  \code{m}, the \code{spread} estimate and its \code{se}, the bound
  \code{lub} (available for maximum scores 2 to 8), \code{z} =
  (spread - lub)/se, and \code{dependent} = spread below the bound.
  Dichotomous items carry no spread and are omitted.
}
\description{
Andrich's (1985) least-upper-bound screen: the spread component
\eqn{\lambda} of a polytomous item (half the distance between successive
thresholds in the principal-components parameterisation, estimated here
by \code{\link{pcml_pc}}) cannot fall below the value implied by the
binomial distribution when the item is a subtest of equally difficult,
independent dichotomous items; different difficulties only raise it.
A spread estimate below the bound therefore indicates response
dependence among the members (Andrich and Marais 2019, Table 24.1).
Typically applied after \code{\link{combine_items}}, whose super-items
are exactly such subtests.
}
\examples{
set.seed(1); N <- 600
d0 <- seq(-1.5, 1.5, length.out = 8)
X <- matrix(rbinom(N * 8, 1, plogis(outer(rnorm(N), d0, "-"))), N, 8)
X[, 5] <- X[, 4]; X[, 6] <- X[, 4]                 # a dependent triple
colnames(X) <- paste0("I", 1:8)
fit2 <- combine_items(rasch(X), list(c("I4", "I5", "I6"), c("I1", "I2", "I3")))
spread_test(fit2)
}
