| ctModelMatrices | R Documentation |
Access or replace the matrix representation of a ctStanModel while
keeping the pars data frame as the canonical model specification.
ctModelMatrices(x)
ctModelMatrices(x) <- value
x |
A |
value |
A named list of matrices, typically copied from
|
ctModelMatrices(x) reconstructs matrices from x$pars. The
replacement form updates matching matrix, row, and col
entries in 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 x$matrices. Direct replacements such as
x$matrices$DRIFT[1, 2] <- "cross" update x$pars; detached copies
must be assigned back with x$matrices <- mats. A placeholder
matrices element is stored in the object so the view is visible in
names(x) and printed objects, but the matrix values are always derived
from x$pars.
ctModelMatrices() returns a named list of matrices. The
replacement form returns the updated ctStanModel.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.