Description Usage Arguments Details Value Author(s) References See Also Examples
Derives the vector of expected values of observed variables \mathbf{g} using the Reticular Action Model (RAM) notation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
A |
|
u |
vector of length |
Filter |
|
check |
Logical.
If |
... |
... |
exe |
Logical.
If |
R |
Logical.
If |
format |
Character string.
Only used when |
simplify |
Logical. Simplify symbolic results. |
The vector of expected values of observed variables \mathbf{g} as a function of Reticular Action Model (RAM) matrices is given by
\mathbf{g} = \mathbf{F} ≤ft( \mathbf{I} - \mathbf{A} \right)^{\mathsf{T}} \mathbf{u} \\ = \mathbf{F} \mathbf{E} \mathbf{u} \\ = \mathbf{F} \mathbf{v}
where
\mathbf{A}_{t \times t} represents asymmetric paths (single-headed arrows), such as regression coefficients and factor loadings,
\mathbf{I}_{t \times t} represents an identity matrix,
\mathbf{u}_{t \times 1} vector of parameters for the mean structure,
\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{g} = \mathbf{F} \mathbf{v}
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()
,
M()
,
RAMScaled()
,
S()
,
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 | # Numeric -----------------------------------------------------------
# This is a numerical example for the model
# y = alpha + beta * x + e
# y = 0 + 1 * x + e
#--------------------------------------------------------------------
A <- matrixR::ZeroMatrix(3)
A[1, ] <- c(0, 1, 1)
u <- c(0.00, 0.50, 0.00)
Filter <- diag(2)
Filter <- cbind(Filter, 0)
colnames(A) <- rownames(A) <- c("y", "x", "e")
g(A, u, Filter)
# Symbolic ----------------------------------------------------------
# This is a symbolic example for the model
# y = alpha + beta * x + e
# y = 0 + 1 * x + e
#--------------------------------------------------------------------
A <- matrixR::ZeroMatrix(3)
A[1, ] <- c(0, "beta", 1)
u <- c("alpha", "mux", 0)
g(Ryacas::ysym(A), u, Filter)
g(Ryacas::ysym(A), u, Filter, format = "str")
g(Ryacas::ysym(A), u, Filter, format = "tex")
g(Ryacas::ysym(A), u, Filter, R = TRUE)
# Assigning values to symbols
alpha <- 0
beta <- 1
mux <- 0.50
g(Ryacas::ysym(A), u, Filter)
g(Ryacas::ysym(A), u, Filter, format = "str")
g(Ryacas::ysym(A), u, Filter, format = "tex")
g(Ryacas::ysym(A), u, Filter, R = TRUE)
eval(g(Ryacas::ysym(A), u, Filter, R = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.