# 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)
)
m1 = umxRun(m1, setLabels = TRUE, setValues = TRUE)
m2 = umxModify(m1, update = "G_to_x2", name = "drop_path_2_x2")
umxCompare(m1, m2)
mxCompare(m1, m2) # what OpenMx gives by default
umxCompare(m1, m2, report = "report") # Add English-sentence descriptions
# }
# NOT RUN {
umxCompare(m1, m2, report = "html") # Open table in browser
# }
# NOT RUN {
m3 = umxModify(m2, update = "G_to_x3", name = "drop_path_2_x2_and_3")
umxCompare(m1, c(m2, m3))
umxCompare(c(m1, m2), c(m2, m3), all = TRUE)
# }
Run the code above in your browser using DataLab