collapse_omega | R Documentation |
If multiple OMEGA
(or SIGMA
) blocks were written into the model,
these can be collapsed into a single matrix. This will not change the
functionality of the model, but will alter how OMEGA
(or SIGMA
) are
updated, usually making it easier. This "collapsing" of the matrix list
is irreversible.
collapse_omega(x, range = NULL, name = NULL)
collapse_sigma(x, range = NULL, name = NULL)
x |
a model object. |
range |
numeric vector of length 2 specifying the range of matrices
to collapse in case there are more than 2. The second element may be |
name |
a new name for the collapsed matrix; note that this is the
matrix name, not the labels which alias |
A model object with updated OMEGA
or SIGMA
matrix lists.
collapse_matrix()
code <- '
$OMEGA 1 2 3
$OMEGA 4 5
$OMEGA 6 7 8 9
'
mod <- mcode("collapse-example", code, compile = FALSE)
revar(mod)
collapse_omega(mod) %>% omat()
collapse_omega(mod, range = c(2,3), name = "new_matrix") %>% omat()
collapse_omega(mod, range = c(2,NA), name = "new_matrix") %>% omat()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.