% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ctStanModel.R
\name{ctModelMatrices}
\alias{ctModelMatrices}
\alias{ctModelMatrices<-}
\title{Matrix view for ctStanModel objects}
\usage{
ctModelMatrices(x)

ctModelMatrices(x) <- value
}
\arguments{
\item{x}{A \code{ctStanModel} object.}

\item{value}{A named list of matrices, typically copied from
\code{ctModelMatrices(x)} or \code{x$matrices}.}
}
\value{
\code{ctModelMatrices()} returns a named list of matrices. The
replacement form returns the updated \code{ctStanModel}.
}
\description{
Access or replace the matrix representation of a \code{ctStanModel} while
keeping the \code{pars} data frame as the canonical model specification.
}
\details{
\code{ctModelMatrices(x)} reconstructs matrices from \code{x$pars}. The
replacement form updates matching \code{matrix}, \code{row}, and \code{col}
entries in \code{x$pars}. Numeric matrix entries become fixed values;
non-numeric entries become parameter labels. Metadata such as transforms and
individual variation settings is preserved when possible and reset to
fit-ready defaults when fixed/free status changes.

The same view is available as \code{x$matrices}. Direct replacements such as
\code{x$matrices$DRIFT[1, 2] <- "cross"} update \code{x$pars}; detached copies
must be assigned back with \code{x$matrices <- mats}. A placeholder
\code{matrices} element is stored in the object so the view is visible in
\code{names(x)} and printed objects, but the matrix values are always derived
from \code{x$pars}.
}
