Consider the following (in R):
library(MASS)
plot(stack.loss~Air.Flow,data=stackloss)
regression <- rlm(stack.loss~Air.Flow,data=stackloss)
abline(regression)
For each of the points I would like to to test against the null hypothesis that it really is located on the line (rather than where it really is) - in essence quantifying the degree to which these are outliers with respect to the regression model.
Possibly using hopeless search term combinations, I have been unable to identify appropriate methodology. Would it be valid to use for each residual a one-sample t-test (ar equivalent) against the residual population to establish such a measure?
Edit: Further reading seems to indicate that "Tolerance Interval" is what I might be looking for - the "tolerance" R package provides calculations of that. I am however puzzled by the apparent contradictory nature of such intervals for regressions as defined by different publications. In the R package case the tolerance bands seem to track the regression line parallely (see Fig. 12 and below example), while alternative sources such as this operate with bands that are reminiscent of confidence intervals in shape (see Fig. 4). The latter seems more intuitive, but other's opinions would be appreciated.
For each point in a sample I am actually looking for "which x/95% tolerance band is running through this point" ...
Here's how usage of "tolerance" might look like (adding to above code) for 95%/95% 2-sided nonparametric regression tolerance bounds:
library(tolerance)
tol.bounds <- npregtol.int(x=stackloss$Air.Flow,
y=stackloss$stack.loss, y.hat=regression$fit, side=2, alpha=0.05, P=0.95,
method="WILKS")
lines(tol.bounds$x,y=tol.bounds$"2-sided.lower",col="red")
lines(tol.bounds$x,y=tol.bounds$"2-sided.upper",col="red")