Weird behaviour of gamlj 2.5.3 GLM

Everything related to the development of modules in jamovi
User avatar
mcfanda@gmail.com
Posts: 460
Joined: Thu Mar 23, 2017 9:24 pm

Re: Weird behaviour of gamlj 2.5.3 GLM

Post by mcfanda@gmail.com »

Hi,
thanks, but maybe I'm not following your reasoning well. In general, in the general linear model, SS_model is not necessarily equal to SS_effects. It is not a bug.
If you have a balanced design for Genre and Volture, try removing the covariate Nbr and you'll see that SS_model=SS_effects. If Genre and Volture are not balanced or a covariate is in the model, SS_model is not necessarily equal to SS_effects.
User avatar
mcfanda@gmail.com
Posts: 460
Joined: Thu Mar 23, 2017 9:24 pm

Re: Weird behaviour of gamlj 2.5.3 GLM

Post by mcfanda@gmail.com »

Here is an example from Cohen and Cohen exercise example. Two continuous variables and their interaction (raw variables).
spss.png
spss.png (28.8 KiB) Viewed 10122 times
here the same in gamlj
gam.png
gam.png (24.23 KiB) Viewed 10122 times
You can see the results are identical (granted rounding).

You can also see the SS_model=5887, whereas SS_effects=2161+387+1136=3684
You can also see that SS_total=SS_model+SS_res=5887+22675=28561.
Last edited by mcfanda@gmail.com on Wed Nov 17, 2021 11:48 pm, edited 1 time in total.
User avatar
mcfanda@gmail.com
Posts: 460
Joined: Thu Mar 23, 2017 9:24 pm

Re: Weird behaviour of gamlj 2.5.3 GLM

Post by mcfanda@gmail.com »

To finish up, here is an example with balanced data. In the first analysis, we just have two balanced factors, so SS_model=SS_effects
gam2.png
gam2.png (23.52 KiB) Viewed 10122 times
Now, adding a covariate change the sums and we get SS_model != SS_effects
gam3.png
gam3.png (23.16 KiB) Viewed 10122 times
Last edited by mcfanda@gmail.com on Wed Nov 17, 2021 11:51 pm, edited 3 times in total.
User avatar
mcfanda@gmail.com
Posts: 460
Joined: Thu Mar 23, 2017 9:24 pm

Re: Weird behaviour of gamlj 2.5.3 GLM

Post by mcfanda@gmail.com »

The same is SPSS
spss2.png
spss2.png (22.27 KiB) Viewed 10122 times
spss3.png
spss3.png (22.77 KiB) Viewed 10122 times
User avatar
Arnaud Mortier
Posts: 32
Joined: Tue Apr 27, 2021 11:39 am

Re: Weird behaviour of gamlj 2.5.3 GLM

Post by Arnaud Mortier »

My goodness, this is a part of the theory that I'd always completely overlooked. What a shame. Thank you so much for your help!
User avatar
Arnaud Mortier
Posts: 32
Joined: Tue Apr 27, 2021 11:39 am

Re: Weird behaviour of gamlj 2.5.3 GLM

Post by Arnaud Mortier »

Hi,
So there is definitely some part of the theory that I overlooked, but for the record I found a computer with the older 2.6.1 still in place, so I can provide a proof that at some point 2.6.1 used to show SS_model = SS_effects.
Thanks again!
Arnaud

Current version and older version:
current.png
current.png (71.22 KiB) Viewed 10091 times
older.png
older.png (65.89 KiB) Viewed 10091 times
User avatar
mcfanda@gmail.com
Posts: 460
Joined: Thu Mar 23, 2017 9:24 pm

Re: Weird behaviour of gamlj 2.5.3 GLM

Post by mcfanda@gmail.com »

No problem, the important thing is that it is fine now. Thanks for the feedback
Post Reply