The revisions let you track differences between multiple versions of a post.
Please add material here as you learn...
If you have questions not answers, then add those here: That's how a wiki works.
<em># Create an empy model, and place it in an object.</em> model <- mxModel()
# Create a model named 'firstdraft' with one matrix
model <- mxModel('firstdraft', mxMatrix('Full', nrow = 3, ncol = 3, name = "A"))
model <- mxModel(model, name= "finaldraft", mxMatrix('Symm', nrow = 3, name = "S"), mxMatrix('Iden', nrow = 3, name = "F"))
data <- data.frame() model <- mxModel(model, mxData(data, type='raw'))
# View the data associated with MxModel object 'model'
You can remove paths, matrices, algebras, and other objects from a model using mxModel, with the to-be-modified model as its first parameter, and then a comma delimited list of the names of the objects you want to remove, setting remove to TRUE
aModel <- <strong>mxModel</strong>("aModel", mxMatrix(name="myMatrix", type="Full",nrow=8,ncol=5)) aMinus <- <strong>mxModel</strong>(aModel, "myMatrix", remove = <font color="green">TRUE</font>)
Here is an example why you must use the name of the entity instead of the entity itself. The following code WILL NOT WORK and is not allowed to work because "container.A" and "submodel.A" are identical objects. Both objects contain the value "A" in the slot "name."
A <- mxMatrix("Full", 1, 1, name = "A") submodel1 <- mxModel("submodel1", A) container <- mxModel("container", submodel1, A) <em># Oh oh, this would have deleted "countainer.A" instead of "submodel.A"</em> accident <- mxModel(container, submodel1$A, remove = TRUE)