[R] what is set.fit in function predict.lm

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Sep 10 17:51:44 CEST 2003

On Wed, 10 Sep 2003 solares at unsl.edu.ar wrote:

> Hi, what es the parameter set.fit in function predict.lm, is set.fit True
> then i need the standard error How i cant calculate it?. It is the different
> what? i see the code of predict.lm How i cant see the matemathics formula 
> for the calculation of standard error.

> args(predict.lm)
function (object, newdata, se.fit = FALSE, scale = NULL, df = Inf,
    interval = c("none", "confidence", "prediction"), level = 0.95,
    type = c("response", "terms"), terms = NULL, na.action = na.pass,

so I guess you meant `se.fit'.  That argument is documented on the help
page: if true it returns standard errors (estimated standard deviations)
for the predictions, without your calculating anything.

The formulae are in any good book on regression, although R is more
careful than most books in dealing with e.g. rank-deficient cases.

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