Page 2 of 3

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Tue Nov 19, 2019 7:36 pm
by uab
I agree with nadia and jRafi. It is definitely a weird thing to have the grand mean as the intercept whenever there's a factor in the model. Makes jamovi basically useless for teaching regression basics.

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Tue Nov 19, 2019 11:20 pm
by jonathon
yeah, i think this might be one of those "damned if we do, damned if we don't" situations.

when computing the sums-of-squares, and the significance, the model used uses the grand mean as the intercept (in spss too). so it's weird to provide parameter estimates that are from a completely different model (i.e. one that uses one of the levels as an intercept, which is what spss does).

i agree (as a stats teacher myself), there's something nice about teaching a model where a reference level is the intercept ... but the fact that that *isn't* the model that SPSS is using to calculate the sums-of-squares, etc. makes me feel like i'm misleading my students.

is it time we started teaching the grand mean? it doesn't seem like such a stretch.

jonathon

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Fri Nov 29, 2019 2:02 pm
by jRafi
Thanks for keeping us updated Jonathon, appreciate your thoughts here.

Although I am certainly not qualified to take a stance regarding if the intercept should be the grand mean or a reference level, I find it highly problematic that the model intercepts you get from jamovi differs from both R and SPSS.

I've introduced jamovi to several people, and everyone enjoys the simplicity and user-friendliness. However, if jamovi gives different results than other software (not only SPSS), then we have an issue with the validity of the results. This might scare people away from jamovi if they find the results untrustworthy.

I understand your view about the grand mean as an intercept, but the question is whether it is worth taking a (imo) radical stance here if hurts credibility and adoption?

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Sun Dec 01, 2019 9:52 am
by jonathon
i don't think our results differ from R ... only SPSS. it seems to me that SPSS does something very quirky and misleading here, and i'm reluctant to perpetuate that.

jonathon

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Sun Dec 01, 2019 7:15 pm
by jRafi
the lm() function in R uses a reference level as the intercept.

Consider the following data:
data.frame(
  • y = c(9,10,11, 20,20,20),
    z = c(rep("a", 3), rep("b", 3)))
In R, using lm() the intercept is 10.
In jamovi, the intercept is 15.

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Mon Dec 02, 2019 5:14 am
by jonathon
yeah ok, but if you use the anova() function, it uses the grand mean as the intercept.

which is part of what's challenging here ... there's quite a confusing legacy. i like the fact that our ANOVA and linear regression produce consistent results ... that makes a heck of a lot of sense to me. but perhaps we need to revisit it.

at the very least, i do want to add a dummy coding option to the linear regression.

jonathon

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Tue Dec 03, 2019 5:19 pm
by uab
Thanks for your effort, Jonathon. Indeed, adding a dummy coding option to linear regression would be great!

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Fri Dec 06, 2019 9:52 am
by jRafi
Again, thanks for sharing your thoughts on this Jonathon. I see your point in having the ANOVA and linear regression producing consistent intercepts. Also look forward to the update where you could set the intercept in a regression analysis as a reference level.

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Sat Dec 07, 2019 1:29 am
by jonathon
we've committed these changes, and they'll be in the next release.

cheers

jonathon

Re: Inconsistent b0 in linear regression between Jamovi and

Posted: Thu Dec 12, 2019 1:09 pm
by jRafi
Glad to hear it, thanks!