% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim.data.FCGDINA.R
\name{model.FCGDINA}
\alias{model.FCGDINA}
\title{Compute FCGDINA forced-choice pattern probabilities}
\usage{
model.FCGDINA(
  alpha,
  delta.list,
  design.matrix.list,
  Q.matrix,
  patterns.total,
  patterns,
  prob.item = NULL
)
}
\arguments{
\item{alpha}{\eqn{N \times D} binary matrix of attribute profiles.}

\item{delta.list}{List of per-item delta parameter vectors. The length must
equal \code{nrow(Q.matrix)}.}

\item{design.matrix.list}{List of per-item CDM design matrices generated by
\code{\link{get_design_matrix_cdm}}.}

\item{Q.matrix}{\eqn{I \times D} binary Q-matrix.}

\item{patterns.total}{List of full-ranking pattern matrices.}

\item{patterns}{List of observed pattern matrices.}

\item{prob.item}{Optional precomputed item endorsement-probability matrix.
Supplying it avoids recomputation in simulation workflows.}
}
\value{
An \eqn{N \times \sum_b P_b} matrix of forced-choice response
probabilities, where \eqn{P_b} is the number of observable patterns in
block \eqn{b}.
}
\description{
Computes block-level forced-choice response probabilities from known
attribute profiles and item-level CDM delta parameters. This is the
deterministic probability engine used by \code{\link{sim.data.FCGDINA}} for
response generation and is useful for checking a fitted or simulated
FCGDINA parameterization.
}
\details{
Item endorsement probabilities are first computed by
\code{\link{compute_fcgdina_item_prob}}. For person \eqn{n} and statement
\eqn{i}, the probability is
\deqn{
  p_{ni} = \mathbf{x}_i(\boldsymbol{\alpha}_n)' \boldsymbol{\delta}_i,
}
where \eqn{\mathbf{x}_i(\boldsymbol{\alpha}_n)} is the relevant row of the
item CDM design matrix. The item probabilities are then converted to
block-level forced-choice pattern probabilities by
\code{\link{forced_choice_from_agree}}.
}
\examples{
sim <- sim.data.FCGDINA(N.person = 10, N.block = 2, I.block = 2,
                        D = 2, model = "DINA")
prob <- model.FCGDINA(
  alpha = sim$alpha,
  delta.list = sim$delta.list,
  design.matrix.list = sim$design.matrix.list,
  Q.matrix = sim$Q.matrix,
  patterns.total = sim$patterns.total,
  patterns = sim$patterns
)
stopifnot(all(abs(rowSums(prob) - length(sim$block.items)) < 1e-8))

}
\seealso{
\code{\link{sim.data.FCGDINA}},
\code{\link{compute_fcgdina_item_prob}},
\code{\link{forced_choice_from_agree}}
}
\keyword{internal}
