Obtain the model-implied covariance matrix of manifest variables given a structural equation model and its model parameters
theta.2.Sigma.theta(model, theta, latent.vars)
RAM matrix, including any rows generated for covariances among fixed exogenous variables; column 5 includes computed start values.
number of model parameters (i.e., the length of theta
)
total number of variables (i.e., manifest variables plus latent variables)
number of observed variables
the names of all variables (i.e., manifest plus latent)
the names of observed variables
the names of latent variables
the names of model parameters
the P matrix in RAM notation
the A matrix in RAM notation
the model implied covariance matrix
an RAM (reticular action model; e.g., McArdle & McDonald, 1984) specification of a structural equation model, and should be of class mod
. The model is specified in the same manner as does the sem
package; see sem
and specify.model
for detailed documentations about model specifications in the RAM notation.
a vector containing the model parameters. The names of the elements in theta
must be the same as the names of the model parameters specified in model
.
a vector containing the names of the latent variables
Keke Lai (University of California--Merced)
Part of the codes in this function are adapted from the function sem
in the sem
R package (Fox, 2006). This function uses the same notation to specify SEM models as does sem
. Please refer to sem
and the example below for more detailed documentation about model specification and the RAM notation. For technical discussion on how to obtain the model implied covariance matrix in the RAM notation given model parameters, see McArdle and McDonald (1984).
Fox, J. (2006). Structural equation modeling with the sem package in R. Structural Equation Modeling, 13, 465--486.
Lai, K., & Kelley, K. (in press). Accuracy in parameter estimation for targeted effects in structural equation modeling: Sample size planning for narrow confidence intervals. Psychological Methods.
McArdle, J. J., & McDonald, R. P. (1984). Some algebraic properties of the reticular action model. British Journal of Mathematical and Statistical Psychology, 37, 234--251.
sem
; specify.model