jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
58 stars 29 forks source link

No indirect effects for each group when conducting multigroup SEM #1279

Open krutcher7069 opened 3 years ago

krutcher7069 commented 3 years ago

Steps to reproduce:

  1. Go to SEM and then select Structural Equation Modeling

  2. Enter the following syntax

stressor =~ Language + Culture + Academic + SocialInter strat_h =~ Heritage strat_t =~ Thai well =~ Creative + Coping + Social + Essential + Physical

well ~ a strat_h + b strat_t strat_h ~ c stressor
strat_t ~ d
stressor ca := c a db := d b

Heritage ~~ Thai Language ~~ Culture Language ~~ Creative Social ~~ Essential Social ~~ Physical Essential ~~ Physical SocialInter ~~ Thai Thai ~~ Social Heritage ~~ Creative Thai ~~ Physical Academic ~~ Heritage Heritage ~~ Essential

  1. Select the following options image image

  2. Couldn't find the indirect effects for each group

Thanks very much for the help!

JMBKoch commented 3 years ago

@krutcher7069: When doing Multigroup SEM using the lavaan syntax, regression coefficients are estimated to be equal across the groups when they are given the same label. This is the case here, where the coefficients are labeled a, b, c, and d for all groups. Consequently, also the indirect effects are estimated to be equal across groups. If you want the indirect effects to be estimated per group, you need to label the regression coefficients per group, and define the indirect effects per group as well. This can by achieved by using vectors of labels. For example, in a scenario with three groups, this could be done as follows:

well ~ c(a1, a2, a3) strat_h + c(b1, b2, b3) strat_t strat_h ~ c(c1, c2, c3) stressor strat_t ~ c(d1, d2, d3) stressor ca1 := c1a1 ca2 := c2a2 ca3 := c3a3 db1 := d1b1 db2 := d2b2 db3 := d3b3

@vandenman @Kucharssim: Anything to add here? Should a warning be displayed here to make users aware of the fact that parameters are estimated as equal across groups? lavaan displays such warning by default, and I understand why this may be confusing without such warning.

vandenman commented 3 years ago

Should a warning be displayed here to make users aware of the fact that parameters are estimated as equal across groups?

I think that would be a good idea!

juliuspfadt commented 7 months ago

I doubt this has been worked on. I think this would be solved with the a more general overhaul of the SEM analysis, where we output most of the warnings. @Kucharssim maybe you remember that we had lots of warnings with the model test, estimators, and standard errors.

tomtomme commented 7 months ago

ToDo, when overhauling SEM module:

tomtomme commented 4 months ago

@juliuspfadt This is now probably something for 0.20?

juliuspfadt commented 4 months ago

ja you are right. and thanks for bringing it up on my radar again.