Skip to content

One sided confidence limits for the regression line

3 messages · Li Li, David Winsemius, Rolf Turner

#
On Jan 13, 2013, at 8:19 PM, li li wrote:

            
Hypotheses can be "one-sided" or "two-sided". Except for the confidence intervals around observations of 0 in count data, I'm not sure what you mean by a "one-sided confidence interval". My uncertainty certainly increases when you talk about such around regression line estimates.
#
On 01/14/2013 05:19 PM, li li wrote:
Essentially just multiply the "lack of confidence" by 2.

E.g. for 95% one-sided confidence use 90% two-sided confidence
limits (and choose the limit that you're interested in).

E.g.:

set.seed(42)
x    <- seq(0,10,length=101)
y    <- 1.5 + 2.5*x + rnorm(101,0,5)
fit   <- lm(y ~ x)
pfit <- predict(fit,interval="confidence",level=0.90)
plot(x,y)
lines(x,pfit[,"fit"])
lines(x,pfit[,"upr"],col="red")

You are then, for any given x value, 95% confident that the true mean of 
"Y" lies *below* the
corresponding y-value on red curve that was plotted.

     cheers,

         Rolf Turner