Description Usage Arguments Details Value Syntax Operations par.label Line breaks Comments Author(s) References See Also Examples
Converts model equations to RAM matrices.
1 |
eq |
Character string. Equations. See Details. |
par |
Logical.
If |
The argument eq is a character string
that specifies the associations between the variables.
See Syntax, Operations, par.label,
Line breaks, and Comments below.
Returns a list with the following elements
Parameter table.
Variable names.
Variable names of observed variables.
Variable names of latent variables.
t by t matrix \mathbf{A}.
Asymmetric paths (single-headed arrows),
such as regression coefficients and factor loadings.
t by t numeric matrix \mathbf{S}.
Symmetric paths (double-headed arrows),
such as variances and covariances.
t by 1 matrix \mathbf{u} of mean structure parameters.
p by t numeric matrix
\mathbf{F}.
Filter matrix used to select observed variables.
par.tables in the list is a data.frame
with the following columns
is the variable on the left-hand side,
is the variable on the right-hand side,
is the operation between lhs and rhs,
is the column of parameter label,
is the column of starting values for estimation
if eq has a fifth colulmn, and
is the column of parameter label
with NAs on fixed parameters,
is the type of the parameter,
is the RAM matrix used to represent the parameter,
is the row index in the RAM matrix for the parameter, and
is the column index in the RAM matrix for the parameter.
Each line should follow the syntax below
lhs <space> op <space> rhs <space> par.label <\n> or <;>
is the variable on the left-hand side,
is the variable on the right-hand side,
is the operation between lhs and rhs,
is the column of parameter label,
are line breaks. Each line should end with a line break.
The associations are defined by the following operations
left-hand side measured by right-hand side,
left-hand side regressed on right-hand side,
left-hand side covarying with right-hand side,
left-hand side regressed on 1 for mean structure.
Each parameter should be labeled.
The par.label should be a number for fixed parameters
and a character string for free parameters.
Equality contraints can be imposed by using the same par.label.
The characters \n and ; can be used as line breaks.
Each line should end with a line break.
Comments can be written after a hash (#) sign.
Ivan Jacob Agaloos Pesigan
McArdle, J. J., & McDonald, R. P. (1984). Some algebraic properties of the Reticular Action Model for moment structures. British Journal of Mathematical and Statistical Psychology, 37 (2), 234–251. https://doi.org/10.1111/j.2044-8317.1984.tb00802.x
Other eq functions:
Eq2Expectations(),
EqParse()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Numeric ----------------------------------------------------------
eq <- "
# lhs op rhs par.label
e by y 1
y on x 1
e with e 1
x with x 0.25
y on 1 0
x on 1 0.50
"
Eq2RAM(eq)
# Symbolic ----------------------------------------------------------
eq <- "
# lhs op rhs par.label
e by y 1
y on x beta
e with e sigmae2
x with x sigmax2
y on 1 alpha
x on 1 mux
"
Eq2RAM(eq)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.