An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130113/a0d1d26c/attachment-0001.pl>
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:
Hi all, I am trying to plot the one-sided confidence limits for the regression line. It seems it is ok to use predict function to compute the two sided confidence limits. Does any one know a easy way to compute the one sided confidence limits?
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.
David Winsemius Alameda, CA, USA
On 01/14/2013 05:19 PM, li li wrote:
Hi all, I am trying to plot the one-sided confidence limits for the regression line. It seems it is ok to use predict function to compute the two sided confidence limits. Does any one know a easy way to compute the one sided confidence limits?
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