
Last chance! 50% off unlimited learning
Sale ends in
For models to be estimated, it is essential that path values start at credible values. umxValues takes on that task for you.
umxValues can set start values for the free parameters in both RAM and Matrix mxModel
s. It can also take an mxMatrix as input.
It tries to be smart in guessing starts from the values in your data and the model type.
umxValues(obj = NA, sd = NA, n = 1, onlyTouchZeros = FALSE)
Optional Standard Deviation for start values
Optional Mean for start values
Don't alter parameters that appear to have already been started (useful for speeding umxModify
)
- mxModel
with updated start values
note: If you give umxValues a numeric input, it will use obj as the mean, and return a list of length n, with sd = sd.
- http://www.github.com/tbates/umx, https://tbates.github.io
- Core functions:
Other Advanced Model Building Functions: umxJiggle
,
umxLabel
, umxRAM2Ordinal
,
umxThresholdMatrix
,
umx_fix_first_loadings
,
umx_fix_latents
, umx
# NOT RUN {
require(umx)
data(demoOneFactor)
latents = c("G")
manifests = names(demoOneFactor)
m1 <- mxModel("One Factor", type = "RAM",
manifestVars = manifests, latentVars = latents,
mxPath(from = latents, to = manifests),
mxPath(from = manifests, arrows = 2),
mxPath(from = latents, arrows = 2, free = FALSE, values = 1.0),
mxData(cov(demoOneFactor), type = "cov", numObs = 500)
)
mxEval(S, m1) # default variances are 0
m1 = umxValues(m1)
mxEval(S, m1) # plausible variances
umx_print(mxEval(S,m1), 3, zero.print = ".") # plausible variances
umxValues(14, sd = 1, n = 10) # Return vector of length 10, with mean 14 and sd 1
# }
Run the code above in your browser using DataLab