First of all thank you for your hard work over the years to provide us with unique ways to combine meta-analytic principles with SEM--and providing a conduit to do this in R. My research team and I really appreciate it.
I am doing a two stage MASEM with the metaSEM package, and am having some difficulty specifying a mediation analysis in the A/Smatrix. I have four variables: w,x,y,z. And my linear equations are as follows:
X ~ W + e
Z ~ W + e
Y ~ W + X + Z + e
I would like to see if X or Z (or X and Z) mediate the relationship between W and Y.
I specified the Amatrix and Smatrix as follows:
A1 free=c(rep(FALSE,4),TRUE,rep(FALSE,3),TRUE,rep(FALSE,3),TRUE,TRUE,TRUE, rep(FALSE,1)),
labels=c("vareth",NA,NA, NA,NA,"varint","covintind", NA, NA, "covintind","varind", NA, NA, NA, NA, "residual"),
Is this the correct way to specify this mediation? I modeled it after the multivariate regression shown on (http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Regression_Matrix.html).
When I run it with tssem2(), my model fit indices are all 0, 1, or Inf.
Thank you so much for your help!