I was wondering if there is an easy way to tell OpenMx to estimate all of the correlations among a set of exogenous variables, rather than specifying each of the correlations line-by-line in mxPath statements.
For example, suppose exogenous variables are:
I tried to automate a way to include the exogenous correlations for an arbitrary number of variables as:
for(i in 1:dim(These.Pairs))
"mxPath(from=COREREL, to=JOBPAY, arrows=2, free=TRUE),"
"mxPath(from=COREREL, to=SEX_2, arrows=2, free=TRUE),"
"mxPath(from=JOBPAY, to=SEX_2, arrows=2, free=TRUE),"
The structure of the mxPath statements is correct, but I've not been able to appropriately "feed" OpenMx the information contained in "Here." I'm guessing there is an easier way to do this or a way to get OpenMx to understand the "Here" object. Any thoughts would be appreciated.