# Can you set a minimum limit for the Y-intercept in R?

I have two sets of test scores I'm using to predict future performance, using multiple regression, and I noticed that the y-intercept is negative.

This indicates that for a student who scores a zero on both tests I predict that their score will be X negative number.

This isn't possible with regard to the tests being administered.

So I'm wondering now, is there a way to set a minimum limit for my y-intercept?

• If your observed values are bounded and you might get fits (or predictions, if you're doing any) anywhere near a bound you should not fit a model whose fitted values are unbounded. Choose a model which gives plausible predictions. Jul 24 '14 at 9:53
• An impossible prediction can still be a good prediction! One way to think of it is to suppose there is a larger spectrum of "latent" scores extending beyond the 0..100% range. The two zeros scored by that student may overestimate their true performance. A negative predicted score can be interpreted in this framework--provided the model is fit appropriately. (It needs to treat scores of 0 and 100 as being censored.) Regardless, the first thing to check is goodness of fit of the regression: if it's not linear, you would want to consider some of the suggestions in the answers.
– whuber
Feb 10 '15 at 21:29

It's still possible to have a negative intercept in negative binomial or beta regression, but one interprets the coefficients differently, so $\hat y\ge0$ if the predictor = 0. For a simulated example of NB regression in , library(MASS);set.seed(8);x=rnorm(99);y=rnbinom(99,1,.9);glm.nb(y~x)$coefficients[1] finds an intercept = -2.63, but predict(glm.nb(y~x),newdata=data.frame(x=0),type='response') predicts$\hat y(0)=.07$. Beta regression: library(betareg);set.seed(8);y=rbeta(99,.1,1);x=rnorm(99);betareg(y~x) gives an intercept = -2.61, but predict(betareg(y~x),newdata=data.frame(x=0),type='response') shows$\hat y(0)=.07$again. I have no idea why you would like that, but this should contain what you are looking for. Are there a lot of fitted values$< 0$? If not then I do not think that you model is wrong (per se), it's just that the estimator (OLS?) can't fit the data (around 0) well. Most likely because there is not a lot of test scores at 0? You could do exponential regression if indeed$Y$is count variable; the tobit model is another way to go if you are looking for corner solution. But both of these models are harder (than OLS) to interpret - because they are non-linear - OLS is often the easy choice. EDIT: Please note that when you force the intercept, there is no agreed upon way of calculating$R^2\$ - and some might say that you cannot know what it's actually measure of.