write_lavaan()
This vignette covers the arguments of the write_lavaan()
function and links to examples in other vignettes showing their
usage.
The regression
argument is a shorthand for the
~
operator. For example usage, see the Regression
vignette.
The covariance argument is a shorthand for the ~~
operator. For example usage, see Example
1.
The latent argument is a shorthand for the ~ 1
operator.
For example usage, see Example
1.
The latent argument is a shorthand for the =~
operator.
For example usage see Example
2.
Constraints can be specified with the constraint.equal
,
constraint.smaller
, and constraint.larger
argument, as showcased in Example
4.6.
The mediation
argument is also a shorthand for the
~
operator. However, the difference with the
regression
argument is that it can automatically specify
path names when the argument label
is set to
TRUE
. It is also possible to name the paths with letters
instead of the variable names by setting
use.letters = TRUE
. For example usage, see Example
5.
The indirect argument is a shorthand for the :=
operator. For example usage, see Example
5.
For user-defined parameters (e.g,. total effects), see Example 5.
Sometimes, some elements cannot be specified with the other
arguments, and so the custom
argument becomes handy to make
tailored specifications, such as with Multilevel SEM in Example
6.
The custom
argument can also be useful when having to
specify thresholds with the “|” operator. For example usage, see Example
10.