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

umxGetParametersR Documentation

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("labels", "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: "labels" (default) or "values", "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: umxAPA(), umxFactorScores(), umxGetLatents(), umxGetManifests(), umxGetModel(), umxParameters(), umx_aggregate(), umx_time(), umx

Examples

## 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)

## End(Not run)


tbates/umx documentation built on March 16, 2024, 4:26 a.m.