# METASEM with 3 variables

7 posts / 0 new
Offline
Joined: 08/31/2018 - 09:42
METASEM with 3 variables
AttachmentSize
95.6 KB

Hello,

We would like to conduct a METASEM for a model with three variables: Mov (dependant); Psy & pai (independent).

I used the R codes available in Cheung and in Hagger 2018. Unfortunately, I have an error to determine the indirect effect of Pai on Mov through Psy. I can only have the direct effects between the three variables.

I think the problem occurs in stage 2 :

> random2 <- tssem2(random1, Amatrix=A1, Smatrix=S1, diag.constraints=TRUE,
+ intervals.type="LB", mx.algebras( Ind=mxAlgebra(PaitoPsy*PaitoMov, name="Ind"))

Guillaume

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

Hi Guillaume,

Could you attach the R code in plain text? It's difficult to work with the PDF.

Best,
Mike

Offline
Joined: 08/31/2018 - 09:42
Hi,

Hi,

Here is the script in text and R files
Best,
Guillaume

File attachments:
Offline
Joined: 10/08/2009 - 22:37
Hi Guillaume,

Hi Guillaume,

Please see the revised code. It seems to work fine.

Best,
Mike

File attachments:
Offline
Joined: 08/31/2018 - 09:42
Thank you so much for your

Thank you so much for your help!
Best wishes
Guillaume

Offline
Joined: 08/31/2018 - 09:42
missing values

Dear Mike,

I am trying to perform the MASEM with some missing variables. You previously helped me the code, but now that I have included more studies with some missing effect sizes, it doesn't work anymore when I perform this function :

fix1 <- tssem1(Studiestest10$data, Studiestest10$n, method="FEM")
summary(fix1)

You can see the script attached.

I saw in Hagger 2018 and in some of your papers that we can include studies with missing effect sizes, isn't it ?

Thank you so much for your help,
Guillaume

File attachments:
Offline
Joined: 10/08/2009 - 22:37
Hi Guillaume,

Hi Guillaume,
You may try the following code. It works for me.

fix1 <- tssem1(Studiestest10$data, Studiestest10$n, method="REM", RE.type = "Zero")

Best,
Mike