% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tailored.R
\name{tailored_analysis}
\alias{tailored_analysis}
\title{Tailored analysis for guessing}
\usage{
tailored_analysis(fit, chance = 0.25, anchor_items = NULL)
}
\arguments{
\item{fit}{A dichotomous fit from \code{\link{rasch}}.}

\item{chance}{The guessing floor: the probability of success by chance
(1/number of options; default 0.25).}

\item{anchor_items}{Items whose mean location fixes the common origin in
step 3. The default takes the third of the test (at least two items)
least affected by tailoring -- fewest responses removed, ties broken
towards the easier tailored location -- which are the easy items the
procedure trusts.}
}
\value{
A list of class \code{"rasch_tailored"}: \code{tailored},
  \code{origin_equated}, and \code{anchored} fits, the comparison
  \code{table} (initial, tailored, origin-equated locations, the
  tailored-minus-equated \code{shift}, and its \code{z}), the number of
  responses removed, and the anchor items used.
}
\description{
Runs the four-step tailored procedure of Andrich, Marais and Humphry
(2012) on a dichotomous analysis.
Step 1 is the supplied fit. Step 2 (tailored) sets to missing every
observed response whose modelled probability of success, at the step-1
person and item estimates, is below \code{chance}, and re-estimates
items and persons. Step 3 (origin-equated) re-analyses the
\emph{original} data with the mean location of the anchor items fixed at
their tailored values by average anchoring, so the two calibrations
share an origin. Step 4 (all-anchored) fixes every item at its tailored
difficulty and re-estimates persons on the original data. Guessing is
indicated when difficult items are estimated harder in the tailored
analysis than in the origin-equated one; the comparison table and
\code{\link{plot_equate}} on the two calibrations show it directly.
}
\examples{
set.seed(1); N <- 800
d <- seq(-2, 2.5, length.out = 10); th <- rnorm(N)
P <- plogis(outer(th, d, "-"))
P <- 0.25 + 0.75 * P            # uniform guessing floor
X <- matrix(rbinom(N * 10, 1, P), N, 10)
colnames(X) <- paste0("I", 1:10)
ta <- tailored_analysis(rasch(X), chance = 0.25)
ta$table
}
\references{
Waller, M. I. (1989). Modeling guessing behavior: A
  comparison of two IRT models. Applied Psychological Measurement, 13,
  233-243. Andrich, D., Marais, I. and Humphry, S. (2012). Using a
  theorem by Andersen and the dichotomous Rasch model to assess the
  presence of random guessing in multiple choice items. Journal of
  Educational and Behavioral Statistics, 37, 417-442.
}
