Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  John Paul Apr 3 at 18:08
1  
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 –  user42835 Apr 3 at 18:11
4  
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 at 18:12
1  
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 at 18:54
2  
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. –  Glen_b Apr 3 at 23:03

2 Answers 2

Mathematics are reality-agnostic. So your negative lower prediction band can certainly be mathematically sound.

I would argue, however, that this is a good indication that you are using the wrong mathematics, e.g., Ordinary Least Squares (which assumes a normal distribution of errors) with count data (where a normal distribution makes no sense). I would suggest using Poisson regression or some similar method that is more suitable for count data.

share|improve this answer
    
I think applied scientists and statisticians would agree that allowing negative predicted counts is unsound in practice. –  AdamO Apr 4 at 16:06

It suggests to me that you haven't used any analytic approach with an appropriate transformation of the outcome. With count data, for instance, popular linear models (Poisson Regression or Negative Binomial Regression in particular) model the log of the process as a linear function of predictors. Then, any predicted values resulting from such a model would have to be exponentiated and, thus, positive.

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

There are additive count models, just like there are additive risk models for binary endpoints, but I think the results can be difficult to interpret and they behave untenably for predictions near to the boundaries values of the support (0 for count data). As such, I'd be dubious about not only your negative predictions but all other predictions from your model.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.