Learn R Programming

umx (version 1.9.1)

umxConfint: Get confidence intervals from an MxModel

Description

Implements confidence interval function for OpenMx models. Note: Currently requested CIs are added to existing CIs, and all are run, even if they already exist in the output. This should change in the future.

Usage

umxConfint(object, parm = c("existing", "all", "vector of names"),
  level = 0.95, run = FALSE, showErrorCodes = FALSE, ...)

Arguments

object

An mxModel, possibly already containing mxCIs that have been mxRun with intervals = TRUE))

parm

A specification of which parameters are to be given confidence intervals. Can be "existing", "all", or a vector of names.

level

The confidence level required (default = .95)

run

Whether to run the model (defaults to FALSE)

showErrorCodes

(default = FALSE)

...

Additional argument(s) for umxConfint.

Value

- mxModel

Details

Unlike confint, if parm is missing, all CIs requested will be added to the model, but (because these can take time to run) by default only CIs already computed will be reported.

CIs will be run only if run is TRUE, allowing this function to be used to add CIs without automatically having to run them. If parm is empty, and run = FALSE, a message will alert you to add run = TRUE. Even a few CIs can take too long to make running the default.

References

- http://www.github.com/tbates/umx

See Also

- confint

Other Reporting functions: RMSEA.MxModel, RMSEA.summary.mxmodel, RMSEA, extractAIC.MxModel, loadings, plot.MxModel, residuals.MxModel, umxCI_boot, umxCI, umxCompare, umxExpCov, umxExpMeans, umxFitIndices, umxPlotACEcov, umxPlotACEv, umxPlotACE, umxPlotCP, umxPlotGxE, umxPlotIP, umxSummary.MxModel, umxSummaryACEv, umxSummaryACE, umx_drop_ok, umx_standardize_RAM

Examples

Run this code
# NOT RUN {
require(umx)
data(demoOneFactor)
latents = c("G")
manifests = names(demoOneFactor)
m1 <- umxRAM("One Factor", data = mxData(cov(demoOneFactor), type = "cov", numObs = 500),
	umxPath(from = latents, to = manifests),
	umxPath(var = manifests),
	umxPath(var = latents, fixedAt = 1)
)
m2 = umxConfint(m1, "all") # default: CIs added, but user prompted to set run = TRUE
m2 = umxConfint(m2, run = TRUE) # CIs run and reported
# Add CIs for asymmetric paths in RAM model, report them, save m1 with this CI added
m1 = umxConfint(m1, parm = "G_to_x1", run = TRUE) 
# Add CIs for asymmetric paths in RAM model, report them, save m1 with mxCIs added
m1 = umxConfint(m1, parm = "A", run = TRUE)
umxConfint(m1, parm = "existing") # request existing CIs (none added yet...)
# }

Run the code above in your browser using DataLab