% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim-utils.R
\name{get_design_matrix_cdm}
\alias{get_design_matrix_cdm}
\title{Build the CDM design matrix for a set of attribute patterns}
\usage{
get_design_matrix_cdm(patterns, model = "GDINA")
}
\arguments{
\item{patterns}{A binary matrix of attribute mastery patterns
(\eqn{L \times K}).}

\item{model}{One of \code{"DINA"}, \code{"DINO"}, \code{"ACDM"}, \code{"GDINA"}.}
}
\value{
A numeric design matrix \eqn{X} with \eqn{L} rows.  Column count
depends on the model.
}
\description{
Constructs the design matrix \eqn{X} used in the cognitive diagnostic
model probability formulation \eqn{p = X\delta}.  The structure depends
on the model type:
\describe{
\item{DINA}{Intercept + single mastery indicator (all attributes mastered).}
\item{DINO}{Intercept + single "at-least-one" indicator.}
\item{ACDM}{Intercept + main effects of each attribute.}
\item{GDINA}{Full saturated interaction matrix (all \eqn{2^K} columns).}
}
}
\keyword{internal}
