Dear all,
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.
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.
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!!
Finally, I would like to thank Mike Cheung for the amazing metaSEM package!
Thank you vey much in advance and kind regards.
Dear Daniel,
Could you provide some sample data, R code, and output so that we can compare the models?
Thanks.
Mike
Sure! In the document DATOSRANDOM19.dat there are 16 matrices, that I have analyze using the TSSEM procedure with the code written in the document "random.R"
In the document POOL.dat, you can find the pooled correlation matrix obtained in TSSEM1, and in the document "Pool directamente.R" there is the code that I have used to analyze the pooled correlation matrix directly with wls() function.
Finally, in the document OUTCOME.txt I pasted the results of both procedures.
Thank you very very much in advance!!
Dear Daniel,
The main issue is that you treated the pooled correlation matrix as an observed correlation matrix in calculating the asymptotic sampling covariance matrix in "Pool directamente.R." The asymptotic sampling covariance matrix should be based on the stage 1 analysis. You may try the following code:
Extract the pooled correlation matrix from the stage 1 analysis
X1 <- vec2symMat(coef(random1, select="fixed"), diag=FALSE)
Extract the asymptotic sampling covariance matrix
mca <- vcov(random1, select="fixed")
Total sample size
n<-2118
Fit the model with WLS estimation
random3<- wls(X1, mca, n, Amatrix = A1,
Smatrix = S1, intervals = "LB",diag.constraints=TRUE,
mx.algebras=list( ind=mxAlgebra(f2bb2cc2dd2g+a2cc2dd2g+e2dd2g, name="ind") ))
Regards,
Mike
Thank you very much Mike!! It works perfectly, and now I obtain the same results!!
I don't want to bother you again but, besides all of these, I have another pooled correlation matrix (I don't have the individual studies, only the pooled one), and I would like to use that matrix as a input of the stage 2. How could I do that? Is that posible? I thought that I could calculate the asympotic sampling covariance matrix with the function asyCov but as you have pointed out, I would treated the pooled correlation matrix as an observed correlation..
Thank you very much again for all your help!!
If you don't have the individual studies, there is no way to take advantage of using the asymptotic sampling covariance matrix.
There is no point to generate the asymptotic sampling covariance matrix with the asyCov() function. You can treat the pooled correlation matrix as an observed correlation and fit models on it with the ML estimation method.
Thank you very much Mike, It helps a lot!!
Kind Regards,
Daniel.