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.eduDeriving Standard Errors from indirectEffect command
http://openmx.psyc.virginia.edu/thread/4018
<p>I am trying to derive a standard error for standardized indirect effects but am unclear how to find their standard errors using the output below. Is there a way to calculate the SE from the information below? </p>
<p>x <- matrix(c(1, -0.07, -0.23, -0.07, 1, 0.35, -0.23, 0.35, 1), ncol=3)<br />
dimnames(x) <- list( c("y", "m", "x"), c("y", "m", "x") )<br />
indirectEffect(x, n=81, standardized = TRUE )</p>
<p> ind_eff dir_eff ind_var ind_dir_cov dir_var<br />
0.004183934 -0.233958668 0.001647318 -0.001544046 0.012616131 </p>
http://openmx.psyc.virginia.edu/thread/4018#commentsmetaSEMTue, 14 Jul 2015 20:30:02 +0000cla18@humboldt.edu4018 at http://openmx.psyc.virginia.eduDetermining R2 based on TSSEM Outputs in metaSEM
http://openmx.psyc.virginia.edu/thread/3988
<p>Greetings,</p>
<p>I have run a random-effects TSSEM (tssem2()) in metaSEM and received the estimated path loadings and correlations among factors in the output for my structural model. I also need to find the R2 values for my endogenous variables in my structural model. I was wondering how I can determine R2 values. I think they should be calculated as 1-var of the endogenous variables found in impliedS1 matrix in mx.fit component of the tssem2() output:</p>
<p>random2<-tssem2(...)<br />
random2$mx.fit$impliedS1</p>
<p> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]<br />
[1,] 1.00000000 -0.2124499 -0.37657180 -0.1408749 0.1566710 0.03624335 -0.16619094 -0.06419929<br />
[2,] -0.21244990 0.4783484 0.57574642 0.4799511 0.5499434 0.44504316 0.53299814 0.14718394<br />
[3,] -0.37657180 0.5757464 0.77637611 0.5277954 0.6590216 0.60979639 0.56536845 0.04923937<br />
[4,] -0.14087491 0.4799511 0.52779536 0.5113916 0.5535190 0.40219453 0.58033105 0.22417971<br />
[5,] 0.15667096 0.5499434 0.65902158 0.5535190 1.0000000 0.46021062 0.56435678 -0.10231421<br />
[6,] 0.03624335 0.4450432 0.60979639 0.4021945 0.4602106 1.00000000 0.45487242 0.20794375<br />
[7,] -0.16619094 0.5329981 0.56536845 0.5803310 0.5643568 0.45487242 1.00000000 -0.08405294<br />
[8,] -0.06419929 0.1471839 0.04923937 0.2241797 -0.1023142 0.20794375 -0.08405294 1.00000000</p>
<p>Then, for example,<br />
R2 for [,2]= 1- 0.4783484= 0.5216516.</p>
<p>Am I right?</p>
<p>I appreciate any help,</p>
<p>Thank you,<br />
Hamed</p>
http://openmx.psyc.virginia.edu/thread/3988#commentsmetaSEMTue, 19 May 2015 19:56:05 +0000HAMED3988 at http://openmx.psyc.virginia.eduUnivariate random-effects model
http://openmx.psyc.virginia.edu/thread/3982
<p>Greetings,</p>
<p>I have tested a correlation, for which I have a small number of studies (two studies), using univariate random-effects model in metaSEM. The results (see attached) show a significant Q statistic, non-significant Tau2_1_1, and I2 of 99%. I was wondering if such results should be interpreted as a significant heterogeneity among my studies or not. In particular, how should I interpret the results when Q is significant, but Tau is not?</p>
<p>I appreciate any help,<br />
Best,<br />
/Hamed</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/RandomEffects.txt">RandomEffects.txt</a></td><td>849 bytes</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3982#commentsmetaSEMWed, 06 May 2015 04:03:59 +0000HAMED3982 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.edu