Last active
December 19, 2015 15:28
-
-
Save tbates/5976338 to your computer and use it in GitHub Desktop.
ez run function. Let's modify this to compute the ind/saturated model?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# umxRun now detects raw RAM, and runs sat and ind. worth speeding this bit up a bit? | |
m3 <- mxModel("independence", | |
# TODO: slightly inefficient, as this has an analytic solution | |
mxMatrix(name = "variableLoadings" , type="Diag", nrow = nVar, ncol = nVar, free=T, values = independenceStarts), | |
# labels = loadingsLabels), | |
mxAlgebra(name = "expCov", expression = variableLoadings %*% t(variableLoadings)), | |
mxMatrix(name = "expMean", type = "Full", nrow = 1, ncol = nVar, values = dataMeans, free = T, labels = meansLabels), | |
mxFIMLObjective(covariance = "expCov", means = "expMean", dimnames = manifests), | |
mxData(theData, type = "raw") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment