Fix all free parameters in a model using omxGetParameters()
umxFixAll(model, name = "_fixed", run = FALSE, verbose = FALSE)
an mxModel
within which to fix free parameters
optional new name for the model. if you begin with a _ it will be made a suffix
whether to fix and re-run the model, or just return it (defaults to FALSE)
whether to mention how many paths were fixed (default is FALSE)
- the fixed mxModel
Other Modify or Compare Models: umxAdd1
,
umxDrop1
, umxEquate
,
umxMI
, umxSetParameters
,
umxUnexplainedCausalNexus
,
umx
# NOT RUN {
require(umx)
data(demoOneFactor)
latents = c("G")
manifests = names(demoOneFactor)
m1 <- umxRAM("OneFactor", data = mxData(cov(demoOneFactor), type = "cov", numObs = 500),
umxPath(latents, to = manifests),
umxPath(var = manifests),
umxPath(var = latents, fixedAt = 1)
)
m2 = umxFixAll(m1, run = TRUE, verbose = TRUE)
mxCompare(m1, m2)
# }
Run the code above in your browser using DataLab