
Free or fix parameters in an mxModel
.
This allows similar actions that update
enables
for lm models.
Updating can create duplicate labels, so this function also calls omxAssignFirstParameters
to equate the start values for parameters which now have identical labels.
umxSetParameters(model, labels, free = NULL, values = NULL,
newlabels = NULL, lbound = NULL, ubound = NULL, indep = FALSE,
strict = TRUE, name = NULL, regex = FALSE, test = FALSE)
an mxModel
to WITH
= labels to find
= new value for free
= new values
= newlabels
= value for lbound
= value for ubound
= whether to look in indep models
whether to complain if labels not found
= new name for the returned model
Is labels a regular expression (defaults to FALSE)
just show what you would do? (defaults to FALSE)
- mxModel
It also supports regular expressions to select labels. In this respect,
it is similar to umxModify
without running the model.
Other Modify or Compare Models: umxAdd1
,
umxDrop1
, umxEquate
,
umxFixAll
, umxMI
,
umxUnexplainedCausalNexus
,
umx
# NOT RUN {
require(umx)
data(demoOneFactor)
latents = c("G")
manifests = names(demoOneFactor)
m1 <- umxRAM("One Factor", data = mxData(demoOneFactor[1:80,], type = "raw"),
umxPath(from = latents, to = manifests),
umxPath(v.m. = manifests),
umxPath(v1m0 = latents)
)
parameters(m1)
umxSetParameters(m1, regex = "^", newlabels= "m1_", test = TRUE)
m2 = umxSetParameters(m1, "G_to_x1", newlabels= "G_to_x2", test = FALSE)
parameters(m2)
# }
Run the code above in your browser using DataLab