Skip to content

Instantly share code, notes, and snippets.

@tbates
Last active September 8, 2017 13:44
Show Gist options
  • Save tbates/c6435e3e20ed7ae347a439d8b9bcbec3 to your computer and use it in GitHub Desktop.
Save tbates/c6435e3e20ed7ae347a439d8b9bcbec3 to your computer and use it in GitHub Desktop.
data(demoOneFactor)
manifests <- names(demoOneFactor)
latents <- c("G1", "G2")
fit2 <- mxRun(mxModel("Two Factor", type="RAM",
manifestVars = manifests, latentVars = latents,
mxPath(from = latents[1], to=manifests[1:3]),
mxPath(from = latents[2], to=manifests[4:5]),
mxPath(from = manifests, arrows = 2),
mxPath(from = latents, arrows = 2, free = FALSE, values = 1.0),
mxPath(from = "one", to = latents, values = 0, free= FALSE),
mxData(demoOneFactor, type = "raw")
))
# code Reds under CSOLNP as of
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment