% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/btl.R
\name{plot_btl_categories}
\alias{plot_btl_categories}
\title{Plot graded-comparison category curves}
\usage{
plot_btl_categories(fit, grid = seq(-4, 4, 0.05))
}
\arguments{
\item{fit}{A graded fit from \code{\link{btl}} (with \code{response}).}

\item{grid}{Difference grid, in logits.}
}
\value{
Called for its plotting side effect; invisibly \code{NULL}.
}
\description{
For a graded paired-comparison fit, the probability of each response
category as a function of the location difference
\code{beta_a - beta_b}, with the symmetric threshold structure marked.
The display is the paired-comparison counterpart of the category
probability curves of a polytomous item.
}
\examples{
set.seed(1)
beta <- c(A = -1, B = -0.3, C = 0.4, D = 0.9)
pr <- t(combn(names(beta), 2))
d <- data.frame(a = rep(pr[, 1], each = 40), b = rep(pr[, 2], each = 40))
P <- vapply(seq_len(nrow(d)), function(r)
  item_moments(beta[d$a[r]] - beta[d$b[r]], c(-1, 0, 1))$P, numeric(4))
d$grade <- apply(P, 2, function(p) sample(0:3, 1, prob = p))
plot_btl_categories(btl(d, "a", "b", response = "grade"))
}
