Make a RAM (Reticular Action Model) from a SEM (structural equation model)
Source:R/make_sem_ram.R
make_sem_ram.Rd
make_sem_ram
converts SEM arrow notation to ram
describing SEM parameters
Arguments
- sem
structural equation model structure, passed to either
specifyModel
orspecifyEquations
and then parsed to control the set of path coefficients and variance-covariance parameters- variables
A character vector listing the set of variables
- quiet
if
FALSE
, the default, then the number of input lines is reported and a message is printed suggesting thatspecifyEquations
orcfa
be used.- covs
optional: a character vector of one or more elements, with each element giving a string of variable names, separated by commas. Variances and covariances among all variables in each such string are added to the model. For confirmatory factor analysis models specified via
cfa
,covs
defaults to all of the factors in the model, thus specifying all variances and covariances among these factors. Warning:covs="x1, x2"
andcovs=c("x1", "x2")
are not equivalent:covs="x1, x2"
specifies the variance ofx1
, the variance ofx2
, and their covariance, whilecovs=c("x1", "x2")
specifies the variance ofx1
and the variance ofx2
but not their covariance.
Value
An S3-class "sem_ram"
containing:
model
Output from
specifyEquations
orspecifyModel
that defines paths and parametersram
reticular action module (RAM) describing dependencies