Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Setting intercept to 0 in lmBF?

Hi all,

I was wondering whether it is possible to force the intercept equal to 0 in lmBF. (Or, at least, I think that's what I need to do. Forgive my statistical shortcomings.)

What I have is a dataset in which I want to find the best fit from [linear, quadratic, cubic] fits, with the constraint that the intercept should be 0. I'd like to be able to say something like, "Assuming a polynomial of degree <= 3, and that the y-intercept is 0, the best fit for this data is f(x)."

Any help would be very much appreciated.

Best regards,


  • Hi Rick,

    I'm not sure whether this can be accomplished (my personal probability is lower than 5%). If Richard does not reply, you could DM him; if you would you can post the answer here.


  • Short answer: not currently possible

    Richard's full response:


    mmm, no, the BayesFactor package won't allow that; the intercept has a noninformative prior placed on it that is analytically integrated out by the time the numerical integration algorithms even start. One would have to derive the posterior assuming 0 intercept. This could be done and tested in an hour or so by someone who knew what they were doing (but unfortunately I don't have time to do it).

Sign In or Register to comment.