Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

umxRun

umxRun: Run an mxModel


Description

umxRun is a version of mxRun() which can run also set start values, labels, and run multiple times It can also calculate the saturated and independence likelihoods necessary for most fit indices. Note this is not needed for umxRAM models or twin models - it is just a convenience to get base OpenMx models to run.

Usage

umxRun(
  model,
  tryHard = c("yes", "no", "ordinal", "search"),
  calc_sat = TRUE,
  setValues = FALSE,
  setLabels = FALSE,
  intervals = FALSE,
  optimizer = NULL,
  comparison = NULL
)

Arguments

model

The mxModel() you wish to run.

tryHard

How to tryHard. Default = "yes". Alternatives "no", "ordinal", "search"

calc_sat

Whether to calculate the saturated and independence models (for raw mxData() mxModel()s)

setValues

Whether to set the starting values of free parameters (default = FALSE)

setLabels

Whether to set the labels (default = FALSE)

intervals

Whether to run mxCI confidence intervals (default = FALSE) intervals = FALSE

optimizer

optional to set the optimizer.

comparison

Comparison model (will be used to drive umxCompare() after umxRun

Value

References

See Also

Other Advanced Model Building Functions: umxAlgebra(), umxFixAll(), umxJiggle(), umxThresholdMatrix(), umxUnexplainedCausalNexus(), umx, xmuLabel(), xmuValues()

Examples

require(umx)
data(demoOneFactor)
latents  = c("G")
manifests = names(demoOneFactor)
m1 = mxModel("fact", type="RAM", manifestVars=manifests, latentVars=latents,
	mxPath(latents  , to = manifests),
	mxPath(manifests, arrows = 2),
	mxPath(latents  , arrows = 2, free = FALSE, values = 1),
	mxData(cov(demoOneFactor), type = "cov", numObs=500)
)

m1 = umxRun(m1) # just run: will create saturated model if needed
## Not run: 
m1 = umxRun(m1, setValues = TRUE, setLabels = TRUE) # set start values and label all parameters
umxSummary(m1, std = TRUE)
m1 = mxModel(m1, mxCI("G_to_x1")) # add one CI
m1 = mxRun(m1, intervals = TRUE)
residuals(m1, run = TRUE) # get CIs on all free parameters
confint(m1) # OpenMx's SE-based CIs
umxConfint(m1, run = TRUE) # get likelihood-based CIs on all free parameters
m1 = umxRun(m1, n = 10) # re-run up to 10 times if not green on first run

## End(Not run)

umx

Structural Equation Modeling and Twin Modeling in R

v4.10.10
GPL-3
Authors
Timothy C. Bates [aut, cre] (<https://orcid.org/0000-0002-1153-9007>), Gillespie Nathan [wit], Michael Zakharin [wit], Brenton Wiernik [ctb], Joshua N. Pritikin [ctb], Michael C. Neale [ctb], Hermine Maes [ctb]
Initial release
2021-11-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.