Description Usage Arguments Value Author(s) Examples
It computes a symbolic model-implied covariance (or correlation) matrix in SEM using the RAM inputs.
1 |
RAM |
A RAM object including a list of matrices of the model
returned from |
corr |
Whether the model implied matrix is covariance (default) or correlation. |
The model implied covariance (or correlation) matrix.
Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #### A mediation model
model1 <- "y ~ c*x + b*m
m ~ a*x
## Means
y ~ b0*1
m ~ m0*1
x ~ x0*1"
RAM1 <- metaSEM::lavaan2RAM(model1)
## Model-implied covariance matrix and mean structure
impliedS(RAM1, corr=FALSE)
## Model-implied correlation matrix
impliedS(RAM1, corr=TRUE)
#### A CFA model
model2 <- "f =~ x1 + x2 + x3 + x4"
RAM2 <- metaSEM::lavaan2RAM(model2)
## Model-implied covariance matrix
impliedS(RAM2, corr=FALSE)
## Model-implied correlation matrix
impliedS(RAM2, corr=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.