Last chance! 50% off unlimited learning
Sale ends in
umxGetParameters retrieves parameter labels from a model, like omxGetParameters()
.
However, it is supercharged with regular expressions, so you can get labels that match a pattern.
umxGetParameters(
inputTarget,
regex = NA,
free = NA,
fetch = c("labels", "values", "free", "lbound", "ubound", "all"),
verbose = FALSE
)
An object to get parameters from: could be a RAM mxModel()
A regular expression to filter the labels. Default (NA) returns all labels. If vector, treated as raw labels to find.
A Boolean determining whether to return only free parameters.
What to return: "labels" (default) or "values", "free", "lbound", "ubound", or "all"
How much feedback to give
In addition, if regex contains a vector, this is treated as a list of raw labels to search for, and return if all are found. note: To return all labels, just leave regex as is.
omxGetParameters()
, parameters()
Other Reporting Functions:
umxAPA()
,
umxFactorScores()
,
umxParameters()
,
umx_aggregate()
,
umx_time()
,
umx
# NOT RUN {
require(umx)
data(demoOneFactor)
manifests = names(demoOneFactor)
m1 = umxRAM("One Factor", data = demoOneFactor, type = "cov",
umxPath("G", to = manifests),
umxPath(var = manifests),
umxPath(var = "G", fixedAt = 1)
)
# Show all parameters
umxGetParameters(m1)
umxGetParameters(m1, free = TRUE) # Only free parameters
umxGetParameters(m1, free = FALSE) # Only fixed parameters
# Complex regex pattern
umxGetParameters(m1, regex = "x[1-3]_with_x[2-5]", free = TRUE)
# }
Run the code above in your browser using DataLab