You are here

Moderator analysis using OSMASEM

6 posts / 0 new
Last post
hansol6461's picture
Offline
Joined: 02/17/2021 - 06:52
Moderator analysis using OSMASEM
AttachmentSize
Binary Data moderator161 bytes
Binary Data data12.49 KB
Binary Data n646 bytes
Binary Data My R code3.23 KB

Dear Professor Cheung,

I am writing this post to seek your help regarding the OSMASEM. Building a model with no moderator works just fine, but adding a moderator to the model does not work properly. I am currently learning the OSMASEM approach by replicating one of the published articles that applied the approach, entitled “Simple View of Reading in Chinese: A One-Stage Meta-Analytic Structural Equation Modeling” written by Peng and his colleagues (https://journals.sagepub.com/doi/abs/10.3102/0034654320964198). Thanks to their open data (Appendix C), I was able to construct a dataset and to replicate their first model with no moderator by computing the same coefficients and p-values in accordance with the figure in the article. However, when I add a moderator, the results are unstable—seemingly inaccurate (very large) standard errors. It would be appreciated if you could kindly review my codes.

Thank you in advance.

Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Rerunning the model again may

Rerunning the model again may help. As you can see, Tau1_2 vecTau1 and Tau1_2vecTau7 are very negative meaning that Tau2_2 and Tau2_7 are very close to 0. Thus, their SEs are large.

> fit1 <- rerun(fit1, autofixtau2=TRUE)
> summary(fit1) 
 
Summary of With moderator 
 
free parameters:
            name  matrix   row   col     Estimate    Std.Error A      z value     Pr(>|z|)
1             d1      A0 FLUEN DECOD   0.64691401   0.02414233    26.79584434 0.000000e+00
2             d2      A0  ACCU DECOD   0.79586209   0.02800738    28.41615808 0.000000e+00
3       decod2rc      A0    RC DECOD   0.25559757   0.15223900     1.67892310 9.316703e-02
4             l1      A0   VOC  LANG   0.67867804   0.04546883    14.92622655 0.000000e+00
5             l2      A0    LC  LANG   0.70264701   0.05247982    13.38889867 0.000000e+00
6        lang2rc      A0    RC  LANG   0.50301585   0.14690273     3.42414233 6.167431e-04
7             m1      A0    PA  META   0.62209060   0.01723119    36.10259065 0.000000e+00
8             m2      A0   RAN  META  -0.65364225   0.02191765   -29.82263878 0.000000e+00
9             m3      A0   MOR  META   0.67728289   0.01746958    38.76927928 0.000000e+00
10            m4      A0   OTH  META   0.60776956   0.02094887    29.01204995 0.000000e+00
11    meta2decod      A0 DECOD  META   0.75596660   0.03195421    23.65780847 0.000000e+00
12 langWITHdecod      S0  LANG DECOD   0.17921498   0.05238822     3.42090245 6.241372e-04
13  metaWITHlang      S0  META  LANG   0.80828780   0.04977277    16.23955760 0.000000e+00
14    decod2rc_1      A1    RC DECOD   0.73925653   0.33281239     2.22124101 2.633464e-02
15     lang2rc_1      A1    RC  LANG  -0.57797377   0.34915800    -1.65533591 9.785638e-02
16  meta2decod_1      A1 DECOD  META  -0.03813199   0.03933175    -0.96949637 3.322976e-01
17        Tau1_1 vecTau1     1     1  -1.81314766   0.13693723   -13.24072059 0.000000e+00
18        Tau1_2 vecTau1     2     1 -14.98088083 533.33995428    -0.02808880 9.775913e-01
19        Tau1_3 vecTau1     3     1  -1.99834193   0.57103760    -3.49949273 4.661443e-04
20        Tau1_4 vecTau1     4     1  -2.47809594   0.30878608    -8.02528394 1.110223e-15
21        Tau1_5 vecTau1     5     1  -2.10233487   0.24638746    -8.53263747 0.000000e+00
22        Tau1_6 vecTau1     6     1  -1.66980132   0.23848381    -7.00173862 2.527978e-12
23        Tau1_7 vecTau1     7     1 -19.35168647 719.49985513    -0.02689603 9.785427e-01
24        Tau1_8 vecTau1     8     1  -1.79439962   0.34151843    -5.25418090 1.486847e-07
25        Tau1_9 vecTau1     9     1  -1.72923582   0.10588546   -16.33119189 0.000000e+00
26       Tau1_10 vecTau1    10     1  -1.86758996   0.23176991    -8.05794830 6.661338e-16
27       Tau1_11 vecTau1    11     1  -2.20455890   0.13765525   -16.01507360 0.000000e+00
28       Tau1_12 vecTau1    12     1  -1.84738284   0.08228960   -22.44977271 0.000000e+00
29       Tau1_13 vecTau1    13     1  -2.18570462   0.13073873   -16.71811167 0.000000e+00
30       Tau1_14 vecTau1    14     1  -2.27474296   0.11394564   -19.96340539 0.000000e+00
31       Tau1_15 vecTau1    15     1  -1.71508022   0.10308624   -16.63733456 0.000000e+00
32       Tau1_16 vecTau1    16     1  -1.02500263   0.21794995    -4.70292671 2.564585e-06
33       Tau1_17 vecTau1    17     1  -1.76588992   0.14591155   -12.10246823 0.000000e+00
34       Tau1_18 vecTau1    18     1  -1.46397359   0.10443147   -14.01851011 0.000000e+00
35       Tau1_19 vecTau1    19     1  -1.26264618   0.14858137    -8.49801136 0.000000e+00
36       Tau1_20 vecTau1    20     1  -1.59642517   0.11088963   -14.39652335 0.000000e+00
37       Tau1_21 vecTau1    21     1  -1.17345377   0.15721534    -7.46399010 8.393286e-14
38       Tau1_22 vecTau1    22     1  -1.79465560   0.21934346    -8.18194270 2.220446e-16
39       Tau1_23 vecTau1    23     1  -1.17846134   0.24015095    -4.90716911 9.240036e-07
40       Tau1_24 vecTau1    24     1  -1.05133842   0.25949778    -4.05143506 5.090446e-05
41       Tau1_25 vecTau1    25     1  -2.19769306   0.32907430    -6.67840990 2.415490e-11
42       Tau1_26 vecTau1    26     1  -2.37704162   0.43782954    -5.42914853 5.662355e-08
43       Tau1_27 vecTau1    27     1  -1.82992444   0.15172991   -12.06040652 0.000000e+00
44       Tau1_28 vecTau1    28     1  -1.87120779   0.21916385    -8.53794010 0.000000e+00
45       Tau1_29 vecTau1    29     1  -2.27618820   0.14399584   -15.80731966 0.000000e+00
46       Tau1_30 vecTau1    30     1  -2.46765302   0.28959601    -8.52101874 0.000000e+00
47       Tau1_31 vecTau1    31     1  -1.81074322   0.11445191   -15.82099582 0.000000e+00
48       Tau1_32 vecTau1    32     1  -1.68012285   0.08742181   -19.21857778 0.000000e+00
49       Tau1_33 vecTau1    33     1  -1.52835159   0.09914218   -15.41575476 0.000000e+00
50       Tau1_34 vecTau1    34     1  -1.49870425   0.12893648   -11.62358597 0.000000e+00
51       Tau1_35 vecTau1    35     1  -1.68146848   0.15237981   -11.03471935 0.000000e+00
52       Tau1_36 vecTau1    36     1  -1.83791285   0.13210364   -13.91265870 0.000000e+00
 
Model Statistics: 
               |  Parameters  |  Degrees of Freedom  |  Fit (-2lnL units)
       Model:             52                   1166             -724.0495
   Saturated:            702                    516                    NA
Independence:             72                   1146                    NA
Number of observations/statistics: 49132/1218
 
Information Criteria: 
      |  df Penalty  |  Parameters Penalty  |  Sample-Size Adjusted
AIC:      -3056.049              -620.0495                -619.9372
BIC:     -13319.491              -162.3316                -327.5883
To get additional fit indices, see help(mxRefModels)
timestamp: 2021-02-27 18:03:50 
Wall clock time: 70.233 secs 
OpenMx version number: 2.18.1 
Need help?  See help(mxSummary) 
 
> diag(VarCorr(fit1))
      Tau2_1       Tau2_2       Tau2_3       Tau2_4       Tau2_5       Tau2_6       Tau2_7       Tau2_8 
2.661460e-02 9.722372e-14 1.837648e-02 7.039685e-03 1.492571e-02 3.545104e-02 1.553598e-17 2.763149e-02 
      Tau2_9      Tau2_10      Tau2_11      Tau2_12      Tau2_13      Tau2_14      Tau2_15      Tau2_16 
3.147783e-02 2.386888e-02 1.216591e-02 2.485328e-02 1.263342e-02 1.057264e-02 3.238174e-02 1.287342e-01 
     Tau2_17      Tau2_18      Tau2_19      Tau2_20      Tau2_21      Tau2_22      Tau2_23      Tau2_24 
2.925280e-02 5.350677e-02 8.003491e-02 4.105468e-02 9.566454e-02 2.761735e-02 9.471123e-02 1.221291e-01 
     Tau2_25      Tau2_26      Tau2_27      Tau2_28      Tau2_29      Tau2_30      Tau2_31      Tau2_32 
1.233412e-02 8.616440e-03 2.573640e-02 2.369679e-02 1.054212e-02 7.188261e-03 2.674290e-02 3.472673e-02 
     Tau2_33      Tau2_34      Tau2_35      Tau2_36 
4.704253e-02 4.991626e-02 3.463339e-02 2.532848e-02 
hansol6461's picture
Offline
Joined: 02/17/2021 - 06:52
A follow-up question regarding R2 for moderation

Dear Professor Cheung,

I truly appreciate your feedback. It works just fine! I am very delighted to be able to move forward to next learning steps and want to ask one more favor with the following last question: How do I label the computed 36 Tau2s to understand the results of R2 for moderation (osmasemR2)? Given that my RAM$A0 is a 1212 matrix, I first guessed there should be 66 Taus. Actually, there are 36 Tau2s coming from the osmasemR2 command and this made me confused. Do I have a 99 matrix? When I read MASEM on Nohe et al. (2015) data, it seems that your 6 Tau2s exactly correspond to the lower diagonal elements of a 4*4 matrix with w1,s1,w2,s2 in accordance with the structure of RAM$A0. My best understanding is that this pattern does not apply to my case where both observed and latent variables are involved. When it comes to coefficients, I have their names; however, I am clueless with nameless Tau2s. I look forward to hearing from you, sir.

Thank you very much.

hansol6461's picture
Offline
Joined: 02/17/2021 - 06:52
I could not edit the added comment.

Please disregard this message and see the following comment. Thank you.

hansol6461's picture
Offline
Joined: 02/17/2021 - 06:52
A follow-up question regarding R2 for moderation

Dear Professor Cheung,

I truly appreciate your feedback. It works just fine! I am very delighted to be able to move forward to next learning steps and want to ask one more favor with the following last question: How do I label the computed 36 Tau2s to understand the results of R2 for moderation (osmasemR2)? Given that my A0 is a 12X12 matrix, I first guessed there should be 66 Taus (i.e., 66 lower diagonal elements). Actually, there are 36 Tau2s from the osmasemR2 command and this made me confused. Do I have a 9X9 matrix? When I read MASEM on Nohe et al. (2015) data, it seems that your 6 Tau2s exactly correspond to the lower diagonal elements of a 4X4 matrix with w1,s1,w2,s2 in accordance with the structure of A0. My best understanding is that this pattern does not apply to my case where both observed and latent variables are involved. When it comes to coefficients, I have their names; however, I am clueless with Tau2s with no labels. I look forward to hearing from you, sir.

Thank you very much.

Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
As indicated in Equation (1)

As indicated in Equation (1) in Jak and Cheung (2020), the random effects Tau^2 are on the correlation coefficients, not on the SEM parameters. In your data, there are 9 variables. Thus, 9*8/2=36 Tau^2 on the correlation coefficients. It may not be easy to interpret the R^2 in such a model.