mxLISRELObjective(LX=NA, LY=NA, BE=NA, GA=NA, PH=NA, PS=NA, TD=NA, TE=NA, TH=NA,
TX = NA, TY = NA, KA = NA, AL = NA,
dimnames = NA, thresholds = NA, vector = FALSE, threshnames = dimnames)
The full LISREL specification has 13 matrices and is sometimes called the extended LISREL model. It is defined by the following equations.
$$\eta = \alpha + B \eta + \Gamma \xi + \zeta$$ $$y = \tau_y + \Lambda_y \eta + \epsilon$$ $$x = \tau_x + \Lambda_x \xi + \delta$$
The table below is provided as a quick reference to the numerous matrices in LISREL models. Note that NX is the number of manifest exogenous (independent) variables, the number of Xs. NY is the number of manifest endogenous (dependent) variables, the number of Ys. NK is the number of latent exogenous variables, the number of Ksis or Xis. NE is the number of latent endogenous variables, the number of etas.
From the extended LISREL model, several submodels can be defined. Subtypes of the LISREL model are defined by setting some of the arguments of the LISREL objective to NA. Note that because the default values of each LISREL matrix is NA, setting a matrix to NA can be accomplished by simply not giving it any other value.
The first submodel is the LISREL model without means.
$$\eta = B \eta + \Gamma \xi + \zeta$$ $$y = \Lambda_y \eta + \epsilon$$ $$x = \Lambda_x \xi + \delta$$
The LISREL model without means requires 9 matrices: LX, LY, BE, GA, PH, PS, TD, TE, and TH. Hence this LISREL model has TX, TY, KA, and AL as NA. This can be accomplished be leaving these matrices at their default values.
The TX, TY, KA, and AL matrices must be specified if either the mxData type is
A second submodel involves only endogenous variables.
$$\eta = B \eta + \zeta$$ $$y = \Lambda_y \eta + \epsilon$$
The endogenous-only LISREL model requires 4 matrices: LY, BE, PS, and TE. The LX, GA, PH, TD, and TH must be NA in this case. However, means can also be specified, allowing TY and AL if the data are raw or if observed means are provided.
Another submodel involves only exogenous variables.
$$x = \Lambda_x \xi + \delta$$
The exogenous-model model requires 3 matrices: LX, PH, and TD. The LY, BE, GA, PS, TE, and TH matrices must be NA. However, means can also be specified, allowing TX and KA if the data are raw or if observed means are provided.
The model that is run depends on the matrices that are not NA. If all 9 matrices are not NA, then the full model is run. If only the 4 endogenous matrices are not NA, then the endogenous-only model is run. If only the 3 exogenous matrices are not NA, then the exogenous-only model is run. If some endogenous and exogenous matrices are not NA, but not all of them, then appropriate errors are thrown. Means are included in the model whenever their matrices are provided. The MxMatrix objects included as arguments may be of any type, but should have the properties described above. The mxLISRELObjective will not return an error for incorrect specification, but incorrect specification will likely lead to estimation problems or errors in the mxRun function.
Like the mxRAMObjective, the mxLISRELObjective evaluates with respect to an MxData object. The MxData object need not be referenced in the mxLISRELObjective function, but must be included in the MxModel object. mxLISRELObjective requires that the 'type' argument in the associated MxData object be equal to 'cov', 'cor', or 'raw'.
To evaluate, place MxLISRELObjective objects, the mxData object for which the expected covariance approximates, referenced MxAlgebra and MxMatrix objects, and optional MxBounds and MxConstraint objects in an MxModel object. This model may then be evaluated using the mxRun function. The results of the optimization can be found in the 'output' slot of the resulting model, and may be obtained using the mxEval function.
J
The OpenMx User's guide can be found at http://openmx.psyc.virginia.edu/documentation.
#####------------------------------#####
##### Factor Model
mLX <- mxMatrix("Full", values=c(.5, .6, .8, rep(0, 6), .4, .7, .5),
name="LX", nrow=6, ncol=2,
free=c(TRUE,TRUE,TRUE,rep(FALSE, 6),TRUE,TRUE,TRUE))
mTD <- mxMatrix("Diag", values=c(rep(.2, 6)), name="TD", nrow=6, ncol=6,
free=TRUE)
mPH <- mxMatrix("Symm", values=c(1, .3, 1), name="PH", nrow=2, ncol=2,
free=c(FALSE, TRUE, FALSE))
# Create a LISREL objective with LX, TD, and PH matrix names
objective <- mxLISRELObjective(LX="LX", TD="TD", PH="PH")
testModel <- mxModel(model="testModel", mLX, mTD, mPH, objective)
Run the code above in your browser using DataLab