Solved – Shape of confidence and prediction intervals for nonlinear regression

confidence intervalnonlinear regressionprediction interval

Are the confidence and prediction bands around a non-linear regression supposed to be symmetrical around the regression line? Meaning they do not take on the hour-glass shape as in the case of the bands for linear regression. Why is that?

Here is the model in question:
$$
F(x) = \left(\frac{A-D}{1 + \left(\frac x C\right)^B}\right) + D
$$
Here is the figure:

http://i57.tinypic.com/2q099ok.jpg

and here's the equation:

enter image description here

Best Answer

Confidence and prediction bands should be expected to typically get wider near the ends - and for the same reason that they always do so in ordinary regression; generally the parameter uncertainty leads to wider intervals near the ends than in the middle

You can see this by simulation easily enough, either by simulating data from a given model, or by simulating from the sampling distribution of the parameter vector.

The usual (approximately correct) calculations done for nonlinear regression involve taking a local linear approximation (this is given in Harvey's answer), but even without those we can get some notion of what's going on.

However, doing the actual calculations is nontrivial and it may be that programs might take a shortcut in calculation which ignores that effect. It's also possible that for some data and some models the effect is relatively small and hard to see. Indeed with prediction intervals, especially with large variance but lots of data it can sometimes be hard to see the curve in ordinary linear regression - they can look almost straight, and it's relatively easy to discern deviation from straightness.

Here's an example of how hard it can be to see just with a confidence interval for the mean (prediction intervals can be far harder to see because their relative variation is so much less). Here's some data and a nonlinear least squares fit, with a confidence interval for the population mean (in this case generated from the sampling distribution since I know the true model, but something very similar could be done by asymptotic approximation or by bootstrapping):

enter image description here

The purple bounds look almost parallel to the blue predictions... but they aren't. Here's the standard error of the sampling distribution of those mean predictions:

enter image description here

which clearly isn't constant.


Edit:

Those "sp" expressions you just posted come straight from the prediction interval for linear regression!