You are here

Moderator analyses in OSMASEM

5 posts / 0 new
Last post
Dabiriyan's picture
Offline
Joined: 09/30/2019 - 07:42
Moderator analyses in OSMASEM
AttachmentSize
Binary Data Dabiriyan.sav1.95 KB
Binary Data Dabiriyan.R11.14 KB

Dear Mike & colleagues,
I conducted moderator analyses with OSMASEM with several moderators. When I performed OSMASEM with these moderators simultaneously and separately, it showed different estimates for moderators. Which one should be preferred?

I attached R-code and data.

Thanks for your time and patience.

Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Dear Dabiriyan,

Dear Dabiriyan,

This is similar to the case in multiple regression. The results are likely to be different when testing all predictors or one predictor at a time. In your case, only Individualism is statistically significant. You may focus on it.

Best,
Mike

> ## All moderators 
> anova(mx.fit1, mx.fit0)
             base   comparison ep  minus2LL df       AIC   diffLL diffdf          p
1 Ax as moderator         <NA> 18 -95.53248 42 -179.5325       NA     NA         NA
2 Ax as moderator No moderator  6 -73.93884 54 -181.9388 21.59365     12 0.04233461
> ## One moderator at a time
> anova(mx.fit1_Mean_Age, mx.fit0)
             base   comparison ep  minus2LL df       AIC    diffLL diffdf         p
1 Ax as moderator         <NA>  9 -74.75692 51 -176.7569        NA     NA        NA
2 Ax as moderator No moderator  6 -73.93884 54 -181.9388 0.8180842      3 0.8451368
> anova(mx.fit1_Individualism_Score_CON, mx.fit0)
             base   comparison ep  minus2LL df       AIC   diffLL diffdf         p
1 Ax as moderator         <NA>  9 -83.90478 51 -185.9048       NA     NA        NA
2 Ax as moderator No moderator  6 -73.93884 54 -181.9388 9.965939      3 0.0188579
> anova(mx.fit1_Female_Percentage, mx.fit0)
             base   comparison ep  minus2LL df       AIC   diffLL diffdf         p
1 Ax as moderator         <NA>  9 -76.67241 51 -178.6724       NA     NA        NA
2 Ax as moderator No moderator  6 -73.93884 54 -181.9388 2.733568      3 0.4345529
> anova(mx.fit1_Design, mx.fit0)
             base   comparison ep  minus2LL df       AIC   diffLL diffdf         p
1 Ax as moderator         <NA>  9 -78.74753 51 -180.7475       NA     NA        NA
2 Ax as moderator No moderator  6 -73.93884 54 -181.9388 4.808693      3 0.1863537
Dabiriyan's picture
Offline
Joined: 09/30/2019 - 07:42
Thanks!

Dear Mike,
Thank you very much for your reply. I really appreciate it.

ya's picture
ya
Offline
Joined: 11/28/2013 - 06:10
question on moderation

Dear Mike,

I have a fake dataset I made myself to try out the OSMASEM models. There are missing correlations and missing values in the moderator. My questions are:

  1. can OSMASEM handle missing values in moderator? the code with missing moderator values seems working, but how does the missing moderator values handled?

  2. I followed your OSMASEM moderation code in ' MASEM on Nohe et al. (2015) data Suzanne Jak and Mike Cheung June 17, 2020 '. For the moderation effect, you seem to have 4 lines of results corresponding to the 4 paths in the Ax, so I expect I will have 3 lines of results since I have 3 paths in the Ax. However, I got only one line of result with the name 'moderated':

> summary(osmasem2)
Summary of moderating all

free parameters:
name matrix row col Estimate Std.Error A z value Pr(>|z|)
1 medONx A0 med x -0.2116346 14.247970 -0.014853667 0.9881489
2 yONx A0 y x 0.8599042 5.358775 0.160466578 0.8725135
3 yONmed A0 y med 0.2461819 26.169723 0.009407127 0.9924943
4 xWITHx S0 x x 0.2009616 25.820149 0.007783129 0.9937900
5 moderated Ax1 2 1 0.1000000 NA ! NA NA
6 Tau1_1 vecTau1 1 1 -2.3411371 6.558308 -0.356972730 0.7211122
7 Tau1_2 vecTau1 2 1 -0.8892047 15.058792 -0.059048869 0.9529132
8 Tau1_3 vecTau1 3 1 -1.0218680 13.109379 -0.077949382 0.9378683

The name of the term and the number of the terms are both not correct.

I guess the fake data caused the NAs, but I am not sure about the ' moderated ' term. I am using OpenMx version number: 2.18.1, whereas you used OpenMx version number: 2.17.4 , does that matter?

Thank you very much.

File attachments: 
Mike Cheung's picture
Offline
Joined: 10/08/2009 - 22:37
Hi Ya,

Hi Ya,

1) OSMASEM treats the moderators as definition variables. Therefore, NA is not allowed in the moderators.
2) I have made some changes in your script. Please see the attached one.

Best,
Mike

File attachments: