GAMLj and Linear Regression giving me different PVals

Discuss the jamovi platform, possible improvements, etc.
Post Reply
Whirly123
Posts: 31
Joined: Mon May 06, 2019 3:07 pm

GAMLj and Linear Regression giving me different PVals

Post by Whirly123 »

There is a significant difference in response between two conditions. We want to see if this difference goes away by accounting for another variable (i.e. to see whether it is fully explained by that variable).

So we have Response ~ Condition * Explanatory Variable

Super simple.

If I run a linear regression (default Jamovi) I get:
Condition p = 0.186
Explanatory Variable p = 0.109
Interaction = 0.014

With the explanatory variable in the model condition goes from p < .001 to .ns so it seems like my explanatory variable explains the difference.

If I run the same analysis with GAMLj General Linear Model this doesn't happen.
Condition p < 0.001
Explanatory Variable p = 0.815
Interaction = 0.014

Can anyone explain what is going on? Which one is correct? The GAMLj one just seems odd but there is probably something I am missing about how a GLM is different from a Linear Regression?
Whirly123
Posts: 31
Joined: Mon May 06, 2019 3:07 pm

Re: GAMLj and Linear Regression giving me different PVals

Post by Whirly123 »

Oh it appears to be the Scaling - I didn't realise that would so drastically change the p values. The interpretation of the two different results is drastic - the Explanatory Variable explains all the variance or it doesn't. Not sure how to interpret.
Whirly123
Posts: 31
Joined: Mon May 06, 2019 3:07 pm

Re: GAMLj and Linear Regression giving me different PVals

Post by Whirly123 »

Oh - also found a bug. If I set scale back to "None", duplicate the analysis and change the IV to something new it will still say the scale is set to "None" but it will be centered again. You need to click on any of the other ones and then back to "None" again.
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: GAMLj and Linear Regression giving me different PVals

Post by mcfanda@gmail.com »

Hi
in any linear model, the results you obtain from the linear effects may change drastically when an interaction is included in the model. It is not a bug, nor a software specificity. In any linear model, when there is no interaction, the effect of each variable is computed keeping constant any other independent variable. If you include the interaction, the linear effect of each variable is computed keeping the other variable equal to zero. So, depending on the scale of your variables, centering or not may drastically change the results. They are all correct, just the interpretation is (very) different. You may want to have a look at this classic text for details: https://psycnet.apa.org/record/1991-97932-000.

As for the duplication of analysis, it is a known issue, just click on the setting that you want and the results should be correct
Post Reply