Message-ID: <Pine.A41.4.44.0211151015260.32848-100000@homer10.u.washington.edu>
Date: 2002-11-15T18:17:33Z
From: Thomas Lumley
Subject: confidence interval in "predict.lm"
In-Reply-To: <003201c28cc6$203d59a0$5fdc82d1@amd1>
On Fri, 15 Nov 2002, Fred Mellender wrote:
> I am studying statistics using R and a book "Understandable Statistics", by
> Brase and Brase. The book has two
> worked examples for calculating a confidence interval around a predicted
> value from a linear model.
<snip>
> The book gives the confidence interval as 26.5 <= y <= 39.5. The book
> defines the confidence interval calculation thus:
>
> yp - E <= y <= yp + E
>
> Where
> E = tc*sC *sqrt(1 + 1/n + (x-xBar)^2/SSx)
You asked R for a confidence interval for the predicted mean at x. If you
want a prediction interval at x you need interval="prediction" not
interval="confidence".
-thomas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._