metaSEM
http://openmx.psyc.virginia.edu/taxonomy/term/44/0
enThis forum is about the metaSEM package for meta-analysis
http://openmx.psyc.virginia.edu/thread/2946
<p><a href="http://courses.nus.edu.sg/course/psycwlm/internet">Mike Cheung's</a> metaSEM package is introduced <a href="http://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM">here</a></p>
<p>Post questions to this forum</p>
http://openmx.psyc.virginia.edu/thread/2946#commentsmetaSEMSat, 26 Apr 2014 21:26:16 +0000tbates2946 at http://openmx.psyc.virginia.eduThree-level meta-analysis for multiple effect sizes in several studies
http://openmx.psyc.virginia.edu/thread/3975
<p>Hi all,</p>
<p>I want to conduct a meta-analysis with multiple effect sizes in several studies. I have used the three-level approach (see for example: Van den Noortgate, W., López-López, J. A., Marín-Martínez, F., & Sánchez-Meca, J. (2013). Three-level meta-analysis of dependent effect sizes. Behavior research methods, 45(2), 576-594.) In my case, there are three different types of variances: sampling variance, variance between the effect sizes of one study (level 2 variance), and variance between the effect sizes across studies (level 3 variance). Tau2_2 is the level 2 variance and Tau3_2 is the level 3 variance, is this correct? And what is the sampling variance?<br />
Furthermore, I understood that I can compare the three-level model with a two-level model by fixing the level three variance to zero ('RE3.constraints=0'). I was wondering if this is also correct in my case. According to Van den Noortgate, when I would use a two-level meta-analysis I would have only sampling variance and variance between the effect sizes across studies, so no variance between the effect sizes of one study. Therefore, I was thinking that I should fix the second level variance to zero ('RE2.constraints=0') if I want to compare the three-level model with the original two-level method. Is this correct?<br />
My last question: could I also use the standard error in the syntax for the three-level meta-analysis instead of the variance? </p>
<p>Thanks in advance!</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/meta-analysis syntax and output.txt">meta-analysis syntax and output.txt</a></td><td>1.77 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3975#commentsmetaSEMThu, 16 Apr 2015 07:45:08 +0000cboterman3975 at http://openmx.psyc.virginia.edumetaSEM installation problem
http://openmx.psyc.virginia.edu/thread/3974
<p>Hello, </p>
<p>I'm having problems when trying to install the metaSEM package. I'm a Mac user and I have the R 3.1.3 (Mavericks build) version. After having installed all packages required for metaSEM (OpenMx, MASS and ellipse), when trying to install the package directly, here's what I get : </p>
<p>install.packages("metaSEM")<br />
Warning message:<br />
package 'metaSEM' is not available (as a binary package for R version 3.1.3) </p>
<p>If, on the other hand, I follow Mike Cheung's instructions on his website (<a href="https://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM/?#help" title="https://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM/?#help">https://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM/?#help</a>), and I download the source package of metaSEM first, and try to install it from R, here's the output :</p>
<p>install.packages(pkgs="/Users/wswiatko/Google Drive/R/metaSEM/metaSEM_0.9-2.tar.gz", repos=NULL, type="source")<br />
During startup - Warning messages:<br />
1: Setting LC_CTYPE failed, using "C"<br />
2: Setting LC_TIME failed, using "C"<br />
3: Setting LC_MESSAGES failed, using "C"<br />
4: Setting LC_MONETARY failed, using "C"<br />
Warning: invalid package '/Users/wswiatko/Google Drive/R/metaSEM/metaSEM_0.9-2.tar.gz'<br />
Error: ERROR: no packages specified<br />
Warning message:<br />
In install.packages(pkgs = "/Users/wswiatko/Google Drive/R/metaSEM/metaSEM_0.9-2.tar.gz", :<br />
installation of package '/Users/wswiatko/Google Drive/R/metaSEM/metaSEM_0.9-2.tar.gz' had non-zero exit status</p>
<p>Could anyone help please ?<br />
Wojtek</p>
http://openmx.psyc.virginia.edu/thread/3974#commentsmetaSEMThu, 09 Apr 2015 09:00:33 +0000Wojtek3974 at http://openmx.psyc.virginia.eduPET-PEESE and metaSEM
http://openmx.psyc.virginia.edu/thread/3973
<p>I'm currently conducting a meta-analysis for which I have many dependent effect sizes (multiple correlations I want to use, nested within the same sample), so the metaSEM package seemed like an obvious choice for how to analyze these data. However, I also want to take advantage of Stanley & Doucouliagos's (2014) PET-PEESE method of estimating a meta-analytic effect free of publication bias. In a nutshell (for those not familiar), PET-PEESE is a meta-regression model in which effect sizes are regressed onto either their standard errors (PET) or their variances (PEESE), depending on whether or not the PET estimate is significantly different than zero. The intercept of either model is interpreted as the estimated meta-analytic effect when small study effects (i.e., either SE or Var), such as publication bias, are zero.</p>
<p>Although I have no problem specifying either meta-regression model in metaSEM, Stanley & Doucouliagos (2014) seem to be very against random-effects models. From their article:<br />
"In our simulations, excess unexplained heterogeneity is always included; thus, by conventional practice, REE [random-effects estimators] should be preferred over FEE [fixed-effect estimators]. However, conventional practice is wrong when there is publication selection. With selection for statistical significance, REE is always more biased than FEE...This predictable inferiority is due to the fact that REE is itself a weighted average of the simple mean, which has the largest publication bias, and FEE" (p. 69)</p>
<p>My dilemma is that I am not sure how to appropriate incorporate PET-PEESE estimation, when my multilevel approach with metaSEM would appear to demand a random-effects method of estimation. </p>
<p>One creative (?) option that I have been considering is attempting to do a modified bootstrap for my meta-analysis, through which only one effect size per article-based-sample (e.g., only the first of three correlations) would be available to be resampled within any given bootstrapped sample (e.g., the 10th bootstrap sample). For subsequent bootstrapped samples (e.g., the 150th), a different effect size might be selected from within a sample (e.g., the third of three correlations) to be available for resampling. I would run a fixed-effect PET model for each bootstrapped sample, and then construct a 95% CI around those fixed-effect estimates of the intercept, and then repeat the process with the PEESE covariate, if it was determined that I should be using PEESE instead.</p>
<p>Does this approach seem reasonable? Would there be a better way of integrating PET-PEESE with metaSEM? I realize there may not be a simple solution or answer to this inquiry, but I'd appreciate any prods I could get in promising directions.</p>
<p>Thanks! </p>
<p>-John</p>
http://openmx.psyc.virginia.edu/thread/3973#commentsmetaSEMMon, 06 Apr 2015 21:17:32 +0000jsakaluk3973 at http://openmx.psyc.virginia.eduErrors when including covariates in metaSEM
http://openmx.psyc.virginia.edu/thread/3963
<p>I have been attempting to add covariates to a network meta-analytic model that I'm fitting in metaSEM. As a brief bit of background, the network meta-analytic model is designed to model comparisons between a reference group and a set of other groups. Each comparison between the reference and other groups is modeled as a separate outcome. The S matrix in these models is often quite sparse because it is often the case that only ~half the studies contain multi-group designs, so one often needs to place constraints (e.g., with RE.constraints in metaSEM) on the between-studies covariance matrix for the model to be identifiable.</p>
<p>I am able to fit the model with a covariate using the mvmeta package in R, and I have verified that there is variance in my covariate for each of the outcomes (i.e., comparisons between reference and other groups) in the meta-analysis. However, when I attempt to fit the model with the single covariate in metaSEM, I receive the following error:</p>
<p>Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :<br />
0 (non-NA) cases</p>
<p>Does anybody have any idea what's happening here? For reference, I have tried fitting the covariate model on subsets of the data (i.e., using only one of the 11 outcomes from the meta-analysis) without generating these errors. My data and a script are attached.</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Data for metaSEM forum_0.csv">Data for metaSEM forum.csv</a></td><td>134.09 KB</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Code for metaSEM forum.R">Code for metaSEM forum.R</a></td><td>2.06 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3963#commentsmetaSEMTue, 10 Mar 2015 15:59:51 +0000forscher3963 at http://openmx.psyc.virginia.eduNot positive definite error when all within-studies covariance matrices are positive definite
http://openmx.psyc.virginia.edu/thread/3962
<p>Hi Mike (and the rest of the forum),</p>
<p>Thanks so much for maintaining your metaSEM package!</p>
<p>I have been trying to fit a variation of a network meta-analysis model using your package. In particular, I need to impose specific constraints on the estimated between-studies covariance matrix. However, my question is not about the constraints that I'm imposing, but rather about a not positive definite error that I haven't been able to figure out.</p>
<p>If you read in the attached data and use the check_pd() function to test whether the within-studies covariance matrices are positive definite, you will see that they all are. However, when I attempt to run my model using meta(), I get the following error:</p>
<p>"The job for model 'Meta analysis with ML' exited abnormally with the error message: MxComputeGradientDescent: fitfunction Meta analysis with ML.fitfunction is not finite (Expected covariance matrix for continuous variables is not positive-definite in data row 32)"</p>
<p>What's odd is that I've fit a similar model using the mvmeta package (without the constraints on the between-studies covariance matrix that I want -- this isn't possible in mvmeta) without any errors. So, I'm forced to conclude that either I've mis-specified my model using meta() or that something strange is occurring within meta() or mxRun().</p>
<p>Do you have any suggestions for what might be happening?</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Data for metaSEM forum.csv">Data for metaSEM forum.csv</a></td><td>25.79 KB</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Script for metaSEM forum 03 06 15.R">Script for metaSEM forum 03 06 15.R</a></td><td>1.87 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3962#commentsmetaSEMSat, 07 Mar 2015 03:52:25 +0000forscher3962 at http://openmx.psyc.virginia.eduDifferent results with tssem2 and wls function
http://openmx.psyc.virginia.edu/thread/3944
<p>Dear all,</p>
<p> I read in previous forum that it was possible to apply tssem2 over a given pooled correlation matrix with the function wls(), as it is a wrapper of tssem2. </p>
<p> I have found some inconsistent results when using wls() fuction, so I tried to take the pooled correlation matrix obtained by applying a random effect model with the function tssem1, and then analyze it with wls function to check it those results are the same to those obtained by applying tssem2 directly. With those two procedures I obtained differente results, even though they are suppose to be same.</p>
<p> I guess that one possible explanation is that in tssem 1 the sample covariance matrix takes into account the diferential precision of each correlation, and that in wls(), because the asymtotic covariance matrix is calculated over the pooled matrix with the sum of the sample, it does not take into account the diferential sampling variation of each correlation...am I right? Then, should I interpret the results of both procedures (tssem2 and wls) in a different way? I mean, when I am using wls: am I taking into account the diferential variability of each correlation? I calculated the sampling covariance matrix with the function asyCov. I will really appreciate any comment or answer to this question!! </p>
<p> Finally, I would like to thank Mike Cheung for the amazing metaSEM package!</p>
<p>Thank you vey much in advance and kind regards.</p>
http://openmx.psyc.virginia.edu/thread/3944#commentsmetaSEMSat, 24 Jan 2015 11:34:32 +0000Daniel883944 at http://openmx.psyc.virginia.eduStage 1: cluster
http://openmx.psyc.virginia.edu/thread/3936
<p>Dear Mike,</p>
<p> I am sorry for bothering you again...but I have another question!</p>
<p> In the document attached (DATOS1.dat) I have six matrices. I did a cluster analysis in order to find some moderators (commands are attached in Fixed-cluster.R), dividing the data in two blocks : the first and second matrices are in one block, and the other four matrices in another. When I execute the first stage, it turned out that the second block (the fourth last matrices) are homogeneous (Chi-square=28.9735, df=26, p=.3123). Until here, everything seems correct.</p>
<p> After that, I tried to carried out a fixed-effect model with only the four matrices (commands are attached in Fixed-effects(4).R) that were homogeneous in the previous analysis (you can find these matrices in CLUSTER.dat). The results from the first stage are not what I expected (Chi-square=60.2163, df=26, p<.01). Now, those four matrices do not seem to be homogeneus as we reject the null hypothesis. Why is this happening? Does it have something to do with the way I encode the missing variables?</p>
<p> And this is not all. I did the same analysis in LISREL (sintaxisLISREL.txt, I could not attach the .cfg file) with the four homogeneous matrices and the chi-square is almost the double (175.387), and the null hyphotesis is also rejected.</p>
<p> I guess that I'm doing some wrong...but I cant find what. Once again, thank you very much for your attention and the time you spend in this forum answering all our doubts! </p>
<p>King Regards,</p>
<p>Belén</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/DATOS1.dat">DATOS1.dat</a></td><td>633 bytes</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/CLUSTER.dat">CLUSTER.dat</a></td><td>415 bytes</td> </tr>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/sintaxisLISREL.txt">sintaxisLISREL.txt</a></td><td>2 KB</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Fixed-Cluster.R">Fixed-Cluster.R</a></td><td>1.93 KB</td> </tr>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Fixed-effect(4).R">Fixed-effect(4).R</a></td><td>709 bytes</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3936#commentsmetaSEMWed, 26 Nov 2014 16:05:17 +0000Bfcastilla3936 at http://openmx.psyc.virginia.eduFitting 2 stage random effects (with indirect effects)
http://openmx.psyc.virginia.edu/thread/3930
<p>Dear Mike,</p>
<p> I am having some problems when fitting a path model in the second stage (Random Effects Model) which includes some indirect effects. In the documents attached you can find the data (.dat), the commands I used (.R) and the path model I would like to fit (.png).</p>
<p> The error that appears is the next one:</p>
<p>Error in `$<-.data.frame`(`*tmp*`, "Std.Error", value = NA) :<br />
replacement has 1 row, data has 0<br />
In addition: Warning messages:<br />
1: In pchisq(tT, df = dfT, lower.tail = FALSE) : NaNs produced<br />
2: In sqrt(max((tT - dfT)/(n - 1), 0)/dfT) : NaNs produced<br />
Warning message:<br />
In model 'TSSEM2 random effects model' NPSOL returned a non-zero status code 1. The final iterate satisfies the optimality conditions to the accuracy requested, but the sequence of iterates has not yet converged. NPSOL was terminated because no further improvement could be made in the merit function (Mx status GREEN). </p>
<p>Thanks in advance,</p>
<p>Belén.</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/DATOS22.dat">DATOS22.dat</a></td><td>635 bytes</td> </tr>
<tr class="even"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Path model.png">Path model.png</a></td><td>12.39 KB</td> </tr>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/CommandR.R">CommandR.R</a></td><td>1.16 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3930#commentsmetaSEMMon, 10 Nov 2014 16:29:13 +0000Bfcastilla3930 at http://openmx.psyc.virginia.eduUsing Mixed-effects model in TSSEM for moderation analysis
http://openmx.psyc.virginia.edu/thread/3929
<p>Hi Mike,</p>
<p>I am using random-effects MASEM and I would like to include a binary characteristic of the studies in my analysis. Based on your recent paper (Cheung, 2014), I know that mixed-effects model can be used to include study characteristics as the predictors in a MASEM model. However, I was wondering how I can do this using metaSEM codes. I could not find any metaSEM code example in your papers/website that explain how I should code and indicate the study characteristics in tssem1() and tssem2() functions in metaSEM.</p>
<p>Your help would be very much appreciated,</p>
<p>Thank you,<br />
-- Hamed</p>
<p>Cheung, M. W.-L. 2014. "Fixed- and Random-Effects Meta-Analytic Structural Equation Modeling: Examples and Analyses in R," Behavior Research Methods (46:1), pp. 29-40.</p>
http://openmx.psyc.virginia.edu/thread/3929#commentsmetaSEMSat, 08 Nov 2014 02:18:49 +0000HAMED3929 at http://openmx.psyc.virginia.eduInstalling metaSEM
http://openmx.psyc.virginia.edu/thread/3897
<p>Dear Mike,</p>
<p> I'm having some problems for installing metaSEM package...This error always appears, and I cannot find the solution:</p>
<p>install.packages("metaSEM")<br />
Installing package into ‘D:/Documents/R/win-library/3.0’<br />
(as ‘lib’ is unspecified)<br />
Warning in install.packages :<br />
package ‘metaSEM’ is not available (for R version 3.0.2)</p>
<p>Where could I find a new version of the package?</p>
<p>Thanks in advantage,</p>
<p>Kind regards.</p>
http://openmx.psyc.virginia.edu/thread/3897#commentsmetaSEMThu, 11 Sep 2014 17:27:57 +0000Bfcastilla3897 at http://openmx.psyc.virginia.eduEquality Constraints
http://openmx.psyc.virginia.edu/thread/3606
<p>Hi Mike,</p>
<p>In my stage two analysis I would like to impose equality constraints on some items' error variances in the S matrix to be consistent with the models from the original studies. </p>
<p>I wonder whether this is feasible at all, because here (<a href="http://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM/masem.html" title="http://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM/masem.html">http://courses.nus.edu.sg/course/psycwlm/Internet/metaSEM/masem.html</a>) you wrote "Since we are conducting a correlation structure analysis, the error variances are not free parameters."</p>
<p>If it is possible, could you please provide a syntax example how to implement the equality constraints? </p>
<p>Many thanks for your help!<br />
Johannes</p>
http://openmx.psyc.virginia.edu/thread/3606#commentsmetaSEMThu, 03 Jul 2014 11:41:19 +0000jbauer3606 at http://openmx.psyc.virginia.eduBayesian MASEM
http://openmx.psyc.virginia.edu/thread/3439
<p>Dear Mike</p>
<p> I remembered you mentioned about Bayesian approach to MASEM in discussion part of your article.<br />
I think this topic is very intriguing to me and to unknown others. Could you detail more about the issue here?<br />
If you don't mine, I hope you to recommend some direct reference on this issue.<br />
Personally I ask questions as follows,<br />
what might be advantages of Bayesian approach in comparison to TSSEM or GLS?<br />
In Bayesian, is WLS replaced by Bayesian process? or just modified by it? or other than the replacement?<br />
Can I understand Bayesian approach into MASEM on the basis of typical Bayesian SEM?<br />
What might be difference that should be borne in mind?</p>
<p> Sorry for being too discursive.<br />
Excuse me, I just want to know more about Bayesian MASEM particularly.<br />
and I consider it as a worthy question hopefully.<br />
I look forward to your response. </p>
http://openmx.psyc.virginia.edu/thread/3439#commentsmetaSEMWed, 25 Jun 2014 15:08:33 +0000James Lee3439 at http://openmx.psyc.virginia.edutssem2 over a given pooled correlation matrix
http://openmx.psyc.virginia.edu/thread/3410
<p>Hi again Mike, </p>
<p>I was wondering if this is possible:<br />
Having the pooled correlation matrix and their standard errors, do you have any way to apply directly the second stage of tssem over that data? Any help would be very much appreciated. </p>
<p>Thanks a lot, </p>
<p>Laura</p>
http://openmx.psyc.virginia.edu/thread/3410#commentsmetaSEMWed, 25 Jun 2014 00:07:25 +00003410 at http://openmx.psyc.virginia.eduNot positive definite matrix
http://openmx.psyc.virginia.edu/thread/3409
<p>Hi Mike,</p>
<p>I'm making a lot of progress with the package but I still have some questions.<br />
When I try to run the tssem1 I get some non-positive definite matrix.<br />
I think it is because the determinant is lower than 0. Do you have implemented partial least square or ridge to resolve this problem?</p>
<p>Thank you in advantage,</p>
<p>Laura</p>
http://openmx.psyc.virginia.edu/thread/3409#commentsmetaSEMTue, 24 Jun 2014 23:58:16 +00003409 at http://openmx.psyc.virginia.edu