Hello,
I am trying to simulate data using the endogenous variables only LISREL model as seen on page 133 of the OpenMx.pdf help documentation. I was able to simulate data from a state space model using the example in the help documentation on page 174. Now I am modifying that piece of code for a LISREL model. However I am running into an error. Below is my code.
library(OpenMx) nvar <- 6 varnames <- paste("x",1:nvar,sep="") ssModelLisrel <- mxModel(model="lisrel", mxMatrix("Full",6,6,TRUE,.2,name="BE"), mxMatrix("Full",6,6,TRUE,.5,name="LY",dimnames=list(varnames,varnames)), mxMatrix("Diag",6,6,FALSE,1,name="PS"), mxMatrix("Diag",6,6,FALSE,1,name="TE"), mxExpectationLISREL(BE="BE",LY="LY",PS="PS",TE="TE"), mxFitFunctionML() ) ssDataLisrel <- mxGenerateData(ssModelLisrel,200)
The error I get is:
Error in mxEvalByName(ALname, model, compute = TRUE, defvar.row = defvar.row) : 'name' argument must be a character argument
Below is my current system configuration:
OpenMx version: 2.5.2 [GIT v2.5.2]
R version: R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32
Default optimiser: SLSQP
Any assistance would be greatly appreciated! Thank you!