# Import external correlation matrix and sample size to run (MA)SEM in Stata

I want to run a meta-analytic structural equation model (MASEM) in Stata. I already have the meta-analytic mean correlation matrix and the sample size for each correlation. Now I want to import this correlation matrix and the sample sizes in Stata and afterwards I want to use the SEM builder to run a MASEM.

My correlation matrix looks like:

       var1    var2    var3  var4
var2   0.2
var3   0.12    -0.9
var4  -0.03     0.3  -0.02
var5   0.02   -0.05    0.8  -0.04


The sample size for each correlation is:

       var1    var2    var3  var4
var2   82
var3   77      122
var4   27       77      23
var5   14       89      44    23


How can I import these two matrices in Stata? And how can I afterwards use them to run a SEM?

• I know that this is possible in LISREL. Thus I think it's possible in Stata as well... Dec 6, 2015 at 15:15

I would not recommend doing this in neither Stata nor other SEM packages. There are a couple of problems in using the so-called meta-analytically derived mean correlation matrix to fit structural equation models. The followings are some of them:

1) It treats the mean correlation matrix as if it was an observed covariance matrix.

2) It does not take the precision of the mean correlation matrix (sampling covariance matrix of the correlation matrix) into account in fitting the structural equation models.

3) If an average, e.g., harmonic mean, of the sample sizes is used as the sample size in fitting structural equation models, the precision of some elements are overestimated whereas others are underestimated. It is hard to tell whether the test statistics and the standard errors are correct.

One statistically defensible approach is the two-stage structural equation modeling (TSSEM; Cheung, 2014, 2015a, 2015b; Cheung & Chan, 2005, 2009). It uses SEM to estimate a pooled correlation/covariance matrix based on either a fixed- or a random-effects model. The pooled correlation matrix is then used to fit structural equation models by using the inverse of the sampling covariance matrix of the correlation matrix as the weight matrix. It is implemented in the metaSEM package in the R statistical environment. Here are some examples in MASEM.

## References

Cheung, M. W.-L. (2014). Fixed- and random-effects meta-analytic structural equation modeling: Examples and analyses in R. Behavior Research Methods, 46(1), 29–40. http://doi.org/10.3758/s13428-013-0361-y

Cheung, M. W.-L. (2015a). Meta-analysis: A structural equation modeling approach. Chichester, West Sussex: John Wiley & Sons, Inc.

Cheung, M. W.-L. (2015b). metaSEM: an R package for meta-analysis using structural equation modeling. Frontiers in Psychology, 5(1521). http://doi.org/10.3389/fpsyg.2014.01521

Cheung, M. W.-L., & Chan, W. (2005). Meta-analytic structural equation modeling: A two-stage approach. Psychological Methods, 10(1), 40–64. http://doi.org/10.1037/1082-989X.10.1.40

Cheung, M. W.-L., & Chan, W. (2009). A two-stage approach to synthesizing covariance matrices in meta-analytic structural equation modeling. Structural Equation Modeling: A Multidisciplinary Journal, 16(1), 28–53. http://doi.org/10.1080/10705510802561295