| lavMatrixRepresentation {lavaan} | R Documentation |
Extend the parameter table with a matrix representation.
lavMatrixRepresentation(partable, representation = "LISREL",
as.data.frame. = TRUE)
partable |
A lavaan parameter table (as extracted by the
|
representation |
The matrix representation style. Currently, only the all-y version of the LISREL representation is supported. |
as.data.frame. |
If |
A list or a data.frame containing the original parameter table, plus
three columns: a "mat" column containing matrix names, and
a "row" and "col" column for the row and column indices
of the model parameters in the model matrices.
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
fit <- cfa(HS.model, data=HolzingerSwineford1939)
# extract partable (only first six columns are needed)
partable <- parTable(fit)[,1:6]
# add matrix representation
lavMatrixRepresentation(partable)