## Inconsistent b0 in linear regression between Jamovi and R

Discuss statistics related things

## Re: Inconsistent b0 in linear regression between Jamovi and

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.
uab

Posts: 3
Joined: Tue Nov 19, 2019 7:22 pm

## Re: Inconsistent b0 in linear regression between Jamovi and

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

jonathon

Posts: 1803
Joined: Fri Jan 27, 2017 10:04 am

## Re: Inconsistent b0 in linear regression between Jamovi and

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?
jRafi

Posts: 6
Joined: Fri Feb 15, 2019 9:08 pm
Location: Stockholm

## Re: Inconsistent b0 in linear regression between Jamovi and

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

jonathon

Posts: 1803
Joined: Fri Jan 27, 2017 10:04 am

## Re: Inconsistent b0 in linear regression between Jamovi and

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.
jRafi

Posts: 6
Joined: Fri Feb 15, 2019 9:08 pm
Location: Stockholm

## Re: Inconsistent b0 in linear regression between Jamovi and

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

jonathon

Posts: 1803
Joined: Fri Jan 27, 2017 10:04 am

## Re: Inconsistent b0 in linear regression between Jamovi and

Thanks for your effort, Jonathon. Indeed, adding a dummy coding option to linear regression would be great!
uab

Posts: 3
Joined: Tue Nov 19, 2019 7:22 pm

## Re: Inconsistent b0 in linear regression between Jamovi and

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.
jRafi

Posts: 6
Joined: Fri Feb 15, 2019 9:08 pm
Location: Stockholm

## Re: Inconsistent b0 in linear regression between Jamovi and

we've committed these changes, and they'll be in the next release.

cheers

jonathon

jonathon

Posts: 1803
Joined: Fri Jan 27, 2017 10:04 am