if (FALSE) {
require(umx)
data(demoOneFactor)
manifests = names(demoOneFactor)
m1 = umxRAM("One Factor", data = demoOneFactor, type = "cov",
umxPath("G", to = manifests),
umxPath(var = manifests),
umxPath(var = "G", fixedAt = 1.0)
)
# ===================================
# = Show the residuals of the model =
# ===================================
residuals(m1)
# | |x1 |x2 |x3 |x4 |x5 |
# |:--|:----|:-----|:----|:-----|:--|
# |x1 |. |. |0.01 |. |. |
# |x2 |. |. |0.01 |-0.01 |. |
# |x3 |0.01 |0.01 |. |. |. |
# |x4 |. |-0.01 |. |. |. |
# |x5 |. |. |. |. |. |
# [1] "nb: You can zoom in on bad values with, e.g. suppress = .01, which
# will hide values smaller than this. Use digits = to round"
residuals(m1, digits = 3)
residuals(m1, digits = 3, suppress = .005)
# residuals are returned as an invisible object you can capture in a variable
a = residuals(m1); a
}
Run the code above in your browser using DataLab