Learn R Programming

umx (version 4.0.0)

umxGetParameters: Get parameters from a model, with support for pattern matching!

Description

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.

Usage

umxGetParameters(
  inputTarget,
  regex = NA,
  free = NA,
  fetch = c("values", "free", "lbound", "ubound", "all"),
  verbose = FALSE
)

Arguments

inputTarget

An object to get parameters from: could be a RAM mxModel()

regex

A regular expression to filter the labels. Default (NA) returns all labels. If vector, treated as raw labels to find.

free

A Boolean determining whether to return only free parameters.

fetch

What to return: "values" (default) or "free", "lbound", "ubound", or "all"

verbose

How much feedback to give

Details

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.

References

See Also

omxGetParameters(), parameters()

Other Reporting Functions: loadings.MxModel(), umxAPA(), umxFactorScores(), umxParameters(), umxReduce(), umx_aggregate(), umx_names(), umx_time(), umx

Examples

Run this code
# 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