Incorrect intercept in Bayesian linear regression
Dear Jasp team
I came across a potential issue in JASP's Bayesian linear regression output. For various datasets I consistently found an unlikely and inconsistent intercept. The inconsistency can be easily verified as for any (multiple) linear regression model (y=c+mi.xi) with intercept c and slope coefficients mi (i=1, ...), the intercept can be easily derived from: c=<y>-mi.<xi>.
However, the intercept c that is returned by JASP turns out to be exactly equal to <y>. This cannot be correct, as it only holds for the rare case that mi.<xi>=0. So, I suspect a bug. Possibly a wrong variable value is sent to the user interface. The other coefficients seem quite OK.
I've noticed some other posts about the intercept, but so far I couldn't find any answers, e.g. see
https://forum.cogsci.nl/discussion/4152/linear-vs-bayesian-regression-anomalies
best
Wim
Comments
Hi Wim,
I've forwarded this to the team. As an aside, for issues like this (where you suspect there is a bug) you will be helped more efficiently if you post it on our GitHub page (for details see https://jasp-stats.org/2018/03/29/request-feature-report-bug-jasp/)
Cheers,
E.J.
Thx
Wim
Hi Wim,
If I understand your question correctly, you're wondering why the intercept, β0, is equal to the mean of the predictors, mean(y). By default, the predictors are standardized in BAS (the R package underlying Bayesian linear regression). There are many reasons to do this, the two most important ones are that (1) the resulting Bayes factors are location-scale invariant, and (2) interaction effects are uncorrelated with main effects. Let me know if that answers your problem!
Cheers,
Don
Thanks Don, yes I'll buy that one. As a naive user I was not aware of the centering transformation and unjustly used the same interpretation of coefficients as is common in frequentist regression. Probably I overlooked some info about the transformation in the Bayesian mode. All clear now.
best
Wim