Learn R Programming

umx (version 4.20.0)

umxConfint: Get confidence intervals from a umx model

Description

Implements confidence interval function for umx models.

Usage

umxConfint(
  object,
  parm = c("existing", "all", "or one or more labels", "smart"),
  wipeExistingRequests = TRUE,
  level = 0.95,
  run = FALSE,
  showErrorCodes = FALSE,
  optimizer = c("SLSQP", "NPSOL", "CSOLNP", "current")
)

Value

  • mxModel()

Arguments

object

An mxModel(), possibly already containing mxCI()s that have been mxRun() with intervals = TRUE))

parm

Which parameters to get confidence intervals for. Can be "existing", "all", or one or more parameter names.

wipeExistingRequests

Whether to remove existing CIs when adding new ones (ignored if parm = 'existing').

level

The confidence level required (default = .95)

run

Whether to run the model (defaults to FALSE)

showErrorCodes

(default = FALSE)

optimizer

For difficult CIs, trying other optimizers can help!

Details

Note: By default, requesting new CIs wipes the existing ones. To keep these, set wipeExistingRequests = FALSE.

Because CIs can take time to run, by default only already-computed CIs will be reported. To run new CIs, set run = TRUE .

Note: confint() is an OpenMx function which will return SE-based CIs.

If parm is empty, and run = FALSE, a message will alert you to set run = TRUE.

References

See Also

Other Reporting functions: RMSEA.MxModel(), RMSEA.summary.mxmodel(), RMSEA(), extractAIC.MxModel(), loadings.MxModel(), loadings(), residuals.MxModel(), tmx_show.MxMatrix(), tmx_show(), umxCI_boot(), umxCI(), umxExpCov(), umxExpMeans(), umxFitIndices(), umxRotate()

Examples

Run this code
if (FALSE) {
require(umx)
data(demoOneFactor)

manifests = names(demoOneFactor)
m1 = umxRAM("OneFactor", data = demoOneFactor, type = "cov",
	umxPath(from = "G", to = manifests),
	umxPath(var = manifests),
	umxPath(var = "G", fixedAt = 1)
)

m1 = umxConfint(m1, run = TRUE) # There are no existing CI requests...

# Add a CI request for "G_to_x1", run, and report. Save with this CI computed
m2 = umxConfint(m1, parm = "G_to_x1", run = TRUE) 

# Just print out any existing CIs
umxConfint(m2)

# CI requests added for free matrix parameters. User prompted to set run = TRUE
m3 = umxConfint(m1, "all")

# Run the requested CIs
m3 = umxConfint(m3, run = TRUE) 

# Run CIs for free one-headed (asymmetric) paths in RAM model. 
#   note: Deletes other existing requests,
tmp = umxConfint(m1, parm = "A", run = TRUE)

# Wipe existing CIs, add G_to_x1
tmp = umxConfint(m1, parm = "G_to_x1", run = TRUE, wipeExistingRequests = TRUE) 

# For some twin models, a "smart" mode is implemented
# note: only implemented for umxCP so far
m2 =  umxConfint(m1, "smart")
}

Run the code above in your browser using DataLab