Attachment | Size |
---|---|

SEMComputedR.pdf [6] | 15.98 KB |

SEMComputedS.pdf [7] | 16.13 KB |

I'm slowly converting to OpenMX because of its fiml capabilities. I recently built two models that are shown in the enclosed attachments. You will notice that the correlation between T and P is identical in both models (whether S or D is used). However, when I try to replicate these results in OpenMX, I don't get identical results; they're usually about .04 different, which is quite significant for what I'm doing.

Here's my openMX code:

sem.model.S = mxModel("Two Factor Model Path Specification",

type="RAM",

dd,

manifestVars = names(data),

latentVars = c("T", "P"),

#### residual variances of observed

mxPath(

from=names(data)[-4],

arrows=2,

free=c(FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE),

values=1,

labels=c("z1","z2","z3",paste("e", 1:6, sep=""))

),

# exogenous variances and covariance

mxPath(

from=c("S", "P", "T"),

arrows=2,

all=TRUE,

free=c(TRUE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE),

values=rep(1, times=9),

labels=c("varS", "cov1", "cov2",

"cov1", "varP", "cov3",

"cov2", "cov3", "varT")

),

# factor loadings for x variables

mxPath(

from="T",

to=c("X1","X2","X3"),

arrows=1,

free=c(TRUE,TRUE,TRUE),

values=c(1,1,1),

labels=c("l1","l2","l3")

),

#factor loadings for y variables

mxPath(

from="P",

to=c("Y1","Y2","Y3"),

arrows=1,

free=c(TRUE,TRUE,TRUE),

values=c(1,1,1),

labels=c("l4","l5","l6")

),

##### loadings for S

mxPath(

from=names(data)[1:3],

to=c("S"),

arrows=1,

free=TRUE,

values=c(1,1,1),

labels=c("z1l", "z2l", "z3l")

),

#means

mxPath(

from="one",

to=c("Interview", "Personality", "IQ", "X1","X2","X3","Y1","Y2","Y3","S","T","P"),

arrows=1,

free=c(rep(TRUE, times=10), FALSE, FALSE),

values=c(rep(1, times=10), 0, 0),

labels=c("meanInt", "meanPers", "meanIQ","meanx1","meanx2","meanx3",

"meany1","meany2","meany3","meanS",NA, NA)

)

)

The other model is nearly identical, except I replace "S" with "D"....could it be because I'm estimating means now when before I was using a correlation matrix? S and D are on different scales, but I wouldn't think it would matter that much.

Thanks!