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, [EMAIL PROTECTED] 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 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.