[R] prediction interval for multiple future observations
    Prof Brian Ripley 
    ripley at stats.ox.ac.uk
       
    Tue Aug 21 09:16:55 CEST 2007
    
    
  
On Mon, 20 Aug 2007, Vlad Skvortsov wrote:
> Hi!
>
> '?predict.lm' says that the prediction intervals returned by predict()
> are for single observation only. Is there a way to specify the desired
> number of observations to construct the interval for?
What it says in full is
      The prediction intervals are for a single observation at each case
      in 'newdata' (or by default, the data used for the fit) with error
      variance(s) 'pred.var'.
I think you misunderstand: predict.lm returns a prediction interval for 
each row of 'newdata'.  The comment in part means that those intervals are 
to be considered individually, and not as a joint prediction region for 
all the future observations.  If you want, say, a prediction interval for 
the average of 10 indepedent observations at a case, use 'pred.var' to 
specify the error variance.
-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
    
    
More information about the R-help
mailing list