# Problem with the new OSMASEM-Function

6 posts / 0 new
Offline
Joined: 12/03/2018 - 04:15
Problem with the new OSMASEM-Function
AttachmentSize
7.05 KB
10.33 KB

Dear Mike & colleagues,

I'm currently sitting at a moderator analysis with the new OSMASEM approach (continuous moderators in MASEM - yeah!).

Unfortunately I get an error message, which I can't assign. I want to use HDI (Human Development Index) values as moderator variables for the regression coefficients (A-Matrix).
However, I get the following error message when I try to create the model with the moderator.
Code:

M1 <- create.vechsR(A0=RAM1$A, S0=RAM1$S, Ax=Ax) Error in as.vector(data) :
no method for coercing this S4 class to a vector 

I'd be happy if you had any idea how to solve this problem. Does it maybe have anything to do with the type of data I have?

I have my code and my data attached.

Best
Marius

Offline
Joined: 10/08/2009 - 22:37
Hi Marius,

Hi Marius,

It seems to work fine after correcting some syntax errors.

Hope it helps.

Best,
Mike

File attachments:
Offline
Joined: 12/03/2018 - 04:15
Thank you so much for your

Thank you so much for your help. Now everything is running smoothly. I only have two more questions for a better understanding:
1) If I remove one of my covariances (k2), then I gain a degree of freedom. Then why is the CFI still not calculated? (I have defined the argument Saturated=TRUE)
2 Although I have defined residuals (p22, p33, p44 and p55), they are not estimated - why is that? In the conventional TSSEM approach they are also estimated.

Thank you very much for your help.

Offline
Joined: 10/08/2009 - 22:37
Hi Marius,

Hi Marius,

1) We don't know how to define CFI in this model. So we only provide the chi-square statistic, RMSEA, and SRMR. For the SRMR, you may need to use the osmasemSRMR().
2) The residuals are functions of the other parameters. You may get the residuals by using mxEval(Smatrix, fit0\$mx.fit).

Best,
Mike

Offline
Joined: 12/03/2018 - 04:15
Thank you very much for the

Thank you very much for the clarification. Really great work you did with the OSMASEM.
In the TSSEM approach there is the possibility to specify the indirect effects - would you recommend to calculate the Sobel test (or something similar) manually in the OSMASEM?

Offline
Joined: 10/08/2009 - 22:37
Hi Marius,

Hi Marius,

You can define an indirect effect and get the Wald SE with the mxSE(). Alternatively, you can also get the likelihood-based CI of the indirect effect. It may take a while to get the CIs as it is computationally intensive. Please see the attached examples.

Mike

File attachments: