# Can a mathematically sound prediction interval have a negative lower bound?

I have used R to form a 95% prediction interval for the number of endemic species on an island.
My lower bound is negative – is that mathematically sound?

In the linear model used in the prediction interval, the data used are: Area Surface area of island, hectares DiscSC Distance from Santa Cruz, kilometres Elevation Elevation of higher point in metres and it is coded as such:

selected.model <- lm(ES ~ Area + Elevation + DistSC + I(Elevation^2)
+ (Elevation:DistSC) + (A‌​rea:Elevation))


and stepwise regression was performed to find this "best" model

I'm not exactly sure how a prediction interval works. I just want to make sure it is OK. Obviously a negative number of species is incorrect, but I know it takes into account the uncertainty of the mean as well as data scatter.

• Can you explain more about your analysis? What kind of data is used for prediction - normal, counts, probabilities, categorical... ? How did you do the analysis - regression, anova - something more complicated? It is hard to know what to say without that kind of info. Apr 3, 2014 at 18:08
• In the linear model used in the prediction interval, the data used are: Area Surface area of island, hectares DiscSC Distance from Santa Cruz, kilometres Elevation Elevation of higher point in metres and it is coded as such: > selected.model<-lm(ES~Area+Elevation+DistSC+I(Elevation^2)+(Elevation:DistSC)+(Area:Elevation)) and stepwise regression was performed to find this "best" model Apr 3, 2014 at 18:11
• There's nothing problematic with a negative lower bound for a non-negative variable from a mathematical point of view. The important question is whether this is evidence that the prediction interval procedure in use might be a poor one in general or inappropriate for this phenomenon in particular. Have you performed the usual regression diagnostics, including goodness of fit and distributional evaluation of the residuals?
– whuber
Apr 3, 2014 at 18:12
• The few seconds it takes to issue the command plot(selected.model) and look at the output will be well worth your time, then.
– whuber
Apr 3, 2014 at 18:54
• You fitted a model that can be negative; if you do that you shouldn't be surprised when it generates an interval that does. Fitting a model more appropriate to your data/situation may help. Apr 3, 2014 at 23:03

Similarly, when you use the predict.glm function with se.fit set to TRUE for these models, you calculate symmetric prediction intervals for counts on the log scale. Re-exponentiating those values ensures that you have intervals which do not include 0. You'll notice that the exponentiated predictions are the same as you would get from setting type='response' in the predict function. However, asking for both type='response', se.fit=TRUE will confuse R since the link transformation of the GLM means you'll have non-symmetric intervals (SE of FIT is calculated on the transformed outcome scale).