Description Usage Arguments Details Value Author(s) References See Also Examples
Derives the matrix of covariance expectations of observed variables \mathbf{M}.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
A |
|
S |
|
Filter |
|
check |
Logical.
If |
... |
... |
exe |
Logical.
If |
R |
Logical.
If |
format |
Character string.
Only used when |
simplify |
Logical. Simplify symbolic results. |
The matrix of covariance expectations for given variables \mathbf{M} as a function of Reticular Action Model (RAM) matrices is given by
\mathbf{M} = \mathbf{F} ≤ft( \mathbf{I} - \mathbf{A} \right)^{-1} \mathbf{S} ≤ft[ ≤ft( \mathbf{I} - \mathbf{A} \right)^{-1} \right]^{\mathsf{T}} \mathbf{F}^{\mathsf{T}} \\ = \mathbf{F} \mathbf{E} \mathbf{S} \mathbf{E}^{\mathsf{T}} \mathbf{F}^{\mathsf{T}} \\ = \mathbf{F} \mathbf{C} \mathbf{F}^{\mathsf{T}}
where
\mathbf{A}_{t \times t} represents asymmetric paths (single-headed arrows), such as regression coefficients and factor loadings,
\mathbf{S}_{t \times t} represents symmetric paths (double-headed arrows), such as variances and covariances,
\mathbf{I}_{t \times t} represents an identity matrix,
\mathbf{F}_{p \times t} represents the filter matrix used to select the observed variables,
p number of observed variables,
q number of latent variables, and
t number of observed and latent variables, that is p + q .
\mathbf{M} = \mathbf{F} \mathbf{C} \mathbf{F}^{\mathsf{T}}
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 RAM matrices functions:
C()
,
Expectations()
,
E()
,
IminusA()
,
RAMScaled()
,
S()
,
g()
,
u()
,
v()
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 27 28 29 30 31 32 33 34 35 36 37 38 39 | # Numeric -----------------------------------------------------------
# This is a numerical example for the model
# y = alpha + beta * x + e
# y = 0 + 1 * x + e
#--------------------------------------------------------------------
A <- S <- matrixR::ZeroMatrix(3)
A[1, ] <- c(0, 1, 1)
diag(S) <- c(0, 0.25, 1)
colnames(A) <- rownames(A) <- c("y", "x", "e")
Filter <- diag(2)
Filter <- cbind(Filter, 0)
colnames(Filter) <- c("y", "x", "e")
M(A, S, Filter)
# Symbolic ----------------------------------------------------------
# This is a symbolic example for the model
# y = alpha + beta * x + e
# y = 0 + 1 * x + e
#--------------------------------------------------------------------
A <- S <- matrixR::ZeroMatrix(3)
A[1, ] <- c(0, "beta", 1)
diag(S) <- c(0, "sigmax2", "sigmae2")
M(Ryacas::ysym(A), S, Filter)
M(Ryacas::ysym(A), S, Filter, format = "str")
M(Ryacas::ysym(A), S, Filter, format = "tex")
M(Ryacas::ysym(A), S, Filter, R = TRUE)
# Assigning values to symbols
beta <- 1
sigmax2 <- 0.25
sigmae2 <- 1
M(Ryacas::ysym(A), S, Filter)
M(Ryacas::ysym(A), S, Filter, format = "str")
M(Ryacas::ysym(A), S, Filter, format = "tex")
M(Ryacas::ysym(A), S, Filter, R = TRUE)
eval(M(Ryacas::ysym(A), S, Filter, R = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.