# NOT RUN {
myVars <- c("mpg", "disp", "hp", "wt", "qsec")
m1 = umxEFA(mtcars[, myVars], factors = 2, rotation = "promax")
loadings(m1)
# Formula interface in base-R factanal
m2 = factanal(~ mpg + disp + hp + wt + qsec, factors = 2, rotation = "promax", data = mtcars)
loadings(m2)
# Formula interface in umxEFA
m2 = factanal(~ mpg + disp + hp + wt + qsec, factors = 2, rotation = "promax", data = mtcars)
loadings(m2)
# Return a loadings object
x = umxEFA(mtcars[, myVars], factors = 2, return = "loadings")
names(x)
m1 = umxEFA(myVars, factors = 2, data = mtcars, rotation = "promax")
m1 = umxEFA(name = "named", factors = "g", data = mtcars[, myVars])
m1 = umxEFA(name = "by_number", factors = 2, rotation = "promax", data = mtcars[, myVars])
x = umxEFA(name = "score", factors = "g", data = mtcars[, myVars], scores= "Regression")
# }
Run the code above in your browser using DataLab