Learn R Programming

umx (version 1.4.0)

umx_fix_latents: umx_fix_latents

Description

Fix the variance of all, or selected, exogenous latents at selected values. This function adds a variance to the factor if it does not exist.

Usage

umx_fix_latents(model, latents = NULL, exogenous.only = TRUE, at = 1)

Arguments

model
an mxModel to set
latents
(If NULL then all latentVars)
exogenous.only
only touch exogenous latents (default = TRUE)
at
(Default = 1)

Value

- mxModel

References

- http://tbates.github.io, https://github.com/tbates/umx, http://openmx.psyc.virginia.edu

See Also

Other Model Building Functions: umxDiagnose, umxLabel, umxLatent, umxMatrix, umxModify, umxPath, umxRAM2Ordinal, umxRAM, umxRun, umxThresholdMatrix, umxValues, umx_fix_first_loadings, umx

Examples

Run this code
require(umx)
data(demoOneFactor)
m1 <- mxModel("One Factor", type = "RAM",
 manifestVars = names(demoOneFactor),
 latentVars = "g",
	mxPath(from = "g", to = names(demoOneFactor)),
	mxPath(from = names(demoOneFactor), arrows = 2),
	mxData(cov(demoOneFactor), type = "cov", numObs = 500)
)
umx_show(m1, matrices = "S") # variance of g is not set
m1 = umx_fix_latents(m1)
umx_show(m1, matrices = "S") # variance of g is fixed at 1

Run the code above in your browser using DataLab