Hello Helpful Forum Members,

My co-authors and I have been very happy with the metaSEM R package, and we're grateful to the authors and contributors for their hard work in developing and maintaining the package.

I've been stuck for a while at a crucial part of "stage 2" of the TSSEM approach, and I'm hoping that someone here can help me make sense of it. Specifically, I'm confused about the syntax used to specify the structural model to be fit to the pooled data derived in stage 1.

I'll reference the documentation file ("metaSEM: An R Package for Meta-Analysis using Structural Equation Modeling"), which is available here: http://courses.nus.edu.sg/course/psycwlm/internet/metaSEM/metasem.pdf.

On page 26 of that file, an example of how to specify the structural model is given:

(And I hope the table structure displays properly.)

EDIT: It didn't; sorry.

R> A1

A C ES E I Alpha Beta

A "0" "0" "0" "0" "0" ".3*Alpha_A" "0"
C "0" "0" "0" "0" "0" ".3*Alpha_C" "0"

ES "0" "0" "0" "0" "0" ".3

*Alpha_ES" "0"*

E "0" "0" "0" "0" "0" "0" ".3Beta_E"

E "0" "0" "0" "0" "0" "0" ".3

I "0" "0" "0" "0" "0" "0" ".3*Beta_I"

Alpha "0" "0" "0" "0" "0" "0" "0"

Beta "0" "0" "0" "0" "0" "0" "0"

My question is about the values given for each of the loadings on the two factors (Alpha and Beta). It appears that each path is given a name ("Alpha_A"), but that it is multiplied by a decimal value. It may not be multiplication, of course, but instead something specific to the syntax. What do the numbers and asterisks mean prior to the name of the path? Is this some sort of scaling specific to the sample problem? The S matrix contains similar values in each of the parameter spots. I've just never seen this syntax before and I'm confused.

Perhaps this syntax is borrowed from a different package that used by the metaSEM package? If so, maybe someone could refer me to that package's documentation, which might more clearly explain the syntax for model specification. The explanations provided in the metaSEM documentation are sparse on this point.

I look forward to reading your responses. Thank you!

Hi David,

The Stage 2 analysis uses the RAM formulation (http://openmx.psyc.virginia.edu/docs/OpenMx/latest/Examples_Matrix.html). Three matrices are involved: A representing the asymmetric paths (regression coefficients), S representing the variances and covariances, and F representing a selection matrix.

For the Big Five example, the pooled observed variables are A C ES E I, whereas the latent variables are Alpha Beta. In the RAM formulation, the variables are arranged as A C ES E I Alpha Beta.

If you use the standard OpenMx notation, the A matrix is:

A1 <- mxMatrix("Full", nrow=7, ncol=7, values=c(rep(0,35), .3,.3,.3, rep(0,7), .3,.3, 0,0),

free=c(rep(FALSE,35), TRUE,TRUE,TRUE, rep(FALSE,7), TRUE,TRUE, FALSE,FALSE),

labels=c(rep(NA,35), "Alpha_A","Alpha_C","Alpha_ES", rep(NA,7), "Beta_E","Beta_I", NA,NA),

name="A1")

Since the structures of values, free and labels in mxMatrix are the same, I prefer to minimize the typing. I created the as.mxMatrix() function to convert a numeric/string matrix into a mxMatrix object. If the elements are numeric, e.g., 0 and 1, they represent fixed values. If it is "0.3

Alpha_C", it represents a free parameter labeled "Alpha_C" with 0.3 as the starting value. The above A1 can also be coded by:Alpha_A",".3Lambda <- matrix(c(".3

Alpha_C",".3Alpha_ES",rep(0,5),".3Beta_E",".3Beta_I"), ncol=2, nrow=5)A1 <- rbind( cbind(matrix(0,ncol=5,nrow=5), Lambda),

matrix(0, ncol=7, nrow=2) )

A1 <- as.mxMatrix(A1)

Besides the as.mxMatrix(), there are two other similar functions (create.mxMatrix() and create.Fmatrix()). Hope it helps.

Mike

Hi Mike,

Thank you very much for your detailed response. That the decimals were start values was the missing piece of the puzzle, and the syntax now makes much more sense. I think I now have enough information to successfully fit a model to our pooled correlation data.

Thanks for the help!