Skip to content

Instantly share code, notes, and snippets.

@tbates
Last active April 16, 2017 15:38
Show Gist options
  • Save tbates/c57767354c9bc1584f683f3c74342e24 to your computer and use it in GitHub Desktop.
Save tbates/c57767354c9bc1584f683f3c74342e24 to your computer and use it in GitHub Desktop.
This is an EFA-style model, which is not identified.
library("umx")
con <- url("https://www.dropbox.com/s/r9e3om73viquzfq/disc.rda?raw=1")
print(load(con)); close(con)
manifests = c("q1", "q2", "q3", "q4", "q5", "q6", "q7")
latents <- c("F1", "F2") # 2 factors
m1 <- mxModel("twoFactors", type="RAM", manifestVars = manifests, latentVars = latents,
mxPath("F1", to = manifests),
mxPath("F2", to = manifests),
mxPath(latents, arrows = 2, free = FALSE, values = 1),
mxPath(manifests, arrows = 2),
mxData(disc[, manifests]), type="raw")
)
m1 <- mxRun(m1)
mxCheckIdentification(m1) # Not identified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment