% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/S3coef.R
\name{coef}
\alias{coef}
\alias{coef.MIRT}
\alias{coef.MGPCM}
\alias{coef.MGGUM}
\alias{coef.FCMIRT}
\alias{coef.FCDCM}
\alias{coef.FCGDINA}
\alias{coef.FCGGUM}
\alias{coef.TIRT}
\title{S3 Methods: coef}
\usage{
\method{coef}{MIRT}(object, type = c("par", "theta", "Corr", "all"), ...)

\method{coef}{MGPCM}(object, type = c("par", "theta", "Corr", "all"), ...)

\method{coef}{MGGUM}(object, type = c("par", "theta", "Corr", "all"), ...)

\method{coef}{FCMIRT}(object, type = c("par", "theta", "Corr", "all"), ...)

\method{coef}{FCDCM}(object, type = c("par", "theta", "Corr", "all"), ...)

\method{coef}{FCGDINA}(object, type = c("par", "theta", "Corr", "all"), ...)

\method{coef}{FCGGUM}(object, type = c("par", "theta", "Corr", "all"), ...)

\method{coef}{TIRT}(object, type = c("par", "theta", "Corr", "all"), ...)
}
\arguments{
\item{object}{An object of one of the following classes:
\itemize{
\item \code{"MIRT"} --- Multidimensional IRT model.
\item \code{"MGPCM"} --- Multidimensional Generalized Partial Credit Model.
\item \code{"MGGUM"} --- Multidimensional Generalized Graded Unfolding Model.
\item \code{"FCMIRT"} --- Forced-Choice Multidimensional IRT model.
\item \code{"FCDCM"} --- Forced-Choice Diagnostic Classification Model.
\item \code{"FCGDINA"} --- Forced-Choice GDINA model.
\item \code{"FCGGUM"} --- Forced-Choice Generalized Graded Unfolding Model.
\item \code{"TIRT"} --- Thurstonian IRT for Forced-Choice.
}}

\item{type}{Character string specifying which parameters to extract:
\code{"par"} (default) for item/statement parameters, \code{"theta"}
for person trait estimates, \code{"Corr"} for factor correlations, or
\code{"all"} for a list with all three.}

\item{...}{Additional arguments (currently ignored).}
}
\value{
\describe{
\item{\code{type = "par"}}{A matrix of item/statement/block parameter
estimates. Rows index items/statements/blocks and columns index
parameter types. Column names indicate the parameter (e.g.,
\code{"a1"}, \code{"b"}, \code{"d0"}, \code{"tau1"}, \code{"eta0"}).}
\item{\code{type = "theta"}}{An \eqn{N \times D} matrix of person
parameter (latent trait) estimates.}
\item{\code{type = "Corr"}}{A \eqn{D \times D} inter-trait correlation
matrix.}
\item{\code{type = "all"}}{A named list with components \code{par},
\code{theta}, and \code{Corr}.}
}
}
\description{
Extract estimated model coefficients (item, statement, or block
parameters) from fitted \pkg{ForceChoice} model objects. This provides a
standard R interface for retrieving parameter estimates, standard errors,
and convergence diagnostics in a consistent format across all eight model
families.
}
\details{
For \code{FCDCM} objects, \code{type = "par"} returns a list with
components \code{delta} (higher-order parameters, \eqn{D \times 2}) and
\code{par} (block \eqn{\eta} parameters, \eqn{B \times 2}), reflecting
the hierarchical structure of the model.
}
\section{Methods (by class)}{
\itemize{
\item \code{coef(MIRT)}: Extract coefficients from \code{MIRT} objects.
Returns \eqn{I \times (D+3)} matrix with columns a1..aD, b, c, d.

\item \code{coef(MGPCM)}: Extract coefficients from \code{MGPCM} objects.
Returns \eqn{I \times (D+K_{\max})} matrix with columns a1..aD, d0..d(K-1).

\item \code{coef(MGGUM)}: Extract coefficients from \code{MGGUM} objects.
Returns matrix with columns a1..aD, delta1..deltaD, tau0..tau(K-1).

\item \code{coef(FCMIRT)}: Extract coefficients from \code{FCMIRT} objects.
Returns statement parameter matrix with columns a1..aD, b, c, d.

\item \code{coef(FCDCM)}: Extract coefficients from \code{FCDCM} objects.
Returns a list with \code{delta} (\eqn{D \times 2} higher-order
parameters) and \code{par} (\eqn{B \times 2} block \eqn{\eta}
parameters). \code{type = "theta"} returns the higher-order trait,
and \code{type = "Corr"} returns a scalar 1.

\item \code{coef(FCGDINA)}: Extract coefficients from \code{FCGDINA} objects.
\code{type = "par"} returns CDM delta parameters,
\code{type = "theta"} returns posterior attribute mastery probabilities,
\code{type = "Corr"} returns \code{NA} (no continuous latent trait).

\item \code{coef(FCGGUM)}: Extract coefficients from \code{FCGGUM} objects.
Returns matrix with columns a1..aD, delta1..deltaD, tau0..tau(K-1).

\item \code{coef(TIRT)}: Extract coefficients from \code{TIRT} objects.
Returns \eqn{I \times (D+1)} matrix with columns lambda1..lambdaD, psi2.

}}
\examples{
sim <- sim.data.MIRT(N = 20, I = 6, D = 2, model = "m2pl")
fit <- fit.MIRT(
  sim$response, model = "m2pl", D = 2, method = "iStEM",
  control.method = list(
    vis = FALSE, seed = 123,
    M = 2, B = 2, burnin.maxitr = 2,
    maxitr = 3, eps1 = 10, eps2 = 10,
    estimate.se = FALSE)
)

coef(fit)                  # item parameter estimates
coef(fit, type = "theta")  # person trait estimates
coef(fit, type = "Corr")   # factor correlation matrix
coef(fit, type = "all")    # everything in a list

}
